|
Message-Id: <20200524080910.13087-1-oscar.carter@gmx.com> Date: Sun, 24 May 2020 10:09:10 +0200 From: Oscar Carter <oscar.carter@....com> To: Kees Cook <keescook@...omium.org>, Thomas Gleixner <tglx@...utronix.de>, Jason Cooper <jason@...edaemon.net>, Marc Zyngier <maz@...nel.org> Cc: kernel-hardening@...ts.openwall.com, linux-kernel@...r.kernel.org, Oscar Carter <oscar.carter@....com> Subject: [PATCH] drivers/irqchip: Remove function callback casts In an effort to enable -Wcast-function-type in the top-level Makefile to support Control Flow Integrity builds, remove all the function callback casts. To do this, modify the IRQCHIP_ACPI_DECLARE macro initializing the acpi_probe_entry struct directly instead of use the existent macro ACPI_DECLARE_PROBE_ENTRY. In this new initialization use the probe_subtbl field instead of the probe_table field use in the ACPI_DECLARE_PROBE_ENTRY macro. Signed-off-by: Oscar Carter <oscar.carter@....com> --- include/linux/irqchip.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h index 950e4b2458f0..1f464fd10df0 100644 --- a/include/linux/irqchip.h +++ b/include/linux/irqchip.h @@ -39,8 +39,14 @@ * @fn: initialization function */ #define IRQCHIP_ACPI_DECLARE(name, subtable, validate, data, fn) \ - ACPI_DECLARE_PROBE_ENTRY(irqchip, name, ACPI_SIG_MADT, \ - subtable, validate, data, fn) + static const struct acpi_probe_entry __acpi_probe_##name \ + __used __section(__irqchip_acpi_probe_table) = { \ + .id = ACPI_SIG_MADT, \ + .type = subtable, \ + .subtable_valid = validate, \ + .probe_subtbl = (acpi_tbl_entry_handler)fn, \ + .driver_data = data, \ + } #ifdef CONFIG_IRQCHIP void irqchip_init(void); -- 2.20.1
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.