Skip to content

Commit a068352

Browse files
vlsunilpalmer-dabbelt
authored andcommitted
RISC-V: ACPI: Update the return value of acpi_get_rhct()
acpi_get_rhct() currently returns pointer to acpi_table_header structure. But since this is specific to RHCT, return pointer to acpi_table_rhct structure itself. Suggested-by: Andrew Jones <ajones@ventanamicro.com> Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20231018124007.1306159-3-sunilvl@ventanamicro.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent e8065df commit a068352

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/acpi/riscv/rhct.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include <linux/acpi.h>
1111

12-
static struct acpi_table_header *acpi_get_rhct(void)
12+
static struct acpi_table_rhct *acpi_get_rhct(void)
1313
{
1414
static struct acpi_table_header *rhct;
1515
acpi_status status;
@@ -26,7 +26,7 @@ static struct acpi_table_header *acpi_get_rhct(void)
2626
}
2727
}
2828

29-
return rhct;
29+
return (struct acpi_table_rhct *)rhct;
3030
}
3131

3232
/*
@@ -48,7 +48,7 @@ int acpi_get_riscv_isa(struct acpi_table_header *table, unsigned int cpu, const
4848
BUG_ON(acpi_disabled);
4949

5050
if (!table) {
51-
rhct = (struct acpi_table_rhct *)acpi_get_rhct();
51+
rhct = acpi_get_rhct();
5252
if (!rhct)
5353
return -ENOENT;
5454
} else {

0 commit comments

Comments
 (0)