Commit 8ebf642f authored by Oscar Carter's avatar Oscar Carter Committed by Marc Zyngier

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: default avatarMarc Zyngier <maz@kernel.org>
Signed-off-by: default avatarOscar Carter <oscar.carter@gmx.com>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/20200530143430.5203-4-oscar.carter@gmx.com
parent aba3c7ed
...@@ -1143,14 +1143,14 @@ struct acpi_probe_entry { ...@@ -1143,14 +1143,14 @@ struct acpi_probe_entry {
kernel_ulong_t driver_data; kernel_ulong_t driver_data;
}; };
#define ACPI_DECLARE_PROBE_ENTRY(table, name, table_id, subtable, valid, data, fn) \ #define ACPI_DECLARE_PROBE_ENTRY(table, name, table_id, subtable, \
valid, data, fn) \
static const struct acpi_probe_entry __acpi_probe_##name \ static const struct acpi_probe_entry __acpi_probe_##name \
__used __section(__##table##_acpi_probe_table) \ __used __section(__##table##_acpi_probe_table) = { \
= { \
.id = table_id, \ .id = table_id, \
.type = subtable, \ .type = subtable, \
.subtable_valid = valid, \ .subtable_valid = valid, \
.probe_table = (acpi_tbl_table_handler)fn, \ .probe_table = fn, \
.driver_data = data, \ .driver_data = data, \
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment