]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drivers/irqchip: Use new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY
authorOscar Carter <oscar.carter@gmx.com>
Sat, 30 May 2020 14:34:29 +0000 (16:34 +0200)
committerMarc Zyngier <maz@kernel.org>
Sat, 27 Jun 2020 10:55:52 +0000 (11:55 +0100)
In an effort to enable -Wcast-function-type in the top-level Makefile to
support Control Flow Integrity builds, there are the need to remove all
the function callback casts.

To do this, modify the IRQCHIP_ACPI_DECLARE macro to use the new defined
macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY instead of the macro
ACPI_DECLARE_PROBE_ENTRY. This is necessary to be able to initialize the
the acpi_probe_entry struct using the probe_subtbl field instead of the
probe_table field and avoid function cast mismatches.

Also, modify the prototype of the functions used by the invocation of the
IRQCHIP_ACPI_DECLARE macro to match all the parameters.

Co-developed-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Oscar Carter <oscar.carter@gmx.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/20200530143430.5203-3-oscar.carter@gmx.com
drivers/irqchip/irq-gic-v3.c
drivers/irqchip/irq-gic.c
include/linux/irqchip.h

index cc46bc2d634b0a9cdc575727636835050225134a..324f280ff606614d5d204ee54194f571f924113b 100644 (file)
@@ -2116,7 +2116,7 @@ static void __init gic_acpi_setup_kvm_info(void)
 }
 
 static int __init
-gic_acpi_init(struct acpi_subtable_header *header, const unsigned long end)
+gic_acpi_init(union acpi_subtable_headers *header, const unsigned long end)
 {
        struct acpi_madt_generic_distributor *dist;
        struct fwnode_handle *domain_handle;
index 00de05abd3c3ad4dc2ffbd69d6c2bf57b3912c29..71bd64884ae5c7c4d43be5b6e5bff5bb1a5c8a40 100644 (file)
@@ -1592,7 +1592,7 @@ static void __init gic_acpi_setup_kvm_info(void)
        gic_set_kvm_info(&gic_v2_kvm_info);
 }
 
-static int __init gic_v2_acpi_init(struct acpi_subtable_header *header,
+static int __init gic_v2_acpi_init(union acpi_subtable_headers *header,
                                   const unsigned long end)
 {
        struct acpi_madt_generic_distributor *dist;
index 950e4b2458f0e3797571787cd0b13f4f913fbcf6..447f22880a69580e750f5e4e9429f3c3b10ea2a2 100644 (file)
@@ -39,8 +39,9 @@
  * @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)
+       ACPI_DECLARE_SUBTABLE_PROBE_ENTRY(irqchip, name,                \
+                                         ACPI_SIG_MADT, subtable,      \
+                                         validate, data, fn)
 
 #ifdef CONFIG_IRQCHIP
 void irqchip_init(void);