Skip to content

Commit aba3c7e

Browse files
Oscar CarterMarc Zyngier
authored andcommitted
drivers/irqchip: Use new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY
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 <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Signed-off-by: Oscar Carter <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 8977809 commit aba3c7e

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

drivers/irqchip/irq-gic-v3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2116,7 +2116,7 @@ static void __init gic_acpi_setup_kvm_info(void)
21162116
}
21172117

21182118
static int __init
2119-
gic_acpi_init(struct acpi_subtable_header *header, const unsigned long end)
2119+
gic_acpi_init(union acpi_subtable_headers *header, const unsigned long end)
21202120
{
21212121
struct acpi_madt_generic_distributor *dist;
21222122
struct fwnode_handle *domain_handle;

drivers/irqchip/irq-gic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1592,7 +1592,7 @@ static void __init gic_acpi_setup_kvm_info(void)
15921592
gic_set_kvm_info(&gic_v2_kvm_info);
15931593
}
15941594

1595-
static int __init gic_v2_acpi_init(struct acpi_subtable_header *header,
1595+
static int __init gic_v2_acpi_init(union acpi_subtable_headers *header,
15961596
const unsigned long end)
15971597
{
15981598
struct acpi_madt_generic_distributor *dist;

include/linux/irqchip.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@
3939
* @fn: initialization function
4040
*/
4141
#define IRQCHIP_ACPI_DECLARE(name, subtable, validate, data, fn) \
42-
ACPI_DECLARE_PROBE_ENTRY(irqchip, name, ACPI_SIG_MADT, \
43-
subtable, validate, data, fn)
42+
ACPI_DECLARE_SUBTABLE_PROBE_ENTRY(irqchip, name, \
43+
ACPI_SIG_MADT, subtable, \
44+
validate, data, fn)
4445

4546
#ifdef CONFIG_IRQCHIP
4647
void irqchip_init(void);

0 commit comments

Comments
 (0)