* [PATCH 1/4] dma: dw: use designated initializers for acpi_device_id
2026-09-04 14:10 [PATCH 0/4] dma: use designated initializers for acpi_device_id Pawel Zalewski
@ 2026-09-04 14:10 ` Pawel Zalewski
2026-09-04 14:10 ` [PATCH 2/4] dma: loongson: use named " Pawel Zalewski
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Pawel Zalewski @ 2026-09-04 14:10 UTC (permalink / raw)
To: Viresh Kumar, Andy Shevchenko, Vinod Koul, Frank Li, Binbin Zhou,
Sinan Kaya
Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm,
Pawel Zalewski
Use a named 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.
Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
---
drivers/dma/dw/platform.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c
index c63fa52036d7f..5c1c97eb28a4a 100644
--- a/drivers/dma/dw/platform.c
+++ b/drivers/dma/dw/platform.c
@@ -141,14 +141,14 @@ MODULE_DEVICE_TABLE(of, dw_dma_of_id_table);
#ifdef CONFIG_ACPI
static const struct acpi_device_id dw_dma_acpi_id_table[] = {
- { "INTL9C60", (kernel_ulong_t)&dw_dma_chip_pdata },
- { "80862286", (kernel_ulong_t)&dw_dma_chip_pdata },
- { "808622C0", (kernel_ulong_t)&dw_dma_chip_pdata },
+ { .id = "INTL9C60", .driver_data = (kernel_ulong_t)&dw_dma_chip_pdata },
+ { .id = "80862286", .driver_data = (kernel_ulong_t)&dw_dma_chip_pdata },
+ { .id = "808622C0", .driver_data = (kernel_ulong_t)&dw_dma_chip_pdata },
/* Elkhart Lake iDMA 32-bit (PSE DMA) */
- { "80864BB4", (kernel_ulong_t)&xbar_chip_pdata },
- { "80864BB5", (kernel_ulong_t)&xbar_chip_pdata },
- { "80864BB6", (kernel_ulong_t)&xbar_chip_pdata },
+ { .id = "80864BB4", .driver_data = (kernel_ulong_t)&xbar_chip_pdata },
+ { .id = "80864BB5", .driver_data = (kernel_ulong_t)&xbar_chip_pdata },
+ { .id = "80864BB6", .driver_data = (kernel_ulong_t)&xbar_chip_pdata },
{ }
};
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 2/4] dma: loongson: use named initializers for acpi_device_id
2026-09-04 14:10 [PATCH 0/4] dma: use designated initializers for acpi_device_id Pawel Zalewski
2026-09-04 14:10 ` [PATCH 1/4] dma: dw: " Pawel Zalewski
@ 2026-09-04 14:10 ` Pawel Zalewski
2026-09-05 8:15 ` Binbin Zhou
2026-09-04 14:10 ` [PATCH 3/4] dma: qcom: " Pawel Zalewski
` (2 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Pawel Zalewski @ 2026-09-04 14:10 UTC (permalink / raw)
To: Viresh Kumar, Andy Shevchenko, Vinod Koul, Frank Li, Binbin Zhou,
Sinan Kaya
Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm,
Pawel Zalewski
Use a named 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.
While we are at it - 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>
---
drivers/dma/loongson/loongson2-apb-cmc-dma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/loongson/loongson2-apb-cmc-dma.c b/drivers/dma/loongson/loongson2-apb-cmc-dma.c
index 1c9a542edc859..70880625c6e92 100644
--- a/drivers/dma/loongson/loongson2-apb-cmc-dma.c
+++ b/drivers/dma/loongson/loongson2-apb-cmc-dma.c
@@ -709,8 +709,8 @@ static const struct of_device_id loongson2_cmc_dma_of_match[] = {
MODULE_DEVICE_TABLE(of, loongson2_cmc_dma_of_match);
static const struct acpi_device_id loongson2_cmc_dma_acpi_match[] = {
- { "LOON0014", .driver_data = (kernel_ulong_t)&ls2k3000_cmc_dma_config },
- { /* sentinel */ }
+ { .id = "LOON0014", .driver_data = (kernel_ulong_t)&ls2k3000_cmc_dma_config },
+ { }
};
MODULE_DEVICE_TABLE(acpi, loongson2_cmc_dma_acpi_match);
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 2/4] dma: loongson: use named initializers for acpi_device_id
2026-09-04 14:10 ` [PATCH 2/4] dma: loongson: use named " Pawel Zalewski
@ 2026-09-05 8:15 ` Binbin Zhou
0 siblings, 0 replies; 8+ messages in thread
From: Binbin Zhou @ 2026-09-05 8:15 UTC (permalink / raw)
To: Pawel Zalewski, Viresh Kumar, Andy Shevchenko, Vinod Koul,
Frank Li, Sinan Kaya
Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm
On 2026/9/4 22:10, Pawel Zalewski wrote:
> Use a named 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.
>
> While we are at it - 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>
LGTM.
Reviewed-by: Binbin Zhou <zhoubinbin@loongson.cn>
> ---
> drivers/dma/loongson/loongson2-apb-cmc-dma.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma/loongson/loongson2-apb-cmc-dma.c b/drivers/dma/loongson/loongson2-apb-cmc-dma.c
> index 1c9a542edc859..70880625c6e92 100644
> --- a/drivers/dma/loongson/loongson2-apb-cmc-dma.c
> +++ b/drivers/dma/loongson/loongson2-apb-cmc-dma.c
> @@ -709,8 +709,8 @@ static const struct of_device_id loongson2_cmc_dma_of_match[] = {
> MODULE_DEVICE_TABLE(of, loongson2_cmc_dma_of_match);
>
> static const struct acpi_device_id loongson2_cmc_dma_acpi_match[] = {
> - { "LOON0014", .driver_data = (kernel_ulong_t)&ls2k3000_cmc_dma_config },
> - { /* sentinel */ }
> + { .id = "LOON0014", .driver_data = (kernel_ulong_t)&ls2k3000_cmc_dma_config },
> + { }
> };
> MODULE_DEVICE_TABLE(acpi, loongson2_cmc_dma_acpi_match);
>
>
--
Thanks.
Binbin
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/4] dma: qcom: use named initializers for acpi_device_id
2026-09-04 14:10 [PATCH 0/4] dma: use designated initializers for acpi_device_id Pawel Zalewski
2026-09-04 14:10 ` [PATCH 1/4] dma: dw: " Pawel Zalewski
2026-09-04 14:10 ` [PATCH 2/4] dma: loongson: use named " Pawel Zalewski
@ 2026-09-04 14:10 ` Pawel Zalewski
2026-09-04 14:43 ` Frank Li
2026-09-04 14:10 ` [PATCH 4/4] dma: xgene-dmac: " Pawel Zalewski
2026-09-05 8:12 ` [PATCH 0/4] dma: use designated " Andy Shevchenko
4 siblings, 1 reply; 8+ messages in thread
From: Pawel Zalewski @ 2026-09-04 14:10 UTC (permalink / raw)
To: Viresh Kumar, Andy Shevchenko, Vinod Koul, Frank Li, Binbin Zhou,
Sinan Kaya
Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm,
Pawel Zalewski
Use a named 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.
While we are at it - 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>
---
drivers/dma/qcom/hidma.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
index c939635be21d..1349066b1544 100644
--- a/drivers/dma/qcom/hidma.c
+++ b/drivers/dma/qcom/hidma.c
@@ -935,10 +935,10 @@ static void hidma_remove(struct platform_device *pdev)
#if IS_ENABLED(CONFIG_ACPI)
static const struct acpi_device_id hidma_acpi_ids[] = {
- {"QCOM8061"},
- {"QCOM8062", HIDMA_MSI_CAP},
- {"QCOM8063", (HIDMA_MSI_CAP | HIDMA_IDENTITY_CAP)},
- {},
+ { .id = "QCOM8061" },
+ { .id = "QCOM8062", .driver_data = HIDMA_MSI_CAP },
+ { .id = "QCOM8063", .driver_data = (HIDMA_MSI_CAP | HIDMA_IDENTITY_CAP) },
+ { }
};
MODULE_DEVICE_TABLE(acpi, hidma_acpi_ids);
#endif
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 3/4] dma: qcom: use named initializers for acpi_device_id
2026-09-04 14:10 ` [PATCH 3/4] dma: qcom: " Pawel Zalewski
@ 2026-09-04 14:43 ` Frank Li
0 siblings, 0 replies; 8+ messages in thread
From: Frank Li @ 2026-09-04 14:43 UTC (permalink / raw)
To: Pawel Zalewski
Cc: Viresh Kumar, Andy Shevchenko, Vinod Koul, Frank Li, Binbin Zhou,
Sinan Kaya, dmaengine, linux-kernel, linux-arm-kernel,
linux-arm-msm
On Fri, Sep 04, 2026 at 03:10:42PM +0100, Pawel Zalewski wrote:
> [You don't often get email from pzalewski@thegoodpenguin.co.uk. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
Subject: dmaengine: qcom: ...
>
> Use a named 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.
>
> While we are at it - unify the list terminator to have
> a single space between the brackets and no trailing
> comma.
Remove "While we are at it". Unify the list ...
and wrap at 75 char, check other patches
Frank
>
> Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
> ---
> drivers/dma/qcom/hidma.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
> index c939635be21d..1349066b1544 100644
> --- a/drivers/dma/qcom/hidma.c
> +++ b/drivers/dma/qcom/hidma.c
> @@ -935,10 +935,10 @@ static void hidma_remove(struct platform_device *pdev)
>
> #if IS_ENABLED(CONFIG_ACPI)
> static const struct acpi_device_id hidma_acpi_ids[] = {
> - {"QCOM8061"},
> - {"QCOM8062", HIDMA_MSI_CAP},
> - {"QCOM8063", (HIDMA_MSI_CAP | HIDMA_IDENTITY_CAP)},
> - {},
> + { .id = "QCOM8061" },
> + { .id = "QCOM8062", .driver_data = HIDMA_MSI_CAP },
> + { .id = "QCOM8063", .driver_data = (HIDMA_MSI_CAP | HIDMA_IDENTITY_CAP) },
> + { }
> };
> MODULE_DEVICE_TABLE(acpi, hidma_acpi_ids);
> #endif
>
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 4/4] dma: xgene-dmac: use named initializers for acpi_device_id
2026-09-04 14:10 [PATCH 0/4] dma: use designated initializers for acpi_device_id Pawel Zalewski
` (2 preceding siblings ...)
2026-09-04 14:10 ` [PATCH 3/4] dma: qcom: " Pawel Zalewski
@ 2026-09-04 14:10 ` Pawel Zalewski
2026-09-05 8:12 ` [PATCH 0/4] dma: use designated " Andy Shevchenko
4 siblings, 0 replies; 8+ messages in thread
From: Pawel Zalewski @ 2026-09-04 14:10 UTC (permalink / raw)
To: Viresh Kumar, Andy Shevchenko, Vinod Koul, Frank Li, Binbin Zhou,
Sinan Kaya
Cc: dmaengine, linux-kernel, linux-arm-kernel, 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.
While we are at it - 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>
---
drivers/dma/xgene-dma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/xgene-dma.c b/drivers/dma/xgene-dma.c
index fa1173e49900..8d1c58ca0d48 100644
--- a/drivers/dma/xgene-dma.c
+++ b/drivers/dma/xgene-dma.c
@@ -1800,8 +1800,8 @@ static void xgene_dma_remove(struct platform_device *pdev)
#ifdef CONFIG_ACPI
static const struct acpi_device_id xgene_dma_acpi_match_ptr[] = {
- {"APMC0D43", 0},
- {},
+ { .id = "APMC0D43" },
+ { }
};
MODULE_DEVICE_TABLE(acpi, xgene_dma_acpi_match_ptr);
#endif
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 0/4] dma: use designated initializers for acpi_device_id
2026-09-04 14:10 [PATCH 0/4] dma: use designated initializers for acpi_device_id Pawel Zalewski
` (3 preceding siblings ...)
2026-09-04 14:10 ` [PATCH 4/4] dma: xgene-dmac: " Pawel Zalewski
@ 2026-09-05 8:12 ` Andy Shevchenko
4 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2026-09-05 8:12 UTC (permalink / raw)
To: Pawel Zalewski
Cc: Viresh Kumar, Vinod Koul, Frank Li, Binbin Zhou, Sinan Kaya,
dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm
On Fri, Sep 04, 2026 at 03:10:39PM +0100, Pawel Zalewski wrote:
> 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 (as 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 (this series)
> - actual implementations that make some of the modules use the new driver_data_ptr
>
> That way the task can be fragmented into manageable and independent
> chunks of work and makes this effort easier to review.
>
> Tested builds on x86-64 and a64 in Yocto using 7.3-rc1.
All good to me (with what Frank suggested)
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> [1] https://lore.kernel.org/all/cover.1780048925.git.u.kleine-koenig@baylibre.com/
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread