Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH v1 0/4] ACPI: Use named initializers for acpi_device_id arrays
@ 2026-11-13 11:13 Uwe Kleine-König (The Capable Hub)
  2026-11-13 11:13 ` [PATCH v1 1/4] ACPI: Unify acpi_device_id list terminators Uwe Kleine-König (The Capable Hub)
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-11-13 11:13 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Uwe Kleine-König, Len Brown, Lorenzo Pieralisi, Hanjun Guo,
	Sudeep Holla, Catalin Marinas, Will Deacon, Dan Williams,
	Vishal Verma, Dave Jiang, Alison Schofield, Ira Weiny,
	Bjorn Helgaas, Zhang Rui, Mario Limonciello (AMD), Saranya Gopal,
	Gergo Koteles, Jakob Riemenschneider, Yauhen Kharuzhy,
	Pawel Zalewski, linux-acpi, linux-kernel, linux-arm-kernel,
	nvdimm, linux-pci, Kai-Heng Feng, Tony Luck, Borislav Petkov,
	Mauro Carvalho Chehab, Shuai Xue, Alexandre Belloni, Dave Hansen,
	Chu Guangqing, Andy Shevchenko, Mika Westerberg

From: Uwe Kleine-König <ukleinek@kernel.org>

Hello,

this series is about preparing drivers/acpi for a change to struct
acpi_device_id. The idea is to replace .driver_data by an anonymous
union, see
https://lore.kernel.org/all/cover.1780048925.git.u.kleine-koenig@baylibre.com/
for more details. (The linked example is about platform_device_id, I
intend to apply it acpi_device_id and several others, too.)

Before this union can be added, all initializers must use named
initializers (C99 calls them designated initializers), which IMHO is a
nice cleanup that can stand for itself as it makes the code easier to
read.

Pawel sent a similar series earlier, find it at
https://lore.kernel.org/all/20260727-acpi-refactor-v1-0-ff900aa326ee@thegoodpenguin.co.uk/.
Compared to that the patch splitting is done differently and the base
here is newer.

I checked for the other *_device_id and for these there is nothing to do
below drivers/acpi because the few instances already use named
initializers.

The last patch in this series is just some cosmetic to align the coding
style. If you consider it churn, just drop it.

It would be great to get this series in soon, as keeping it up to date
for a later resend is an annoying effort. Thanks for your cooperation.

Best regards
Uwe

Uwe Kleine-König (The Capable Hub) (4):
  ACPI: Unify acpi_device_id list terminators
  ACPI: Drop unused .driver_data initializers in acpi_device_id arrays
  ACPI: Use named initializers for acpi_device_id arrays
  ACPI: Unify *_device_id list terminators

 drivers/acpi/ac.c                       |   6 +-
 drivers/acpi/acpi_apd.c                 |  46 +--
 drivers/acpi/acpi_memhotplug.c          |   4 +-
 drivers/acpi/acpi_pad.c                 |   4 +-
 drivers/acpi/acpi_platform.c            |  12 +-
 drivers/acpi/acpi_pnp.c                 | 514 ++++++++++++------------
 drivers/acpi/acpi_processor.c           |   6 +-
 drivers/acpi/acpi_tad.c                 |   4 +-
 drivers/acpi/acpi_video.c               |   4 +-
 drivers/acpi/apei/ghes-nvidia.c         |   2 +-
 drivers/acpi/arm64/amba.c               |   6 +-
 drivers/acpi/battery.c                  |   8 +-
 drivers/acpi/bus.c                      |   2 +-
 drivers/acpi/button.c                   |  14 +-
 drivers/acpi/container.c                |   8 +-
 drivers/acpi/dptf/dptf_pch_fivr.c       |  14 +-
 drivers/acpi/dptf/dptf_power.c          |  38 +-
 drivers/acpi/ec.c                       |   8 +-
 drivers/acpi/evged.c                    |   4 +-
 drivers/acpi/fan_core.c                 |   2 +-
 drivers/acpi/hed.c                      |   4 +-
 drivers/acpi/mipi-disco-img.c           |   2 +-
 drivers/acpi/nfit/core.c                |   4 +-
 drivers/acpi/osi.c                      |   2 +-
 drivers/acpi/pci_link.c                 |   4 +-
 drivers/acpi/pci_root.c                 |   4 +-
 drivers/acpi/pci_slot.c                 |   2 +-
 drivers/acpi/pfr_telemetry.c            |   4 +-
 drivers/acpi/pfr_update.c               |   4 +-
 drivers/acpi/pmic/intel_pmic_bxtwc.c    |   2 +-
 drivers/acpi/pmic/intel_pmic_chtdc_ti.c |   2 +-
 drivers/acpi/pmic/intel_pmic_chtwc.c    |   2 +-
 drivers/acpi/power.c                    |   2 +-
 drivers/acpi/processor_driver.c         |   6 +-
 drivers/acpi/processor_idle.c           |   2 +-
 drivers/acpi/sbs.c                      |   4 +-
 drivers/acpi/sbshc.c                    |   6 +-
 drivers/acpi/scan.c                     |  48 +--
 drivers/acpi/sleep.c                    |   2 +-
 drivers/acpi/thermal.c                  |   6 +-
 drivers/acpi/tiny-power-button.c        |   6 +-
 drivers/acpi/video_detect.c             |   2 +-
 drivers/acpi/x86/blacklist.c            |   2 +-
 drivers/acpi/x86/cmos_rtc.c             |   2 +-
 drivers/acpi/x86/lpss.c                 |  58 +--
 drivers/acpi/x86/s2idle.c               |  14 +-
 drivers/acpi/x86/utils.c                |  22 +-
 include/linux/acpi.h                    |   8 +-
 48 files changed, 466 insertions(+), 466 deletions(-)


base-commit: 6d582d78fad9d828e575ca0cdcff8ea47a77220b
-- 
2.56.0.rc1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v1 1/4] ACPI: Unify acpi_device_id list terminators
  2026-11-13 11:13 [PATCH v1 0/4] ACPI: Use named initializers for acpi_device_id arrays Uwe Kleine-König (The Capable Hub)
@ 2026-11-13 11:13 ` Uwe Kleine-König (The Capable Hub)
  2026-11-13 11:20   ` sashiko-bot
  2026-11-13 11:13 ` [PATCH v1 2/4] ACPI: Drop unused .driver_data initializers in acpi_device_id arrays Uwe Kleine-König (The Capable Hub)
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-11-13 11:13 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Len Brown, Lorenzo Pieralisi, Hanjun Guo, Sudeep Holla,
	Catalin Marinas, Will Deacon, Dan Williams, Vishal Verma,
	Dave Jiang, Alison Schofield, Ira Weiny, Bjorn Helgaas, Zhang Rui,
	Mario Limonciello (AMD), Saranya Gopal, Gergo Koteles,
	Jakob Riemenschneider, Yauhen Kharuzhy, Pawel Zalewski,
	linux-acpi, linux-kernel, linux-arm-kernel, nvdimm, linux-pci

Consistenly use an empty initializer with no trailing , for the list
terminator. This doesn't introduce any changes to the compiled result of
the modified drivers. Note that the first member of struct
acpi_device_id is a char[] and not a pointer, so an explicit "" is
eqivalent to the default initialisation.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
 drivers/acpi/ac.c                 | 2 +-
 drivers/acpi/acpi_memhotplug.c    | 2 +-
 drivers/acpi/acpi_pad.c           | 2 +-
 drivers/acpi/acpi_pnp.c           | 2 +-
 drivers/acpi/acpi_tad.c           | 2 +-
 drivers/acpi/arm64/amba.c         | 2 +-
 drivers/acpi/battery.c            | 2 +-
 drivers/acpi/button.c             | 2 +-
 drivers/acpi/container.c          | 2 +-
 drivers/acpi/dptf/dptf_pch_fivr.c | 2 +-
 drivers/acpi/dptf/dptf_power.c    | 2 +-
 drivers/acpi/ec.c                 | 2 +-
 drivers/acpi/evged.c              | 2 +-
 drivers/acpi/fan_core.c           | 2 +-
 drivers/acpi/hed.c                | 2 +-
 drivers/acpi/nfit/core.c          | 2 +-
 drivers/acpi/pci_link.c           | 2 +-
 drivers/acpi/pci_root.c           | 2 +-
 drivers/acpi/pfr_telemetry.c      | 2 +-
 drivers/acpi/pfr_update.c         | 2 +-
 drivers/acpi/processor_driver.c   | 2 +-
 drivers/acpi/sbs.c                | 2 +-
 drivers/acpi/sbshc.c              | 2 +-
 drivers/acpi/scan.c               | 8 ++++----
 drivers/acpi/thermal.c            | 2 +-
 drivers/acpi/tiny-power-button.c  | 2 +-
 drivers/acpi/x86/s2idle.c         | 4 ++--
 drivers/acpi/x86/utils.c          | 4 ++--
 include/linux/acpi.h              | 2 +-
 29 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index 14a06c9c6380..f629fcd662f9 100644
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -33,7 +33,7 @@ MODULE_LICENSE("GPL");
 
 static const struct acpi_device_id ac_device_ids[] = {
 	{"ACPI0003", 0},
-	{"", 0},
+	{ }
 };
 MODULE_DEVICE_TABLE(acpi, ac_device_ids);
 
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index 1d7dfe4ee9a6..bb1c380b1ffb 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -22,7 +22,7 @@
 
 static const struct acpi_device_id memory_device_ids[] = {
 	{ACPI_MEMORY_DEVICE_HID, 0},
-	{"", 0},
+	{ }
 };
 
 #ifdef CONFIG_ACPI_HOTPLUG_MEMORY
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c
index dc6d0091d17c..edd4226a353e 100644
--- a/drivers/acpi/acpi_pad.c
+++ b/drivers/acpi/acpi_pad.c
@@ -439,7 +439,7 @@ static void acpi_pad_remove(struct platform_device *pdev)
 
 static const struct acpi_device_id pad_device_ids[] = {
 	{"ACPI000C", 0},
-	{"", 0},
+	{ }
 };
 MODULE_DEVICE_TABLE(acpi, pad_device_ids);
 
diff --git a/drivers/acpi/acpi_pnp.c b/drivers/acpi/acpi_pnp.c
index da886923b008..ea9858e00238 100644
--- a/drivers/acpi/acpi_pnp.c
+++ b/drivers/acpi/acpi_pnp.c
@@ -301,7 +301,7 @@ static const struct acpi_device_id acpi_pnp_device_ids[] = {
 	/* snd-opl3sa2-pnpbios */
 	{"YMH0021"},
 	{"NMX2210"},		/* Gateway Solo 2500 */
-	{""},
+	{ }
 };
 
 static bool matching_id(const char *idstr, const char *list_id)
diff --git a/drivers/acpi/acpi_tad.c b/drivers/acpi/acpi_tad.c
index 5fcb0bee3710..bd8bdf7b1a4f 100644
--- a/drivers/acpi/acpi_tad.c
+++ b/drivers/acpi/acpi_tad.c
@@ -896,7 +896,7 @@ static int acpi_tad_probe(struct platform_device *pdev)
 
 static const struct acpi_device_id acpi_tad_ids[] = {
 	{"ACPI000E", 0},
-	{}
+	{ }
 };
 
 static struct platform_driver acpi_tad_driver = {
diff --git a/drivers/acpi/arm64/amba.c b/drivers/acpi/arm64/amba.c
index 7ee431d9464a..34381ca72add 100644
--- a/drivers/acpi/arm64/amba.c
+++ b/drivers/acpi/arm64/amba.c
@@ -22,7 +22,7 @@
 static const struct acpi_device_id amba_id_list[] = {
 	{"ARMH0061", 0}, /* PL061 GPIO Device */
 	{"ARMH0330", 0}, /* ARM DMA Controller DMA-330 */
-	{"", 0},
+	{ }
 };
 
 static void amba_register_dummy_clk(void)
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 1db23627addf..29432de93fc6 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -68,7 +68,7 @@ static const struct acpi_device_id battery_device_ids[] = {
 	/* Microsoft Surface Go 3 */
 	{"MSHW0146", 0},
 
-	{"", 0},
+	{ }
 };
 
 MODULE_DEVICE_TABLE(acpi, battery_device_ids);
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 91a4e9698f7a..73a9efe07160 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -65,7 +65,7 @@ static const struct acpi_device_id button_device_ids[] = {
 	{ACPI_BUTTON_HID_SLEEPF, ACPI_BUTTON_TYPE_SLEEP},
 	{ACPI_BUTTON_HID_POWER, ACPI_BUTTON_TYPE_POWER},
 	{ACPI_BUTTON_HID_POWERF, ACPI_BUTTON_TYPE_POWER},
-	{"", 0},
+	{ }
 };
 MODULE_DEVICE_TABLE(acpi, button_device_ids);
 
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c
index f138a433554a..3a3b18d62a93 100644
--- a/drivers/acpi/container.c
+++ b/drivers/acpi/container.c
@@ -18,7 +18,7 @@ static const struct acpi_device_id container_device_ids[] = {
 	{"ACPI0004", 0},
 	{"PNP0A05", 0},
 	{"PNP0A06", 0},
-	{"", 0},
+	{ }
 };
 
 #ifdef CONFIG_ACPI_CONTAINER
diff --git a/drivers/acpi/dptf/dptf_pch_fivr.c b/drivers/acpi/dptf/dptf_pch_fivr.c
index 8d7e555929d3..1e41bea6e00d 100644
--- a/drivers/acpi/dptf/dptf_pch_fivr.c
+++ b/drivers/acpi/dptf/dptf_pch_fivr.c
@@ -153,7 +153,7 @@ static const struct acpi_device_id pch_fivr_device_ids[] = {
 	{"INTC106B", 0},
 	{"INTC10A3", 0},
 	{"INTC10D7", 0},
-	{"", 0},
+	{ }
 };
 MODULE_DEVICE_TABLE(acpi, pch_fivr_device_ids);
 
diff --git a/drivers/acpi/dptf/dptf_power.c b/drivers/acpi/dptf/dptf_power.c
index 55ccbb8ddbe3..5b2f2cf13b5b 100644
--- a/drivers/acpi/dptf/dptf_power.c
+++ b/drivers/acpi/dptf/dptf_power.c
@@ -242,7 +242,7 @@ static const struct acpi_device_id int3407_device_ids[] = {
 	{"INTC1101", 0},
 	{"INTC10F7", 0},
 	{"INTC10F8", 0},
-	{"", 0},
+	{ }
 };
 MODULE_DEVICE_TABLE(acpi, int3407_device_ids);
 
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index db24a9a252a8..611c616f4927 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -1808,7 +1808,7 @@ ec_parse_io_ports(struct acpi_resource *resource, void *context)
 static const struct acpi_device_id ec_device_ids[] = {
 	{"PNP0C09", 0},
 	{ACPI_ECDT_HID, 0},
-	{"", 0},
+	{ }
 };
 
 /*
diff --git a/drivers/acpi/evged.c b/drivers/acpi/evged.c
index b79ee3f5c1c3..e8c60f902846 100644
--- a/drivers/acpi/evged.c
+++ b/drivers/acpi/evged.c
@@ -180,7 +180,7 @@ static void ged_remove(struct platform_device *pdev)
 
 static const struct acpi_device_id ged_acpi_ids[] = {
 	{"ACPI0013"},
-	{},
+	{ }
 };
 
 static struct platform_driver ged_driver = {
diff --git a/drivers/acpi/fan_core.c b/drivers/acpi/fan_core.c
index 4324ff5d9c4c..0f128e41d3ad 100644
--- a/drivers/acpi/fan_core.c
+++ b/drivers/acpi/fan_core.c
@@ -46,7 +46,7 @@ MODULE_PARM_DESC(min_trip_distance, "Minimum distance between fan speed trip poi
 
 static const struct acpi_device_id fan_device_ids[] = {
 	ACPI_FAN_DEVICE_IDS,
-	{"", 0},
+	{ }
 };
 MODULE_DEVICE_TABLE(acpi, fan_device_ids);
 
diff --git a/drivers/acpi/hed.c b/drivers/acpi/hed.c
index 48562f53d3ab..e5de7980c866 100644
--- a/drivers/acpi/hed.c
+++ b/drivers/acpi/hed.c
@@ -18,7 +18,7 @@
 
 static const struct acpi_device_id acpi_hed_ids[] = {
 	{"PNP0C33", 0},
-	{"", 0},
+	{ }
 };
 MODULE_DEVICE_TABLE(acpi, acpi_hed_ids);
 
diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
index 591d2608374f..e62274b0ff38 100644
--- a/drivers/acpi/nfit/core.c
+++ b/drivers/acpi/nfit/core.c
@@ -3514,7 +3514,7 @@ EXPORT_SYMBOL_GPL(__acpi_nfit_notify);
 
 static const struct acpi_device_id acpi_nfit_ids[] = {
 	{ "ACPI0012", 0 },
-	{ "", 0 },
+	{ }
 };
 MODULE_DEVICE_TABLE(acpi, acpi_nfit_ids);
 
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index 84bfcdf242dd..71ff2269e218 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -37,7 +37,7 @@ static void acpi_pci_link_remove(struct acpi_device *device);
 
 static const struct acpi_device_id link_device_ids[] = {
 	{"PNP0C0F", 0},
-	{"", 0},
+	{ }
 };
 
 static struct acpi_scan_handler pci_link_handler = {
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 89c389a8b7a3..5ca57f6c9ea8 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -42,7 +42,7 @@ static int acpi_pci_root_scan_dependent(struct acpi_device *adev)
 
 static const struct acpi_device_id root_device_ids[] = {
 	{"PNP0A03", 0},
-	{"", 0},
+	{ }
 };
 
 static struct acpi_scan_handler pci_root_handler = {
diff --git a/drivers/acpi/pfr_telemetry.c b/drivers/acpi/pfr_telemetry.c
index 458cb99ae216..818359e21d1a 100644
--- a/drivers/acpi/pfr_telemetry.c
+++ b/drivers/acpi/pfr_telemetry.c
@@ -416,7 +416,7 @@ static int acpi_pfrt_log_probe(struct platform_device *pdev)
 
 static const struct acpi_device_id acpi_pfrt_log_ids[] = {
 	{"INTC1081"},
-	{}
+	{ }
 };
 MODULE_DEVICE_TABLE(acpi, acpi_pfrt_log_ids);
 
diff --git a/drivers/acpi/pfr_update.c b/drivers/acpi/pfr_update.c
index 459c2938b975..993ab5a479f5 100644
--- a/drivers/acpi/pfr_update.c
+++ b/drivers/acpi/pfr_update.c
@@ -595,7 +595,7 @@ static int acpi_pfru_probe(struct platform_device *pdev)
 
 static const struct acpi_device_id acpi_pfru_ids[] = {
 	{"INTC1080"},
-	{}
+	{ }
 };
 MODULE_DEVICE_TABLE(acpi, acpi_pfru_ids);
 
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
index bdd1529d79f0..adde2a441373 100644
--- a/drivers/acpi/processor_driver.c
+++ b/drivers/acpi/processor_driver.c
@@ -38,7 +38,7 @@ static int acpi_processor_stop(struct device *dev);
 static const struct acpi_device_id processor_device_ids[] = {
 	{ACPI_PROCESSOR_OBJECT_HID, 0},
 	{ACPI_PROCESSOR_DEVICE_HID, 0},
-	{"", 0},
+	{ }
 };
 MODULE_DEVICE_TABLE(acpi, processor_device_ids);
 
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index 861739b18e01..d528ae5606a6 100644
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -46,7 +46,7 @@ MODULE_PARM_DESC(cache_time, "cache time in milliseconds");
 
 static const struct acpi_device_id sbs_device_ids[] = {
 	{"ACPI0002", 0},
-	{"", 0},
+	{ }
 };
 MODULE_DEVICE_TABLE(acpi, sbs_device_ids);
 
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
index c0ffa267f96c..bfc6098b5fed 100644
--- a/drivers/acpi/sbshc.c
+++ b/drivers/acpi/sbshc.c
@@ -35,7 +35,7 @@ static void acpi_smbus_hc_remove(struct platform_device *pdev);
 static const struct acpi_device_id sbs_device_ids[] = {
 	{"ACPI0001", 0},
 	{"ACPI0005", 0},
-	{"", 0},
+	{ }
 };
 
 MODULE_DEVICE_TABLE(acpi, sbs_device_ids);
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 9218264f8da1..7cd13e77497e 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1077,7 +1077,7 @@ static bool acpi_wakeup_gpe_init(struct acpi_device *device)
 	static const struct acpi_device_id button_device_ids[] = {
 		{"PNP0C0D", 0},	/* Lid */
 		{"PNP0C0E", 0},	/* Sleep button */
-		{"", 0},
+		{ }
 	};
 	struct acpi_device_wakeup *wakeup = &device->wakeup;
 	const struct acpi_device_id *match;
@@ -1801,7 +1801,7 @@ static bool acpi_is_indirect_io_slave(struct acpi_device *device)
 	struct acpi_device *parent = acpi_dev_parent(device);
 	static const struct acpi_device_id indirect_io_hosts[] = {
 		{"HISI0191", 0},
-		{}
+		{ }
 	};
 
 	return parent && !acpi_match_device_ids(parent, indirect_io_hosts);
@@ -1848,7 +1848,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
 	 */
 		{"BCM4752", },
 		{"LNV4752", },
-		{}
+		{ }
 	};
 
 	if (acpi_is_indirect_io_slave(device))
@@ -2356,7 +2356,7 @@ static void acpi_default_enumeration(struct acpi_device *device)
 
 static const struct acpi_device_id generic_device_ids[] = {
 	{ACPI_DT_NAMESPACE_HID, },
-	{"", },
+	{ }
 };
 
 static int acpi_generic_device_attach(struct acpi_device *adev,
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 13e9a3a79d92..b6808eee1e69 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -926,7 +926,7 @@ static const struct dev_pm_ops acpi_thermal_pm_ops = {
 
 static const struct acpi_device_id  thermal_device_ids[] = {
 	{ACPI_THERMAL_HID, 0},
-	{"", 0},
+	{ }
 };
 MODULE_DEVICE_TABLE(acpi, thermal_device_ids);
 
diff --git a/drivers/acpi/tiny-power-button.c b/drivers/acpi/tiny-power-button.c
index 92516ef84b02..4dcaf6a96f84 100644
--- a/drivers/acpi/tiny-power-button.c
+++ b/drivers/acpi/tiny-power-button.c
@@ -16,7 +16,7 @@ MODULE_PARM_DESC(power_signal, "Power button sends this signal to init");
 static const struct acpi_device_id tiny_power_button_device_ids[] = {
 	{ ACPI_BUTTON_HID_POWER, 0 },
 	{ ACPI_BUTTON_HID_POWERF, 0 },
-	{ "", 0 },
+	{ }
 };
 MODULE_DEVICE_TABLE(acpi, tiny_power_button_device_ids);
 
diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c
index b79bf0fa9a7f..74e36c6365dc 100644
--- a/drivers/acpi/x86/s2idle.c
+++ b/drivers/acpi/x86/s2idle.c
@@ -123,7 +123,7 @@ MODULE_PARM_DESC(check_lps0_constraints, "Check LPS0 device constraints");
 
 static const struct acpi_device_id lps0_device_ids[] = {
 	{"PNP0D80", },
-	{"", },
+	{ }
 };
 
 /* Microsoft platform agnostic UUID */
@@ -524,7 +524,7 @@ static const struct acpi_device_id amd_hid_ids[] = {
 	{"AMD0005",	(kernel_ulong_t)&amd_picasso,	},
 	{"AMDI0005",	(kernel_ulong_t)&amd_picasso,	},
 	{"AMDI0006",	(kernel_ulong_t)&amd_cezanne,	},
-	{}
+	{ }
 };
 
 static int lps0_device_attach(struct acpi_device *adev,
diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c
index 418951639f51..3444b96a2c20 100644
--- a/drivers/acpi/x86/utils.c
+++ b/drivers/acpi/x86/utils.c
@@ -47,7 +47,7 @@ struct override_status_id {
 };
 
 #define ENTRY(status, hid, uid, path, cpu_vfm, dmi...) {		\
-	{ { hid, }, {} },						\
+	{ { hid, }, { } },						\
 	{ X86_MATCH_VFM(cpu_vfm, NULL), {} },				\
 	{ { .matches = dmi }, {} },					\
 	uid,								\
@@ -470,7 +470,7 @@ static const struct acpi_device_id i2c_acpi_known_good_ids[] = {
 	{ "INT33FD", 0 },  /* Intel Crystal Cove PMIC */
 	{ "INT34D3", 0 },  /* Intel Whiskey Cove PMIC */
 	{ "NPCE69A", 0 },  /* Asus Transformer keyboard dock */
-	{}
+	{ }
 };
 
 bool acpi_quirk_skip_i2c_client_enumeration(struct acpi_device *adev)
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 9d3f039ebd94..aed3ddb388c0 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -831,7 +831,7 @@ int acpi_mrrm_max_mem_region(void);
 	{ "PNP0B00", },		\
 	{ "PNP0B01", },		\
 	{ "PNP0B02", },		\
-	{ "", }
+	{ }
 
 extern bool cmos_rtc_platform_device_present;
 
-- 
2.56.0.rc1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v1 2/4] ACPI: Drop unused .driver_data initializers in acpi_device_id arrays
  2026-11-13 11:13 [PATCH v1 0/4] ACPI: Use named initializers for acpi_device_id arrays Uwe Kleine-König (The Capable Hub)
  2026-11-13 11:13 ` [PATCH v1 1/4] ACPI: Unify acpi_device_id list terminators Uwe Kleine-König (The Capable Hub)
@ 2026-11-13 11:13 ` Uwe Kleine-König (The Capable Hub)
  2026-11-13 11:17   ` sashiko-bot
  2026-11-13 11:14 ` [PATCH v1 4/4] ACPI: Unify *_device_id list terminators Uwe Kleine-König (The Capable Hub)
  2026-11-13 16:17 ` [PATCH v1 0/4] ACPI: Use named initializers for acpi_device_id arrays Rafael J. Wysocki (Intel)
  3 siblings, 1 reply; 8+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-11-13 11:13 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Uwe Kleine-König (The Capable Hub), Len Brown,
	Lorenzo Pieralisi, Hanjun Guo, Sudeep Holla, Catalin Marinas,
	Will Deacon, Dan Williams, Vishal Verma, Dave Jiang,
	Alison Schofield, Ira Weiny, Bjorn Helgaas, Zhang Rui,
	Yauhen Kharuzhy, Pawel Zalewski, linux-acpi, linux-kernel,
	linux-arm-kernel, nvdimm, linux-pci

From: Uwe Kleine-König (The Capable Hub) <ukleinek@kernel.org>

Many drivers explicitly initialize the .driver_data member in their
acpi_device_id arrays without actually using that value. Drop these
assignments and while touching these lines use named initializers for
.id and use consistent spacing.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
 drivers/acpi/ac.c                 |  2 +-
 drivers/acpi/acpi_memhotplug.c    |  2 +-
 drivers/acpi/acpi_pad.c           |  2 +-
 drivers/acpi/acpi_tad.c           |  2 +-
 drivers/acpi/arm64/amba.c         |  4 ++--
 drivers/acpi/battery.c            |  4 ++--
 drivers/acpi/container.c          |  6 +++---
 drivers/acpi/dptf/dptf_pch_fivr.c | 12 +++++------
 drivers/acpi/dptf/dptf_power.c    | 36 +++++++++++++++----------------
 drivers/acpi/ec.c                 |  4 ++--
 drivers/acpi/hed.c                |  2 +-
 drivers/acpi/nfit/core.c          |  2 +-
 drivers/acpi/pci_link.c           |  2 +-
 drivers/acpi/pci_root.c           |  2 +-
 drivers/acpi/processor_driver.c   |  4 ++--
 drivers/acpi/sbs.c                |  2 +-
 drivers/acpi/sbshc.c              |  4 ++--
 drivers/acpi/scan.c               |  6 +++---
 drivers/acpi/thermal.c            |  2 +-
 drivers/acpi/tiny-power-button.c  |  4 ++--
 drivers/acpi/x86/utils.c          | 14 ++++++------
 21 files changed, 59 insertions(+), 59 deletions(-)

diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index f629fcd662f9..168e1d495b7b 100644
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -32,7 +32,7 @@ MODULE_DESCRIPTION("ACPI AC Adapter Driver");
 MODULE_LICENSE("GPL");
 
 static const struct acpi_device_id ac_device_ids[] = {
-	{"ACPI0003", 0},
+	{ .id = "ACPI0003" },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, ac_device_ids);
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index bb1c380b1ffb..cf27765ed4d7 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -21,7 +21,7 @@
 #define ACPI_MEMORY_DEVICE_HID			"PNP0C80"
 
 static const struct acpi_device_id memory_device_ids[] = {
-	{ACPI_MEMORY_DEVICE_HID, 0},
+	{ .id = ACPI_MEMORY_DEVICE_HID },
 	{ }
 };
 
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c
index edd4226a353e..9af3b8bce686 100644
--- a/drivers/acpi/acpi_pad.c
+++ b/drivers/acpi/acpi_pad.c
@@ -438,7 +438,7 @@ static void acpi_pad_remove(struct platform_device *pdev)
 }
 
 static const struct acpi_device_id pad_device_ids[] = {
-	{"ACPI000C", 0},
+	{ .id = "ACPI000C" },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, pad_device_ids);
diff --git a/drivers/acpi/acpi_tad.c b/drivers/acpi/acpi_tad.c
index bd8bdf7b1a4f..15fe05cd7514 100644
--- a/drivers/acpi/acpi_tad.c
+++ b/drivers/acpi/acpi_tad.c
@@ -895,7 +895,7 @@ static int acpi_tad_probe(struct platform_device *pdev)
 }
 
 static const struct acpi_device_id acpi_tad_ids[] = {
-	{"ACPI000E", 0},
+	{ .id = "ACPI000E" },
 	{ }
 };
 
diff --git a/drivers/acpi/arm64/amba.c b/drivers/acpi/arm64/amba.c
index 34381ca72add..0e037f0ebc62 100644
--- a/drivers/acpi/arm64/amba.c
+++ b/drivers/acpi/arm64/amba.c
@@ -20,8 +20,8 @@
 #include "init.h"
 
 static const struct acpi_device_id amba_id_list[] = {
-	{"ARMH0061", 0}, /* PL061 GPIO Device */
-	{"ARMH0330", 0}, /* ARM DMA Controller DMA-330 */
+	{ .id = "ARMH0061" }, /* PL061 GPIO Device */
+	{ .id = "ARMH0330" }, /* ARM DMA Controller DMA-330 */
 	{ }
 };
 
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 29432de93fc6..8b1b66cf5369 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -63,10 +63,10 @@ module_param(cache_time, uint, 0644);
 MODULE_PARM_DESC(cache_time, "cache time in milliseconds");
 
 static const struct acpi_device_id battery_device_ids[] = {
-	{"PNP0C0A", 0},
+	{ .id = "PNP0C0A" },
 
 	/* Microsoft Surface Go 3 */
-	{"MSHW0146", 0},
+	{ .id = "MSHW0146" },
 
 	{ }
 };
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c
index 3a3b18d62a93..9997915233e1 100644
--- a/drivers/acpi/container.c
+++ b/drivers/acpi/container.c
@@ -15,9 +15,9 @@
 #include "internal.h"
 
 static const struct acpi_device_id container_device_ids[] = {
-	{"ACPI0004", 0},
-	{"PNP0A05", 0},
-	{"PNP0A06", 0},
+	{ .id = "ACPI0004" },
+	{ .id = "PNP0A05" },
+	{ .id = "PNP0A06" },
 	{ }
 };
 
diff --git a/drivers/acpi/dptf/dptf_pch_fivr.c b/drivers/acpi/dptf/dptf_pch_fivr.c
index 1e41bea6e00d..d23867f70b28 100644
--- a/drivers/acpi/dptf/dptf_pch_fivr.c
+++ b/drivers/acpi/dptf/dptf_pch_fivr.c
@@ -147,12 +147,12 @@ static void pch_fivr_remove(struct platform_device *pdev)
 }
 
 static const struct acpi_device_id pch_fivr_device_ids[] = {
-	{"INTC1045", 0},
-	{"INTC1049", 0},
-	{"INTC1064", 0},
-	{"INTC106B", 0},
-	{"INTC10A3", 0},
-	{"INTC10D7", 0},
+	{ .id = "INTC1045" },
+	{ .id = "INTC1049" },
+	{ .id = "INTC1064" },
+	{ .id = "INTC106B" },
+	{ .id = "INTC10A3" },
+	{ .id = "INTC10D7" },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, pch_fivr_device_ids);
diff --git a/drivers/acpi/dptf/dptf_power.c b/drivers/acpi/dptf/dptf_power.c
index 5b2f2cf13b5b..065831bce8c0 100644
--- a/drivers/acpi/dptf/dptf_power.c
+++ b/drivers/acpi/dptf/dptf_power.c
@@ -224,24 +224,24 @@ static void dptf_power_remove(struct platform_device *pdev)
 }
 
 static const struct acpi_device_id int3407_device_ids[] = {
-	{"INT3407", 0},
-	{"INT3532", 0},
-	{"INTC1047", 0},
-	{"INTC1050", 0},
-	{"INTC1060", 0},
-	{"INTC1061", 0},
-	{"INTC1065", 0},
-	{"INTC1066", 0},
-	{"INTC106C", 0},
-	{"INTC106D", 0},
-	{"INTC10A4", 0},
-	{"INTC10A5", 0},
-	{"INTC10D8", 0},
-	{"INTC10D9", 0},
-	{"INTC1100", 0},
-	{"INTC1101", 0},
-	{"INTC10F7", 0},
-	{"INTC10F8", 0},
+	{ .id = "INT3407" },
+	{ .id = "INT3532" },
+	{ .id = "INTC1047" },
+	{ .id = "INTC1050" },
+	{ .id = "INTC1060" },
+	{ .id = "INTC1061" },
+	{ .id = "INTC1065" },
+	{ .id = "INTC1066" },
+	{ .id = "INTC106C" },
+	{ .id = "INTC106D" },
+	{ .id = "INTC10A4" },
+	{ .id = "INTC10A5" },
+	{ .id = "INTC10D8" },
+	{ .id = "INTC10D9" },
+	{ .id = "INTC1100" },
+	{ .id = "INTC1101" },
+	{ .id = "INTC10F7" },
+	{ .id = "INTC10F8" },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, int3407_device_ids);
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 611c616f4927..d947118657a8 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -1806,8 +1806,8 @@ ec_parse_io_ports(struct acpi_resource *resource, void *context)
 }
 
 static const struct acpi_device_id ec_device_ids[] = {
-	{"PNP0C09", 0},
-	{ACPI_ECDT_HID, 0},
+	{ .id = "PNP0C09" },
+	{ .id = ACPI_ECDT_HID },
 	{ }
 };
 
diff --git a/drivers/acpi/hed.c b/drivers/acpi/hed.c
index e5de7980c866..6789ec567d21 100644
--- a/drivers/acpi/hed.c
+++ b/drivers/acpi/hed.c
@@ -17,7 +17,7 @@
 #include <acpi/hed.h>
 
 static const struct acpi_device_id acpi_hed_ids[] = {
-	{"PNP0C33", 0},
+	{ .id = "PNP0C33" },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, acpi_hed_ids);
diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
index e62274b0ff38..81f6a825f5df 100644
--- a/drivers/acpi/nfit/core.c
+++ b/drivers/acpi/nfit/core.c
@@ -3513,7 +3513,7 @@ void __acpi_nfit_notify(struct device *dev, acpi_handle handle, u32 event)
 EXPORT_SYMBOL_GPL(__acpi_nfit_notify);
 
 static const struct acpi_device_id acpi_nfit_ids[] = {
-	{ "ACPI0012", 0 },
+	{ .id = "ACPI0012" },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, acpi_nfit_ids);
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index 71ff2269e218..492c7dd2d5de 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -36,7 +36,7 @@ static int acpi_pci_link_add(struct acpi_device *device,
 static void acpi_pci_link_remove(struct acpi_device *device);
 
 static const struct acpi_device_id link_device_ids[] = {
-	{"PNP0C0F", 0},
+	{ .id = "PNP0C0F" },
 	{ }
 };
 
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 5ca57f6c9ea8..bb862c89daee 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -41,7 +41,7 @@ static int acpi_pci_root_scan_dependent(struct acpi_device *adev)
 				| OSC_PCI_MSI_SUPPORT)
 
 static const struct acpi_device_id root_device_ids[] = {
-	{"PNP0A03", 0},
+	{ .id = "PNP0A03" },
 	{ }
 };
 
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
index adde2a441373..87197ba7976b 100644
--- a/drivers/acpi/processor_driver.c
+++ b/drivers/acpi/processor_driver.c
@@ -36,8 +36,8 @@ MODULE_LICENSE("GPL");
 static int acpi_processor_stop(struct device *dev);
 
 static const struct acpi_device_id processor_device_ids[] = {
-	{ACPI_PROCESSOR_OBJECT_HID, 0},
-	{ACPI_PROCESSOR_DEVICE_HID, 0},
+	{ .id = ACPI_PROCESSOR_OBJECT_HID },
+	{ .id = ACPI_PROCESSOR_DEVICE_HID },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, processor_device_ids);
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index d528ae5606a6..5f3eb26b133a 100644
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -45,7 +45,7 @@ MODULE_PARM_DESC(cache_time, "cache time in milliseconds");
 #define ACPI_SBS_BLOCK_MAX		32
 
 static const struct acpi_device_id sbs_device_ids[] = {
-	{"ACPI0002", 0},
+	{ .id = "ACPI0002" },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, sbs_device_ids);
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
index bfc6098b5fed..ac628212c048 100644
--- a/drivers/acpi/sbshc.c
+++ b/drivers/acpi/sbshc.c
@@ -33,8 +33,8 @@ static int acpi_smbus_hc_probe(struct platform_device *pdev);
 static void acpi_smbus_hc_remove(struct platform_device *pdev);
 
 static const struct acpi_device_id sbs_device_ids[] = {
-	{"ACPI0001", 0},
-	{"ACPI0005", 0},
+	{ .id = "ACPI0001" },
+	{ .id = "ACPI0005" },
 	{ }
 };
 
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 7cd13e77497e..913da04062b7 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1075,8 +1075,8 @@ static int acpi_bus_extract_wakeup_device_power_package(struct acpi_device *dev)
 static bool acpi_wakeup_gpe_init(struct acpi_device *device)
 {
 	static const struct acpi_device_id button_device_ids[] = {
-		{"PNP0C0D", 0},	/* Lid */
-		{"PNP0C0E", 0},	/* Sleep button */
+		{ .id = "PNP0C0D" },	/* Lid */
+		{ .id = "PNP0C0E" },	/* Sleep button */
 		{ }
 	};
 	struct acpi_device_wakeup *wakeup = &device->wakeup;
@@ -1800,7 +1800,7 @@ static bool acpi_is_indirect_io_slave(struct acpi_device *device)
 {
 	struct acpi_device *parent = acpi_dev_parent(device);
 	static const struct acpi_device_id indirect_io_hosts[] = {
-		{"HISI0191", 0},
+		{ .id = "HISI0191" },
 		{ }
 	};
 
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index b6808eee1e69..da631bbe8ea2 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -925,7 +925,7 @@ static const struct dev_pm_ops acpi_thermal_pm_ops = {
 #endif /* CONFIG_PM_SLEEP */
 
 static const struct acpi_device_id  thermal_device_ids[] = {
-	{ACPI_THERMAL_HID, 0},
+	{ .id = ACPI_THERMAL_HID },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, thermal_device_ids);
diff --git a/drivers/acpi/tiny-power-button.c b/drivers/acpi/tiny-power-button.c
index 4dcaf6a96f84..5acb53090ff3 100644
--- a/drivers/acpi/tiny-power-button.c
+++ b/drivers/acpi/tiny-power-button.c
@@ -14,8 +14,8 @@ module_param(power_signal, int, 0644);
 MODULE_PARM_DESC(power_signal, "Power button sends this signal to init");
 
 static const struct acpi_device_id tiny_power_button_device_ids[] = {
-	{ ACPI_BUTTON_HID_POWER, 0 },
-	{ ACPI_BUTTON_HID_POWERF, 0 },
+	{ .id = ACPI_BUTTON_HID_POWER },
+	{ .id = ACPI_BUTTON_HID_POWERF },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, tiny_power_button_device_ids);
diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c
index 3444b96a2c20..32c74864226f 100644
--- a/drivers/acpi/x86/utils.c
+++ b/drivers/acpi/x86/utils.c
@@ -463,13 +463,13 @@ static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
 
 #if IS_ENABLED(CONFIG_X86_ANDROID_TABLETS)
 static const struct acpi_device_id i2c_acpi_known_good_ids[] = {
-	{ "10EC5640", 0 }, /* RealTek ALC5640 audio codec */
-	{ "10EC5651", 0 }, /* RealTek ALC5651 audio codec */
-	{ "INT33F4", 0 },  /* X-Powers AXP288 PMIC */
-	{ "INT33F5", 0 },  /* TI Dollar Cove PMIC */
-	{ "INT33FD", 0 },  /* Intel Crystal Cove PMIC */
-	{ "INT34D3", 0 },  /* Intel Whiskey Cove PMIC */
-	{ "NPCE69A", 0 },  /* Asus Transformer keyboard dock */
+	{ .id = "10EC5640" }, /* RealTek ALC5640 audio codec */
+	{ .id = "10EC5651" }, /* RealTek ALC5651 audio codec */
+	{ .id = "INT33F4" },  /* X-Powers AXP288 PMIC */
+	{ .id = "INT33F5" },  /* TI Dollar Cove PMIC */
+	{ .id = "INT33FD" },  /* Intel Crystal Cove PMIC */
+	{ .id = "INT34D3" },  /* Intel Whiskey Cove PMIC */
+	{ .id = "NPCE69A" },  /* Asus Transformer keyboard dock */
 	{ }
 };
 
-- 
2.56.0.rc1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v1 4/4] ACPI: Unify *_device_id list terminators
  2026-11-13 11:13 [PATCH v1 0/4] ACPI: Use named initializers for acpi_device_id arrays Uwe Kleine-König (The Capable Hub)
  2026-11-13 11:13 ` [PATCH v1 1/4] ACPI: Unify acpi_device_id list terminators Uwe Kleine-König (The Capable Hub)
  2026-11-13 11:13 ` [PATCH v1 2/4] ACPI: Drop unused .driver_data initializers in acpi_device_id arrays Uwe Kleine-König (The Capable Hub)
@ 2026-11-13 11:14 ` Uwe Kleine-König (The Capable Hub)
  2026-11-13 11:20   ` sashiko-bot
  2026-11-13 16:17 ` [PATCH v1 0/4] ACPI: Use named initializers for acpi_device_id arrays Rafael J. Wysocki (Intel)
  3 siblings, 1 reply; 8+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-11-13 11:14 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Len Brown, Bjorn Helgaas, Andy Shevchenko, Mika Westerberg,
	Zhang Rui, Chu Guangqing, Pawel Zalewski, Yauhen Kharuzhy,
	linux-acpi, linux-kernel, linux-pci

Consistenly use a single space and no trailing , for the list
terminator. This doesn't introduce any changes to the compiled result of
the modified drivers and just aligns these to the common style of the
other device_id arrays.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
 drivers/acpi/ac.c                       | 2 +-
 drivers/acpi/acpi_video.c               | 4 ++--
 drivers/acpi/battery.c                  | 2 +-
 drivers/acpi/bus.c                      | 2 +-
 drivers/acpi/button.c                   | 2 +-
 drivers/acpi/ec.c                       | 2 +-
 drivers/acpi/mipi-disco-img.c           | 2 +-
 drivers/acpi/osi.c                      | 2 +-
 drivers/acpi/pci_slot.c                 | 2 +-
 drivers/acpi/pmic/intel_pmic_bxtwc.c    | 2 +-
 drivers/acpi/pmic/intel_pmic_chtdc_ti.c | 2 +-
 drivers/acpi/pmic/intel_pmic_chtwc.c    | 2 +-
 drivers/acpi/power.c                    | 2 +-
 drivers/acpi/processor_idle.c           | 2 +-
 drivers/acpi/sleep.c                    | 2 +-
 drivers/acpi/thermal.c                  | 2 +-
 drivers/acpi/video_detect.c             | 2 +-
 drivers/acpi/x86/blacklist.c            | 2 +-
 drivers/acpi/x86/lpss.c                 | 4 ++--
 drivers/acpi/x86/utils.c                | 4 ++--
 20 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index 168e1d495b7b..85f1c54c9378 100644
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -187,7 +187,7 @@ static const struct dmi_system_id ac_dmi_table[]  __initconst = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "32597CG"),
 		},
 	},
-	{},
+	{ }
 };
 
 static int acpi_ac_probe(struct platform_device *pdev)
diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index 2a2822516665..548303bb3a14 100644
--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
@@ -92,7 +92,7 @@ enum acpi_video_level_idx {
 
 static const struct auxiliary_device_id video_bus_auxiliary_id_table[] = {
 	{ .name = "acpi.video_bus" },
-	{},
+	{ }
 };
 MODULE_DEVICE_TABLE(auxiliary, video_bus_auxiliary_id_table);
 
@@ -518,7 +518,7 @@ static const struct dmi_system_id video_dmi_table[] = {
 		DMI_MATCH(DMI_PRODUCT_NAME, "EasyNote MZ35"),
 		},
 	},
-	{}
+	{ }
 };
 
 static unsigned long long
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 8b1b66cf5369..c1f36e6dfab4 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -1387,7 +1387,7 @@ static const struct dmi_system_id bat_dmi_table[] __initconst = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go 3"),
 		},
 	},
-	{},
+	{ }
 };
 
 static void acpi_battery_wakeup_cleanup(void *data)
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 1d6867dec925..3cf1719b5246 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -66,7 +66,7 @@ static const struct dmi_system_id dsdt_dmi_table[] __initconst = {
 		DMI_MATCH(DMI_PRODUCT_NAME, "Satellite"),
 		},
 	},
-	{}
+	{ }
 };
 #endif
 
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 66a57eea2280..c41fba556030 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -167,7 +167,7 @@ static const struct dmi_system_id dmi_lid_quirks[] = {
 		},
 		.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN,
 	},
-	{}
+	{ }
 };
 
 static int acpi_button_probe(struct platform_device *pdev);
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index d947118657a8..da7f35a42dd4 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -2017,7 +2017,7 @@ static const struct dmi_system_id ec_dmi_table[] __initconst = {
 			DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
 		},
 	},
-	{}
+	{ }
 };
 
 void __init acpi_ec_ecdt_probe(void)
diff --git a/drivers/acpi/mipi-disco-img.c b/drivers/acpi/mipi-disco-img.c
index ea4bffe3c02d..86df7dc25339 100644
--- a/drivers/acpi/mipi-disco-img.c
+++ b/drivers/acpi/mipi-disco-img.c
@@ -736,7 +736,7 @@ static const struct x86_cpu_id dell_broken_mipi_disco_cpu_gens[] = {
 	X86_MATCH_VFM(INTEL_RAPTORLAKE, NULL),
 	X86_MATCH_VFM(INTEL_RAPTORLAKE_P, NULL),
 	X86_MATCH_VFM(INTEL_RAPTORLAKE_S, NULL),
-	{}
+	{ }
 };
 
 static const char *strnext(const char *s1, const char *s2)
diff --git a/drivers/acpi/osi.c b/drivers/acpi/osi.c
index 9470f1830ff5..0fcb0d006065 100644
--- a/drivers/acpi/osi.c
+++ b/drivers/acpi/osi.c
@@ -473,7 +473,7 @@ static const struct dmi_system_id acpi_osi_dmi_table[] __initconst = {
 		     DMI_MATCH(DMI_PRODUCT_NAME, "1015PX"),
 		},
 	},
-	{}
+	{ }
 };
 
 static __init void acpi_osi_dmi_blacklisted(void)
diff --git a/drivers/acpi/pci_slot.c b/drivers/acpi/pci_slot.c
index 33a123074071..e5cf81b6c8e1 100644
--- a/drivers/acpi/pci_slot.c
+++ b/drivers/acpi/pci_slot.c
@@ -178,7 +178,7 @@ static const struct dmi_system_id acpi_pci_slot_dmi_table[] __initconst = {
 		DMI_MATCH(DMI_BIOS_VERSION, "PRIMEQUEST"),
 		},
 	},
-	{}
+	{ }
 };
 
 void __init acpi_pci_slot_init(void)
diff --git a/drivers/acpi/pmic/intel_pmic_bxtwc.c b/drivers/acpi/pmic/intel_pmic_bxtwc.c
index c332afbf82bd..99c05b62df43 100644
--- a/drivers/acpi/pmic/intel_pmic_bxtwc.c
+++ b/drivers/acpi/pmic/intel_pmic_bxtwc.c
@@ -395,7 +395,7 @@ static int intel_bxtwc_pmic_opregion_probe(struct platform_device *pdev)
 
 static const struct platform_device_id bxt_wc_opregion_id_table[] = {
 	{ .name = "bxt_wcove_region" },
-	{},
+	{ }
 };
 
 static struct platform_driver intel_bxtwc_pmic_opregion_driver = {
diff --git a/drivers/acpi/pmic/intel_pmic_chtdc_ti.c b/drivers/acpi/pmic/intel_pmic_chtdc_ti.c
index ecb36fbc1e7f..5424cf72fb1b 100644
--- a/drivers/acpi/pmic/intel_pmic_chtdc_ti.c
+++ b/drivers/acpi/pmic/intel_pmic_chtdc_ti.c
@@ -127,7 +127,7 @@ static int chtdc_ti_pmic_opregion_probe(struct platform_device *pdev)
 
 static const struct platform_device_id chtdc_ti_pmic_opregion_id_table[] = {
 	{ .name = "chtdc_ti_region" },
-	{},
+	{ }
 };
 
 static struct platform_driver chtdc_ti_pmic_opregion_driver = {
diff --git a/drivers/acpi/pmic/intel_pmic_chtwc.c b/drivers/acpi/pmic/intel_pmic_chtwc.c
index 81caede51ca2..f4c90907b020 100644
--- a/drivers/acpi/pmic/intel_pmic_chtwc.c
+++ b/drivers/acpi/pmic/intel_pmic_chtwc.c
@@ -275,7 +275,7 @@ static int intel_cht_wc_pmic_opregion_probe(struct platform_device *pdev)
 
 static const struct platform_device_id cht_wc_opregion_id_table[] = {
 	{ .name = "cht_wcove_region" },
-	{},
+	{ }
 };
 
 static struct platform_driver intel_cht_wc_pmic_opregion_driver = {
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index c77342a584f0..e97eb73bb2fe 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -1093,7 +1093,7 @@ static const struct dmi_system_id dmi_hp_elitebook_gp12pxp_quirk[] = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "HP EliteBook 855 G7 Notebook PC"),
 		},
 	},
-	{}
+	{ }
 };
 
 static const struct dmi_system_id dmi_leave_unused_power_resources_on[] = {
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index e113bcbbb882..9238e12e37fd 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -105,7 +105,7 @@ static const struct dmi_system_id processor_power_dmi_table[] = {
 	  DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
 	  DMI_MATCH(DMI_PRODUCT_NAME,"L8400B series Notebook PC")},
 	 (void *)1},
-	{},
+	{ }
 };
 
 
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 641056e0252b..7c1fb5b844be 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -407,7 +407,7 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
 		DMI_MATCH(DMI_PRODUCT_NAME, "20GGA00L00"),
 		},
 	},
-	{},
+	{ }
 };
 
 static bool ignore_blacklist;
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index da631bbe8ea2..3d06744924b6 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -1014,7 +1014,7 @@ static const struct dmi_system_id thermal_dmi_table[] __initconst = {
 		DMI_MATCH(DMI_BOARD_NAME, "7ZX"),
 		},
 	},
-	{}
+	{ }
 };
 
 static int __init acpi_thermal_init(void)
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 2050b8ff5384..997794d3b3d6 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -986,7 +986,7 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
 		DMI_MATCH(DMI_PRODUCT_NAME, "Mipad2"),
 		},
 	},
-	{ },
+	{ }
 };
 
 static bool google_cros_ec_present(void)
diff --git a/drivers/acpi/x86/blacklist.c b/drivers/acpi/x86/blacklist.c
index 55214d0a12b1..553291330f39 100644
--- a/drivers/acpi/x86/blacklist.c
+++ b/drivers/acpi/x86/blacklist.c
@@ -134,7 +134,7 @@ static const struct dmi_system_id acpi_rev_dmi_table[] __initconst = {
 		},
 	},
 #endif
-	{}
+	{ }
 };
 
 #endif /* CONFIG_DMI */
diff --git a/drivers/acpi/x86/lpss.c b/drivers/acpi/x86/lpss.c
index 50b6db40bb18..fa0f1b61614d 100644
--- a/drivers/acpi/x86/lpss.c
+++ b/drivers/acpi/x86/lpss.c
@@ -340,7 +340,7 @@ static const struct lpss_device_desc bsw_spi_dev_desc = {
 static const struct x86_cpu_id lpss_cpu_ids[] = {
 	X86_MATCH_VFM(INTEL_ATOM_SILVERMONT,	NULL),
 	X86_MATCH_VFM(INTEL_ATOM_AIRMONT,	NULL),
-	{}
+	{ }
 };
 
 #else
@@ -493,7 +493,7 @@ static const struct dmi_system_id i2c1_dep_missing_dmi_ids[] = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "T200TA"),
 		},
 	},
-	{}
+	{ }
 };
 
 /*
diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c
index e723575399b8..b6ef5dfb662a 100644
--- a/drivers/acpi/x86/utils.c
+++ b/drivers/acpi/x86/utils.c
@@ -49,7 +49,7 @@ struct override_status_id {
 #define ENTRY(status, hid, uid, path, cpu_vfm, dmi...) {		\
 	{ { .id = hid }, { } },						\
 	{ X86_MATCH_VFM(cpu_vfm, NULL), {} },				\
-	{ { .matches = dmi }, {} },					\
+	{ { .matches = dmi }, { } },					\
 	uid,								\
 	path,								\
 	status,								\
@@ -458,7 +458,7 @@ static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
 					ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY),
 	},
 #endif
-	{}
+	{ }
 };
 
 #if IS_ENABLED(CONFIG_X86_ANDROID_TABLETS)
-- 
2.56.0.rc1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 2/4] ACPI: Drop unused .driver_data initializers in acpi_device_id arrays
  2026-11-13 11:13 ` [PATCH v1 2/4] ACPI: Drop unused .driver_data initializers in acpi_device_id arrays Uwe Kleine-König (The Capable Hub)
@ 2026-11-13 11:17   ` sashiko-bot
  0 siblings, 0 replies; 8+ messages in thread
From: sashiko-bot @ 2026-11-13 11:17 UTC (permalink / raw)
  To: Uwe Kleine-König (The Capable Hub); +Cc: linux-pci

> From: Uwe Kleine-König (The Capable Hub) <ukleinek@kernel.org>
> 
> Many drivers explicitly initialize the .driver_data member in their
> acpi_device_id arrays without actually using that value. Drop these
> assignments and while touching these lines use named initializers for
> .id and use consistent spacing.
> 
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1794567577.git.ukleinek@kernel.org?part=2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 4/4] ACPI: Unify *_device_id list terminators
  2026-11-13 11:14 ` [PATCH v1 4/4] ACPI: Unify *_device_id list terminators Uwe Kleine-König (The Capable Hub)
@ 2026-11-13 11:20   ` sashiko-bot
  0 siblings, 0 replies; 8+ messages in thread
From: sashiko-bot @ 2026-11-13 11:20 UTC (permalink / raw)
  To: Uwe Kleine-König (The Capable Hub); +Cc: linux-pci

> Consistenly use a single space and no trailing , for the list
> terminator. This doesn't introduce any changes to the compiled result of
> the modified drivers and just aligns these to the common style of the
> other device_id arrays.
> 
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1794567577.git.ukleinek@kernel.org?part=4


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 1/4] ACPI: Unify acpi_device_id list terminators
  2026-11-13 11:13 ` [PATCH v1 1/4] ACPI: Unify acpi_device_id list terminators Uwe Kleine-König (The Capable Hub)
@ 2026-11-13 11:20   ` sashiko-bot
  0 siblings, 0 replies; 8+ messages in thread
From: sashiko-bot @ 2026-11-13 11:20 UTC (permalink / raw)
  To: Uwe Kleine-König (The Capable Hub); +Cc: linux-pci

> Consistenly use an empty initializer with no trailing , for the list
> terminator. This doesn't introduce any changes to the compiled result of
> the modified drivers. Note that the first member of struct
> acpi_device_id is a char[] and not a pointer, so an explicit "" is
> eqivalent to the default initialisation.
> 
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1794567577.git.ukleinek@kernel.org?part=1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1 0/4] ACPI: Use named initializers for acpi_device_id arrays
  2026-11-13 11:13 [PATCH v1 0/4] ACPI: Use named initializers for acpi_device_id arrays Uwe Kleine-König (The Capable Hub)
                   ` (2 preceding siblings ...)
  2026-11-13 11:14 ` [PATCH v1 4/4] ACPI: Unify *_device_id list terminators Uwe Kleine-König (The Capable Hub)
@ 2026-11-13 16:17 ` Rafael J. Wysocki (Intel)
  3 siblings, 0 replies; 8+ messages in thread
From: Rafael J. Wysocki (Intel) @ 2026-11-13 16:17 UTC (permalink / raw)
  To: Uwe Kleine-König (The Capable Hub)
  Cc: Rafael J. Wysocki, Uwe Kleine-König, Len Brown,
	Lorenzo Pieralisi, Hanjun Guo, Sudeep Holla, Catalin Marinas,
	Will Deacon, Dan Williams, Vishal Verma, Dave Jiang,
	Alison Schofield, Ira Weiny, Bjorn Helgaas, Zhang Rui,
	Mario Limonciello (AMD), Saranya Gopal, Gergo Koteles,
	Jakob Riemenschneider, Yauhen Kharuzhy, Pawel Zalewski,
	linux-acpi, linux-kernel, linux-arm-kernel, nvdimm, linux-pci,
	Kai-Heng Feng, Tony Luck, Borislav Petkov, Mauro Carvalho Chehab,
	Shuai Xue, Alexandre Belloni, Dave Hansen, Chu Guangqing,
	Andy Shevchenko, Mika Westerberg

On Fri, Nov 13, 2026 at 12:14 PM Uwe Kleine-König (The Capable Hub)
<u.kleine-koenig@baylibre.com> wrote:
>
> From: Uwe Kleine-König <ukleinek@kernel.org>
>
> Hello,
>
> this series is about preparing drivers/acpi for a change to struct
> acpi_device_id. The idea is to replace .driver_data by an anonymous
> union, see
> https://lore.kernel.org/all/cover.1780048925.git.u.kleine-koenig@baylibre.com/
> for more details. (The linked example is about platform_device_id, I
> intend to apply it acpi_device_id and several others, too.)
>
> Before this union can be added, all initializers must use named
> initializers (C99 calls them designated initializers), which IMHO is a
> nice cleanup that can stand for itself as it makes the code easier to
> read.
>
> Pawel sent a similar series earlier, find it at
> https://lore.kernel.org/all/20260727-acpi-refactor-v1-0-ff900aa326ee@thegoodpenguin.co.uk/.
> Compared to that the patch splitting is done differently and the base
> here is newer.
>
> I checked for the other *_device_id and for these there is nothing to do
> below drivers/acpi because the few instances already use named
> initializers.
>
> The last patch in this series is just some cosmetic to align the coding
> style. If you consider it churn, just drop it.
>
> It would be great to get this series in soon, as keeping it up to date
> for a later resend is an annoying effort. Thanks for your cooperation.
>
> Best regards
> Uwe
>
> Uwe Kleine-König (The Capable Hub) (4):
>   ACPI: Unify acpi_device_id list terminators
>   ACPI: Drop unused .driver_data initializers in acpi_device_id arrays
>   ACPI: Use named initializers for acpi_device_id arrays
>   ACPI: Unify *_device_id list terminators

All patches applied as 7.5 material, thanks!

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-11-13 16:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-13 11:13 [PATCH v1 0/4] ACPI: Use named initializers for acpi_device_id arrays Uwe Kleine-König (The Capable Hub)
2026-11-13 11:13 ` [PATCH v1 1/4] ACPI: Unify acpi_device_id list terminators Uwe Kleine-König (The Capable Hub)
2026-11-13 11:20   ` sashiko-bot
2026-11-13 11:13 ` [PATCH v1 2/4] ACPI: Drop unused .driver_data initializers in acpi_device_id arrays Uwe Kleine-König (The Capable Hub)
2026-11-13 11:17   ` sashiko-bot
2026-11-13 11:14 ` [PATCH v1 4/4] ACPI: Unify *_device_id list terminators Uwe Kleine-König (The Capable Hub)
2026-11-13 11:20   ` sashiko-bot
2026-11-13 16:17 ` [PATCH v1 0/4] ACPI: Use named initializers for acpi_device_id arrays Rafael J. Wysocki (Intel)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox