* [PATCH v3 0/4] dmaengine: use designated initializers for acpi_device_id
@ 2026-09-16 15:27 Pawel Zalewski
2026-09-16 15:27 ` [PATCH v3 1/4] dmaengine: dw: " Pawel Zalewski
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: Pawel Zalewski @ 2026-09-16 15:27 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, Frank Li
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
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-rc2.
[1] https://lore.kernel.org/all/cover.1780048925.git.u.kleine-koenig@baylibre.com/
Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
---
Changes in v3:
- Changed the title tag to dmaengine; added Reviewed-by from V2.
- Link to v2: https://patch.msgid.link/20260907-acpi-dma-v2-0-0ffe4a007992@thegoodpenguin.co.uk
Changes in v2:
- Tidy up messages and wrapped at 75 chars; added Reviewed-bys from V1.
- Link to v1: https://patch.msgid.link/20260904-acpi-dma-v1-0-0fcc63d65d4b@thegoodpenguin.co.uk
To: Viresh Kumar <vireshk@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Vinod Koul <vkoul@kernel.org>
To: Frank Li <Frank.Li@kernel.org>
To: Binbin Zhou <zhoubinbin@loongson.cn>
To: Sinan Kaya <okaya@kernel.org>
Cc: dmaengine@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-arm-msm@vger.kernel.org
---
Pawel Zalewski (4):
dmaengine: dw: use designated initializers for acpi_device_id
dmaengine: loongson: use named initializers for acpi_device_id
dmaengine: qcom: use named initializers for acpi_device_id
dmaengine: xgene-dma: use named initializers for acpi_device_id
drivers/dma/dw/platform.c | 12 ++++++------
drivers/dma/loongson/loongson2-apb-cmc-dma.c | 4 ++--
drivers/dma/qcom/hidma.c | 8 ++++----
drivers/dma/xgene-dma.c | 4 ++--
4 files changed, 14 insertions(+), 14 deletions(-)
---
base-commit: df2908090cda368b01ff43709f51890076c56157
change-id: 20260904-acpi-dma-ee1add4bae4e
Best regards,
--
Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 1/4] dmaengine: dw: use designated initializers for acpi_device_id
2026-09-16 15:27 [PATCH v3 0/4] dmaengine: use designated initializers for acpi_device_id Pawel Zalewski
@ 2026-09-16 15:27 ` Pawel Zalewski
2026-09-16 15:27 ` [PATCH v3 2/4] dmaengine: loongson: use named " Pawel Zalewski
` (3 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Pawel Zalewski @ 2026-09-16 15:27 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, Frank Li
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>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
---
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] 11+ messages in thread
* [PATCH v3 2/4] dmaengine: loongson: use named initializers for acpi_device_id
2026-09-16 15:27 [PATCH v3 0/4] dmaengine: use designated initializers for acpi_device_id Pawel Zalewski
2026-09-16 15:27 ` [PATCH v3 1/4] dmaengine: dw: " Pawel Zalewski
@ 2026-09-16 15:27 ` Pawel Zalewski
2026-09-16 15:35 ` sashiko-bot
2026-09-16 19:12 ` Frank Li
2026-09-16 15:27 ` [PATCH v3 3/4] dmaengine: qcom: " Pawel Zalewski
` (2 subsequent siblings)
4 siblings, 2 replies; 11+ messages in thread
From: Pawel Zalewski @ 2026-09-16 15:27 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.
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>
Reviewed-by: Binbin Zhou <zhoubinbin@loongson.cn>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
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] 11+ messages in thread
* [PATCH v3 3/4] dmaengine: qcom: use named initializers for acpi_device_id
2026-09-16 15:27 [PATCH v3 0/4] dmaengine: use designated initializers for acpi_device_id Pawel Zalewski
2026-09-16 15:27 ` [PATCH v3 1/4] dmaengine: dw: " Pawel Zalewski
2026-09-16 15:27 ` [PATCH v3 2/4] dmaengine: loongson: use named " Pawel Zalewski
@ 2026-09-16 15:27 ` Pawel Zalewski
2026-09-16 15:33 ` sashiko-bot
2026-09-16 19:12 ` Frank Li
2026-09-16 15:27 ` [PATCH v3 4/4] dmaengine: xgene-dma: " Pawel Zalewski
2026-10-05 15:43 ` [PATCH v3 0/4] dmaengine: use designated " Vinod Koul
4 siblings, 2 replies; 11+ messages in thread
From: Pawel Zalewski @ 2026-09-16 15:27 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.
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>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
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] 11+ messages in thread
* [PATCH v3 4/4] dmaengine: xgene-dma: use named initializers for acpi_device_id
2026-09-16 15:27 [PATCH v3 0/4] dmaengine: use designated initializers for acpi_device_id Pawel Zalewski
` (2 preceding siblings ...)
2026-09-16 15:27 ` [PATCH v3 3/4] dmaengine: qcom: " Pawel Zalewski
@ 2026-09-16 15:27 ` Pawel Zalewski
2026-09-16 19:13 ` Frank Li
2026-10-05 15:43 ` [PATCH v3 0/4] dmaengine: use designated " Vinod Koul
4 siblings, 1 reply; 11+ messages in thread
From: Pawel Zalewski @ 2026-09-16 15:27 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.
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>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
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] 11+ messages in thread
* Re: [PATCH v3 3/4] dmaengine: qcom: use named initializers for acpi_device_id
2026-09-16 15:27 ` [PATCH v3 3/4] dmaengine: qcom: " Pawel Zalewski
@ 2026-09-16 15:33 ` sashiko-bot
2026-09-16 19:12 ` Frank Li
1 sibling, 0 replies; 11+ messages in thread
From: sashiko-bot @ 2026-09-16 15:33 UTC (permalink / raw)
To: Pawel Zalewski; +Cc: Frank.Li, vkoul, dmaengine
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] dmaengine: qcom: incomplete named initializer transition in hidma_mgmt.c
--
commit 9a66310e86b837e8fbd5ab6a856a4abdb2bbb6cd
Author: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
dmaengine: qcom: use named initializers for acpi_device_id
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. Unify the list terminator to have a single space
between the brackets and no trailing comma.
> diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
> index c939635be21d2..1349066b1544d 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) },
> + { }
> };
[Severity: Low]
This isn't a bug, but did this commit miss updating a similar struct in the
same module directory?
drivers/dma/qcom/hidma_mgmt.c:hidma_mgmt_acpi_ids:
static const struct acpi_device_id hidma_mgmt_acpi_ids[] = {
{"QCOM8060"},
{},
};
This struct follows the exact same pattern, but was missed by the cleanup,
leading to inconsistent coding styles within the same directory.
> MODULE_DEVICE_TABLE(acpi, hidma_acpi_ids);
> #endif
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260916-acpi-dma-v3-0-0dac05654967@thegoodpenguin.co.uk?part=3
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 2/4] dmaengine: loongson: use named initializers for acpi_device_id
2026-09-16 15:27 ` [PATCH v3 2/4] dmaengine: loongson: use named " Pawel Zalewski
@ 2026-09-16 15:35 ` sashiko-bot
2026-09-16 19:12 ` Frank Li
1 sibling, 0 replies; 11+ messages in thread
From: sashiko-bot @ 2026-09-16 15:35 UTC (permalink / raw)
To: Pawel Zalewski; +Cc: vkoul, Frank.Li, dmaengine
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] dmaengine: loongson: incomplete unification of list terminators
--
commit 4321a78607f15fa601095e26975f8fbd9cdea572
Author: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
dmaengine: loongson: use named initializers for acpi_device_id
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.
Unify the list terminator to have a single space between the brackets and
no trailing comma.
> 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 },
> + { }
[Severity: Low]
The commit message mentions unifying the list terminator, but does this miss
the OF match table located immediately above?
drivers/dma/loongson/loongson2-apb-cmc-dma.c:
static const struct of_device_id loongson2_cmc_dma_of_match[] = {
...
{ .compatible = "loongson,ls2k3000-dma", .data = &ls2k3000_cmc_dma_config },
{ /* sentinel */ }
};
Should the list terminator here also be updated for consistency?
> };
> MODULE_DEVICE_TABLE(acpi, loongson2_cmc_dma_acpi_match);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260916-acpi-dma-v3-0-0dac05654967@thegoodpenguin.co.uk?part=2
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 2/4] dmaengine: loongson: use named initializers for acpi_device_id
2026-09-16 15:27 ` [PATCH v3 2/4] dmaengine: loongson: use named " Pawel Zalewski
2026-09-16 15:35 ` sashiko-bot
@ 2026-09-16 19:12 ` Frank Li
1 sibling, 0 replies; 11+ messages in thread
From: Frank Li @ 2026-09-16 19:12 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 Wed, Sep 16, 2026 at 04:27:55PM +0100, 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.
>
> 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>
> Reviewed-by: Binbin Zhou <zhoubinbin@loongson.cn>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> 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 [flat|nested] 11+ messages in thread
* Re: [PATCH v3 3/4] dmaengine: qcom: use named initializers for acpi_device_id
2026-09-16 15:27 ` [PATCH v3 3/4] dmaengine: qcom: " Pawel Zalewski
2026-09-16 15:33 ` sashiko-bot
@ 2026-09-16 19:12 ` Frank Li
1 sibling, 0 replies; 11+ messages in thread
From: Frank Li @ 2026-09-16 19:12 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 Wed, Sep 16, 2026 at 04:27:56PM +0100, 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.
>
> 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>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> 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] 11+ messages in thread
* Re: [PATCH v3 4/4] dmaengine: xgene-dma: use named initializers for acpi_device_id
2026-09-16 15:27 ` [PATCH v3 4/4] dmaengine: xgene-dma: " Pawel Zalewski
@ 2026-09-16 19:13 ` Frank Li
0 siblings, 0 replies; 11+ messages in thread
From: Frank Li @ 2026-09-16 19:13 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 Wed, Sep 16, 2026 at 04:27:57PM +0100, Pawel Zalewski 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.
>
> Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> 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 [flat|nested] 11+ messages in thread
* Re: [PATCH v3 0/4] dmaengine: use designated initializers for acpi_device_id
2026-09-16 15:27 [PATCH v3 0/4] dmaengine: use designated initializers for acpi_device_id Pawel Zalewski
` (3 preceding siblings ...)
2026-09-16 15:27 ` [PATCH v3 4/4] dmaengine: xgene-dma: " Pawel Zalewski
@ 2026-10-05 15:43 ` Vinod Koul
4 siblings, 0 replies; 11+ messages in thread
From: Vinod Koul @ 2026-10-05 15:43 UTC (permalink / raw)
To: Viresh Kumar, Andy Shevchenko, Frank Li, Binbin Zhou, Sinan Kaya,
Pawel Zalewski
Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm,
Frank Li
On Wed, 16 Sep 2026 16:27:53 +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 (most of the existing casts are gone),
> to improve readability and to make use intent a bit more clear:
>
> [...]
Applied, thanks!
[1/4] dmaengine: dw: use designated initializers for acpi_device_id
commit: 3a03a5866e82027c0fa96f6208721397e5a6ff78
[2/4] dmaengine: loongson: use named initializers for acpi_device_id
commit: b37c93bc1cfd0f5fb898b7943bd0c1797341a41d
[3/4] dmaengine: qcom: use named initializers for acpi_device_id
commit: db09763394959442d91d86840717412073c41abc
[4/4] dmaengine: xgene-dma: use named initializers for acpi_device_id
commit: b2c203a5878b0d3f95e4802fa01e320d317b82cf
Best regards,
--
~Vinod
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2026-10-05 15:43 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-16 15:27 [PATCH v3 0/4] dmaengine: use designated initializers for acpi_device_id Pawel Zalewski
2026-09-16 15:27 ` [PATCH v3 1/4] dmaengine: dw: " Pawel Zalewski
2026-09-16 15:27 ` [PATCH v3 2/4] dmaengine: loongson: use named " Pawel Zalewski
2026-09-16 15:35 ` sashiko-bot
2026-09-16 19:12 ` Frank Li
2026-09-16 15:27 ` [PATCH v3 3/4] dmaengine: qcom: " Pawel Zalewski
2026-09-16 15:33 ` sashiko-bot
2026-09-16 19:12 ` Frank Li
2026-09-16 15:27 ` [PATCH v3 4/4] dmaengine: xgene-dma: " Pawel Zalewski
2026-09-16 19:13 ` Frank Li
2026-10-05 15:43 ` [PATCH v3 0/4] dmaengine: use designated " Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox