Skip to content

Commit 8ebf642

Browse files
Oscar CarterMarc Zyngier
authored andcommitted
drivers/acpi: Remove function cast
Remove the function cast in the ACPI_DECLARE_PROBE_ENTRY macro to ensure that the functions passed as a last parameter to this macro have the right prototype. This is an effort to enable -Wcast-function-type in the top-level Makefile to support Control Flow Integrity builds. Suggested-by: Marc Zyngier <[email protected]> Signed-off-by: Oscar Carter <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent aba3c7e commit 8ebf642

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

include/linux/acpi.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,16 +1143,16 @@ struct acpi_probe_entry {
11431143
kernel_ulong_t driver_data;
11441144
};
11451145

1146-
#define ACPI_DECLARE_PROBE_ENTRY(table, name, table_id, subtable, valid, data, fn) \
1146+
#define ACPI_DECLARE_PROBE_ENTRY(table, name, table_id, subtable, \
1147+
valid, data, fn) \
11471148
static const struct acpi_probe_entry __acpi_probe_##name \
1148-
__used __section(__##table##_acpi_probe_table) \
1149-
= { \
1149+
__used __section(__##table##_acpi_probe_table) = { \
11501150
.id = table_id, \
11511151
.type = subtable, \
11521152
.subtable_valid = valid, \
1153-
.probe_table = (acpi_tbl_table_handler)fn, \
1154-
.driver_data = data, \
1155-
}
1153+
.probe_table = fn, \
1154+
.driver_data = data, \
1155+
}
11561156

11571157
#define ACPI_DECLARE_SUBTABLE_PROBE_ENTRY(table, name, table_id, \
11581158
subtable, valid, data, fn) \

0 commit comments

Comments
 (0)