* [PATCH] irqchip: Use named initializers for acpi_device_id
@ 2026-10-14 11:00 Pawel Zalewski
2026-10-15 12:32 ` [tip: irq/drivers] " tip-bot2 for Pawel Zalewski
2026-11-01 22:16 ` [PATCH] " patchwork-bot+linux-riscv
0 siblings, 2 replies; 3+ messages in thread
From: Pawel Zalewski @ 2026-10-14 11:00 UTC (permalink / raw)
To: Marc Zyngier, Lorenzo Pieralisi, Thomas Gleixner, Radu Rendec,
Anup Patel, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Rahul Pathak, Samuel Holland
Cc: linux-arm-kernel, linux-kernel, linux-riscv, linux-arm-msm,
Pawel Zalewski
Use a designated initializer for the acpi_device_id fields which makes the
code more readable and consistent with how lists are initialized in the
rest of the kernel code base. Also drop explicitly setting fields to 0
where it is redundant.
Unify the list terminator to have a single space between the brackets and
no trailing comma.
Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
---
This series is converting lists that contain the acpi_device_id struct,
which is defined in the include/linux/device-id/acpi.h to make use of named
initializers (which they do not use currently). This work is part of the on
going effort in the kernel associated with device-ids [1]
The plan is to convert acpi_device_id::driver_data to have an anonymous
union, similarly to what was introduced for PCI and I2C device ID tables.
The goal is to increase type-safety (most of the existing casts are gone),
to improve readability and to make use intent a bit more clear:
```
union {
kernel_ulong_t driver_data;
const void *driver_data_ptr;
}
```
But for that to work all lists containing the structs need to use named
initializers first to avoid triggering -Wmissing-braces. I already have
patches that implement this and touching a lot of kernel subsystmes that
use the acpi_device_id struct and that list keeps on growing. Therefore,
I have decided to split the series per every subsystem into:
- pre-clean-ups that convert the lists to use named initializers
(which is this series)
- actual implementations that make some of the modules use the new
driver_data_ptr member (does not apply to this tree)
That way the task can be fragmented into manageable and independent chunks
of work and makes this effort easier to review.
[1] https://lore.kernel.org/all/cover.1780048925.git.u.kleine-koenig@baylibre.com/
---
drivers/irqchip/irq-gic-v5-iwb.c | 4 ++--
drivers/irqchip/irq-mbigen.c | 4 ++--
drivers/irqchip/irq-riscv-aplic-main.c | 4 ++--
drivers/irqchip/irq-riscv-rpmi-sysmsi.c | 4 ++--
drivers/irqchip/irq-sifive-plic.c | 4 ++--
drivers/irqchip/irq-sni-exiu.c | 4 ++--
drivers/irqchip/qcom-irq-combiner.c | 2 +-
7 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v5-iwb.c b/drivers/irqchip/irq-gic-v5-iwb.c
index 442c20614dbe..34afa036c34d 100644
--- a/drivers/irqchip/irq-gic-v5-iwb.c
+++ b/drivers/irqchip/irq-gic-v5-iwb.c
@@ -282,8 +282,8 @@ MODULE_DEVICE_TABLE(of, gicv5_iwb_of_match);
#ifdef CONFIG_ACPI
static const struct acpi_device_id iwb_acpi_match[] = {
- { "ARMH0003", 0 },
- {}
+ { .id = "ARMH0003" },
+ { }
};
#endif
diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c
index 12919836dadb..0b4d78a0bbde 100644
--- a/drivers/irqchip/irq-mbigen.c
+++ b/drivers/irqchip/irq-mbigen.c
@@ -247,8 +247,8 @@ static int mbigen_of_create_domain(struct platform_device *pdev,
#ifdef CONFIG_ACPI
static const struct acpi_device_id mbigen_acpi_match[] = {
- { "HISI0152", 0 },
- {}
+ { .id = "HISI0152" },
+ { }
};
MODULE_DEVICE_TABLE(acpi, mbigen_acpi_match);
diff --git a/drivers/irqchip/irq-riscv-aplic-main.c b/drivers/irqchip/irq-riscv-aplic-main.c
index d9afb6ae98cf..1676d64e6e4a 100644
--- a/drivers/irqchip/irq-riscv-aplic-main.c
+++ b/drivers/irqchip/irq-riscv-aplic-main.c
@@ -305,8 +305,8 @@ static void aplic_init_hw_irqs(struct aplic_priv *priv)
#ifdef CONFIG_ACPI
static const struct acpi_device_id aplic_acpi_match[] = {
- { "RSCV0002", 0 },
- {}
+ { .id = "RSCV0002" },
+ { }
};
MODULE_DEVICE_TABLE(acpi, aplic_acpi_match);
diff --git a/drivers/irqchip/irq-riscv-rpmi-sysmsi.c b/drivers/irqchip/irq-riscv-rpmi-sysmsi.c
index 612f3972f7af..bc80c38bb864 100644
--- a/drivers/irqchip/irq-riscv-rpmi-sysmsi.c
+++ b/drivers/irqchip/irq-riscv-rpmi-sysmsi.c
@@ -313,8 +313,8 @@ static const struct of_device_id rpmi_sysmsi_match[] = {
};
static const struct acpi_device_id acpi_rpmi_sysmsi_match[] = {
- { "RSCV0006" },
- {}
+ { .id = "RSCV0006" },
+ { }
};
MODULE_DEVICE_TABLE(acpi, acpi_rpmi_sysmsi_match);
diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c
index 5b0dac104814..ba9c200b12fd 100644
--- a/drivers/irqchip/irq-sifive-plic.c
+++ b/drivers/irqchip/irq-sifive-plic.c
@@ -538,8 +538,8 @@ static const struct of_device_id plic_match[] = {
#ifdef CONFIG_ACPI
static const struct acpi_device_id plic_acpi_match[] = {
- { "RSCV0001", 0 },
- {}
+ { .id = "RSCV0001" },
+ { }
};
MODULE_DEVICE_TABLE(acpi, plic_acpi_match);
diff --git a/drivers/irqchip/irq-sni-exiu.c b/drivers/irqchip/irq-sni-exiu.c
index bfd2adedf8f3..108d7f2e59c4 100644
--- a/drivers/irqchip/irq-sni-exiu.c
+++ b/drivers/irqchip/irq-sni-exiu.c
@@ -307,8 +307,8 @@ static int exiu_acpi_probe(struct platform_device *pdev)
}
static const struct acpi_device_id exiu_acpi_ids[] = {
- { "SCX0008" },
- { /* sentinel */ }
+ { .id = "SCX0008" },
+ { }
};
MODULE_DEVICE_TABLE(acpi, exiu_acpi_ids);
diff --git a/drivers/irqchip/qcom-irq-combiner.c b/drivers/irqchip/qcom-irq-combiner.c
index 09819007d08e..6d83e1e4a7ea 100644
--- a/drivers/irqchip/qcom-irq-combiner.c
+++ b/drivers/irqchip/qcom-irq-combiner.c
@@ -262,7 +262,7 @@ static int combiner_probe(struct platform_device *pdev)
}
static const struct acpi_device_id qcom_irq_combiner_ids[] = {
- { "QCOM80B1", },
+ { .id = "QCOM80B1" },
{ }
};
---
base-commit: 4056b3c9d3c92ea45955641dbafeb9b960e146ef
change-id: 20261014-acpi-irqchip-44112a44978a
Best regards,
--
Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip: irq/drivers] irqchip: Use named initializers for acpi_device_id
2026-10-14 11:00 [PATCH] irqchip: Use named initializers for acpi_device_id Pawel Zalewski
@ 2026-10-15 12:32 ` tip-bot2 for Pawel Zalewski
2026-11-01 22:16 ` [PATCH] " patchwork-bot+linux-riscv
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Pawel Zalewski @ 2026-10-15 12:32 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Pawel Zalewski, Thomas Gleixner, x86, linux-kernel
The following commit has been merged into the irq/drivers branch of tip:
Commit-ID: 5919f587ea37bf59a6fd7a2b91aef7b45c626343
Gitweb: https://git.kernel.org/tip/5919f587ea37bf59a6fd7a2b91aef7b45c626343
Author: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
AuthorDate: Wed, 14 Oct 2026 12:00:43 +01:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Thu, 15 Oct 2026 14:25:06 +02:00
irqchip: Use named initializers for acpi_device_id
Use a designated initializer for the acpi_device_id fields which makes the
code more readable and consistent with how lists are initialized in the
rest of the kernel code base. Also drop explicitly setting fields to 0
where it is redundant.
Unify the list terminator to have a single space between the brackets and
no trailing comma.
Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20261014-acpi-irqchip-v1-1-821917378de3@thegoodpenguin.co.uk
---
drivers/irqchip/irq-gic-v5-iwb.c | 4 ++--
drivers/irqchip/irq-mbigen.c | 4 ++--
drivers/irqchip/irq-riscv-aplic-main.c | 4 ++--
drivers/irqchip/irq-riscv-rpmi-sysmsi.c | 4 ++--
drivers/irqchip/irq-sifive-plic.c | 4 ++--
drivers/irqchip/irq-sni-exiu.c | 4 ++--
drivers/irqchip/qcom-irq-combiner.c | 2 +-
7 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v5-iwb.c b/drivers/irqchip/irq-gic-v5-iwb.c
index 442c206..34afa03 100644
--- a/drivers/irqchip/irq-gic-v5-iwb.c
+++ b/drivers/irqchip/irq-gic-v5-iwb.c
@@ -282,8 +282,8 @@ MODULE_DEVICE_TABLE(of, gicv5_iwb_of_match);
#ifdef CONFIG_ACPI
static const struct acpi_device_id iwb_acpi_match[] = {
- { "ARMH0003", 0 },
- {}
+ { .id = "ARMH0003" },
+ { }
};
#endif
diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c
index 6f69f4e..3c54f24 100644
--- a/drivers/irqchip/irq-mbigen.c
+++ b/drivers/irqchip/irq-mbigen.c
@@ -259,8 +259,8 @@ static int mbigen_of_create_domain(struct platform_device *pdev,
#ifdef CONFIG_ACPI
static const struct acpi_device_id mbigen_acpi_match[] = {
- { "HISI0152", 0 },
- {}
+ { .id = "HISI0152" },
+ { }
};
MODULE_DEVICE_TABLE(acpi, mbigen_acpi_match);
diff --git a/drivers/irqchip/irq-riscv-aplic-main.c b/drivers/irqchip/irq-riscv-aplic-main.c
index d9afb6a..1676d64 100644
--- a/drivers/irqchip/irq-riscv-aplic-main.c
+++ b/drivers/irqchip/irq-riscv-aplic-main.c
@@ -305,8 +305,8 @@ static void aplic_init_hw_irqs(struct aplic_priv *priv)
#ifdef CONFIG_ACPI
static const struct acpi_device_id aplic_acpi_match[] = {
- { "RSCV0002", 0 },
- {}
+ { .id = "RSCV0002" },
+ { }
};
MODULE_DEVICE_TABLE(acpi, aplic_acpi_match);
diff --git a/drivers/irqchip/irq-riscv-rpmi-sysmsi.c b/drivers/irqchip/irq-riscv-rpmi-sysmsi.c
index 612f397..bc80c38 100644
--- a/drivers/irqchip/irq-riscv-rpmi-sysmsi.c
+++ b/drivers/irqchip/irq-riscv-rpmi-sysmsi.c
@@ -313,8 +313,8 @@ static const struct of_device_id rpmi_sysmsi_match[] = {
};
static const struct acpi_device_id acpi_rpmi_sysmsi_match[] = {
- { "RSCV0006" },
- {}
+ { .id = "RSCV0006" },
+ { }
};
MODULE_DEVICE_TABLE(acpi, acpi_rpmi_sysmsi_match);
diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c
index 4156493..55d94c4 100644
--- a/drivers/irqchip/irq-sifive-plic.c
+++ b/drivers/irqchip/irq-sifive-plic.c
@@ -538,8 +538,8 @@ static const struct of_device_id plic_match[] = {
#ifdef CONFIG_ACPI
static const struct acpi_device_id plic_acpi_match[] = {
- { "RSCV0001", 0 },
- {}
+ { .id = "RSCV0001" },
+ { }
};
MODULE_DEVICE_TABLE(acpi, plic_acpi_match);
diff --git a/drivers/irqchip/irq-sni-exiu.c b/drivers/irqchip/irq-sni-exiu.c
index bfd2ade..108d7f2 100644
--- a/drivers/irqchip/irq-sni-exiu.c
+++ b/drivers/irqchip/irq-sni-exiu.c
@@ -307,8 +307,8 @@ out_unmap:
}
static const struct acpi_device_id exiu_acpi_ids[] = {
- { "SCX0008" },
- { /* sentinel */ }
+ { .id = "SCX0008" },
+ { }
};
MODULE_DEVICE_TABLE(acpi, exiu_acpi_ids);
diff --git a/drivers/irqchip/qcom-irq-combiner.c b/drivers/irqchip/qcom-irq-combiner.c
index 0981900..6d83e1e 100644
--- a/drivers/irqchip/qcom-irq-combiner.c
+++ b/drivers/irqchip/qcom-irq-combiner.c
@@ -262,7 +262,7 @@ static int combiner_probe(struct platform_device *pdev)
}
static const struct acpi_device_id qcom_irq_combiner_ids[] = {
- { "QCOM80B1", },
+ { .id = "QCOM80B1" },
{ }
};
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] irqchip: Use named initializers for acpi_device_id
2026-10-14 11:00 [PATCH] irqchip: Use named initializers for acpi_device_id Pawel Zalewski
2026-10-15 12:32 ` [tip: irq/drivers] " tip-bot2 for Pawel Zalewski
@ 2026-11-01 22:16 ` patchwork-bot+linux-riscv
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-riscv @ 2026-11-01 22:16 UTC (permalink / raw)
To: Pawel Zalewski
Cc: linux-riscv, maz, lpieralisi, tglx, radu, anup, pjw, palmer, aou,
alex, rahul, samuel.holland, linux-arm-kernel, linux-kernel,
linux-arm-msm
Hello:
This patch was applied to riscv/linux.git (fixes)
by Thomas Gleixner <tglx@kernel.org>:
On Wed, 14 Oct 2026 12:00:43 +0100 you wrote:
> Use a designated initializer for the acpi_device_id fields which makes the
> code more readable and consistent with how lists are initialized in the
> rest of the kernel code base. Also drop explicitly setting fields to 0
> where it is redundant.
>
> Unify the list terminator to have a single space between the brackets and
> no trailing comma.
>
> [...]
Here is the summary with links:
- irqchip: Use named initializers for acpi_device_id
https://git.kernel.org/riscv/c/5919f587ea37
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-01 22:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-14 11:00 [PATCH] irqchip: Use named initializers for acpi_device_id Pawel Zalewski
2026-10-15 12:32 ` [tip: irq/drivers] " tip-bot2 for Pawel Zalewski
2026-11-01 22:16 ` [PATCH] " patchwork-bot+linux-riscv
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®