mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 00/12] misc: Improvements around *_device_id defintions
@ 2026-07-17 14:50 Uwe Kleine-König (The Capable Hub)
  2026-07-17 14:50 ` [PATCH v2 01/12] misc: Drop unused assignment of spi_device_id driver data Uwe Kleine-König (The Capable Hub)
                   ` (11 more replies)
  0 siblings, 12 replies; 14+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-07-17 14:50 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman
  Cc: linux-kernel, Danilo Krummrich, Bjorn Helgaas, Takashi Sakamoto,
	Frank Haverkamp, Kees Cook, Eric Piel, Akshay Gupta,
	Naveen Krishna Chatradhi, Alexander Usyskin, Brad Warrum,
	Ritu Agarwal, Srinivas Kandagatla, Ekansh Gupta, John Stultz,
	Romain Gantois, linux-arm-msm, dri-devel, Scott Branden,
	Broadcom internal kernel review list, Michał Mirosław,
	Keng-Yu Lin, Vaibhaav Ram T.L, Kumaravel Thiagarajan,
	Vamsi Attunuru, Alexander Graf, The AWS Nitro Enclaves Team,
	Mahesh J Salgaonkar, Andrew Donnellan, Manivannan Sadhasivam,
	Krzysztof Wilczyński, Kishon Vijay Abraham I, Frank Li,
	Jiri Slaby, Andrea della Porta, Bryan Tan, Vishnu Dasa,
	linux-gpio, linuxppc-dev, linux-pci

Hello,

the main motivation for this series are the patches that introduce named
initializers to these arrays. The reason I want these is that I plan to
make .driver_data a union, see
https://lore.kernel.org/all/cover.1780048925.git.u.kleine-koenig@baylibre.com/
for more details about this quest.

This series superseds a patch that only handled i2c_device_id, which is
available at
https://lore.kernel.org/all/20260515162734.469327-2-u.kleine-koenig@baylibre.com/.

Changes since then:

 - Also handle all the other *_device_id to ideally only have to bother
   about drivers/misc once for all the similar quests
 - split drivers/misc/eeprom in separate patches
 - rebased to yeserday's next

Best regards
Uwe

Uwe Kleine-König (The Capable Hub) (12):
  misc: Drop unused assignment of spi_device_id driver data
  misc/pvpanic: Drop unused assignment of acpi_device_id driver data
  misc: genwqe: Drop unused assignment of pci_device_id driver data
  misc: eeprom: Use named initializers for arrays of i2c_device_data
  misc: Use named initializers for arrays of i2c_device_data
  misc: Use named initializers for arrays of spi_device_data
  misc: mei: Use named initializers for acpi_device_id array
  misc: mei: Use named initializer for platform_device_id array
  misc: ibmvmc: Use named initializers for vio_device_id array
  misc: eeprom: idt_89hpesx: Unify style of of_device_id array
  misc: Unify style of of_device_id arrays
  misc: Unify code style for various *_device_id arrays

 drivers/misc/ad525x_dpot-i2c.c                |  52 ++---
 drivers/misc/ad525x_dpot-spi.c                |  58 ++---
 drivers/misc/amd-sbi/rmi-i2c.c                |   6 +-
 drivers/misc/apds9802als.c                    |   2 +-
 drivers/misc/bcm-vk/bcm_vk_dev.c              |   2 +-
 drivers/misc/bh1770glc.c                      |   6 +-
 drivers/misc/cardreader/alcor_pci.c           |   2 +-
 drivers/misc/cb710/core.c                     |   5 +-
 drivers/misc/ds1682.c                         |   6 +-
 drivers/misc/eeprom/idt_89hpesx.c             | 202 +++++++++---------
 drivers/misc/eeprom/max6875.c                 |   2 +-
 drivers/misc/fastrpc.c                        |   6 +-
 drivers/misc/gehc-achc.c                      |   4 +-
 drivers/misc/genwqe/card_base.c               |  88 +++-----
 drivers/misc/hi6421v600-irq.c                 |   2 +-
 drivers/misc/hisi_hikey_usb.c                 |   2 +-
 drivers/misc/hmc6352.c                        |   2 +-
 drivers/misc/hpilo.c                          |   6 +-
 drivers/misc/ibmasm/module.c                  |   2 +-
 drivers/misc/ibmvmc.c                         |   4 +-
 drivers/misc/ics932s401.c                     |   2 +-
 drivers/misc/isl29003.c                       |   4 +-
 drivers/misc/isl29020.c                       |   2 +-
 drivers/misc/keba/lan9252.c                   |   4 +-
 drivers/misc/lattice-ecp3-config.c            |   4 +-
 drivers/misc/lis3lv02d/lis3lv02d_i2c.c        |   8 +-
 drivers/misc/lis3lv02d/lis3lv02d_spi.c        |   2 +-
 drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c |   2 +-
 .../misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c   |   4 +-
 .../misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c |   4 +-
 drivers/misc/mei/pci-csc.c                    |   2 +-
 drivers/misc/mei/pci-me.c                     | 166 +++++++-------
 drivers/misc/mei/pci-txe.c                    |   6 +-
 drivers/misc/mei/platform-vsc.c               |   2 +-
 drivers/misc/mei/vsc-tp.c                     |  10 +-
 drivers/misc/mrvl_cn10k_dpi.c                 |   2 +-
 drivers/misc/nsm.c                            |   2 +-
 drivers/misc/ocxl/pci.c                       |   2 +-
 drivers/misc/open-dice.c                      |   2 +-
 drivers/misc/pci_endpoint_test.c              |  16 +-
 drivers/misc/phantom.c                        |   6 +-
 drivers/misc/pvpanic/pvpanic-mmio.c           |   8 +-
 drivers/misc/pvpanic/pvpanic-pci.c            |   4 +-
 drivers/misc/qcom-coincell.c                  |   4 +-
 drivers/misc/rp1/rp1_pci.c                    |   2 +-
 drivers/misc/sram.c                           |   2 +-
 drivers/misc/ti_fpc202.c                      |   2 +-
 drivers/misc/tsl2550.c                        |   2 +-
 drivers/misc/vcpu_stall_detector.c            |   4 +-
 drivers/misc/vmw_vmci/vmci_guest.c            |   4 +-
 50 files changed, 362 insertions(+), 381 deletions(-)


base-commit: 1a1757b76427f6201bfe0bf1bea9f7574f332a93
-- 
2.55.0.11.g153666a7d9bb


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

* [PATCH v2 01/12] misc: Drop unused assignment of spi_device_id driver data
  2026-07-17 14:50 [PATCH v2 00/12] misc: Improvements around *_device_id defintions Uwe Kleine-König (The Capable Hub)
@ 2026-07-17 14:50 ` Uwe Kleine-König (The Capable Hub)
  2026-07-17 14:50 ` [PATCH v2 02/12] misc/pvpanic: Drop unused assignment of acpi_device_id " Uwe Kleine-König (The Capable Hub)
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-07-17 14:50 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman; +Cc: linux-kernel

The drivers don't make use of the values that were explicitly assigned
to the .driver_data members. Drop these assignments.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
 drivers/misc/gehc-achc.c           | 4 ++--
 drivers/misc/lattice-ecp3-config.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/misc/gehc-achc.c b/drivers/misc/gehc-achc.c
index b8fca4d393c6..1abfa6c257de 100644
--- a/drivers/misc/gehc-achc.c
+++ b/drivers/misc/gehc-achc.c
@@ -538,8 +538,8 @@ static int gehc_achc_probe(struct spi_device *spi)
 }
 
 static const struct spi_device_id gehc_achc_id[] = {
-	{ "ge,achc", 0 },
-	{ "achc", 0 },
+	{ "ge,achc" },
+	{ "achc" },
 	{ }
 };
 MODULE_DEVICE_TABLE(spi, gehc_achc_id);
diff --git a/drivers/misc/lattice-ecp3-config.c b/drivers/misc/lattice-ecp3-config.c
index 93949df3bcff..2b93d5660bf2 100644
--- a/drivers/misc/lattice-ecp3-config.c
+++ b/drivers/misc/lattice-ecp3-config.c
@@ -219,8 +219,8 @@ static void lattice_ecp3_remove(struct spi_device *spi)
 }
 
 static const struct spi_device_id lattice_ecp3_id[] = {
-	{ "ecp3-17", 0 },
-	{ "ecp3-35", 0 },
+	{ "ecp3-17" },
+	{ "ecp3-35" },
 	{ }
 };
 MODULE_DEVICE_TABLE(spi, lattice_ecp3_id);
-- 
2.55.0.11.g153666a7d9bb


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

* [PATCH v2 02/12] misc/pvpanic: Drop unused assignment of acpi_device_id driver data
  2026-07-17 14:50 [PATCH v2 00/12] misc: Improvements around *_device_id defintions Uwe Kleine-König (The Capable Hub)
  2026-07-17 14:50 ` [PATCH v2 01/12] misc: Drop unused assignment of spi_device_id driver data Uwe Kleine-König (The Capable Hub)
@ 2026-07-17 14:50 ` Uwe Kleine-König (The Capable Hub)
  2026-07-17 14:50 ` [PATCH v2 03/12] misc: genwqe: Drop unused assignment of pci_device_id " Uwe Kleine-König (The Capable Hub)
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-07-17 14:50 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman
  Cc: Danilo Krummrich, Bjorn Helgaas, Takashi Sakamoto, linux-kernel

The driver explicitly sets the .driver_data member of struct
acpi_device_id to zero without relying on that value. Drop this unused
assignments.

While touching this array simplify the list terminator and use a named
initalizer.

This patch doesn't modify the compiled array, only its representation in
source form benefits.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
 drivers/misc/pvpanic/pvpanic-mmio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/pvpanic/pvpanic-mmio.c b/drivers/misc/pvpanic/pvpanic-mmio.c
index bedcda9b6ac5..43a094bfdaec 100644
--- a/drivers/misc/pvpanic/pvpanic-mmio.c
+++ b/drivers/misc/pvpanic/pvpanic-mmio.c
@@ -57,8 +57,8 @@ static const struct of_device_id pvpanic_mmio_match[] = {
 MODULE_DEVICE_TABLE(of, pvpanic_mmio_match);
 
 static const struct acpi_device_id pvpanic_device_ids[] = {
-	{ "QEMU0001", 0 },
-	{ "", 0 }
+	{ .id = "QEMU0001" },
+	{ }
 };
 MODULE_DEVICE_TABLE(acpi, pvpanic_device_ids);
 
-- 
2.55.0.11.g153666a7d9bb


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

* [PATCH v2 03/12] misc: genwqe: Drop unused assignment of pci_device_id driver data
  2026-07-17 14:50 [PATCH v2 00/12] misc: Improvements around *_device_id defintions Uwe Kleine-König (The Capable Hub)
  2026-07-17 14:50 ` [PATCH v2 01/12] misc: Drop unused assignment of spi_device_id driver data Uwe Kleine-König (The Capable Hub)
  2026-07-17 14:50 ` [PATCH v2 02/12] misc/pvpanic: Drop unused assignment of acpi_device_id " Uwe Kleine-König (The Capable Hub)
@ 2026-07-17 14:50 ` Uwe Kleine-König (The Capable Hub)
  2026-07-17 14:50 ` [PATCH v2 04/12] misc: eeprom: Use named initializers for arrays of i2c_device_data Uwe Kleine-König (The Capable Hub)
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-07-17 14:50 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman; +Cc: Frank Haverkamp, linux-kernel

The driver explicitly sets the .driver_data member of struct
pci_device_id to zero without relying on that value. Drop this unused
assignment.

While touching this array, also convert it to use one of the PCI_DEVICE
macros that is usually used for these and drop the explicit 0 in the
list terminator. This patch doesn't modify the compiled array.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
 drivers/misc/genwqe/card_base.c | 88 +++++++++++++--------------------
 1 file changed, 35 insertions(+), 53 deletions(-)

diff --git a/drivers/misc/genwqe/card_base.c b/drivers/misc/genwqe/card_base.c
index 86bfa82723ff..e602eb3c51fa 100644
--- a/drivers/misc/genwqe/card_base.c
+++ b/drivers/misc/genwqe/card_base.c
@@ -48,60 +48,42 @@ static struct genwqe_dev *genwqe_devices[GENWQE_CARD_NO_MAX];
 
 /* PCI structure for identifying device by PCI vendor and device ID */
 static const struct pci_device_id genwqe_device_table[] = {
-	{ .vendor      = PCI_VENDOR_ID_IBM,
-	  .device      = PCI_DEVICE_GENWQE,
-	  .subvendor   = PCI_SUBVENDOR_ID_IBM,
-	  .subdevice   = PCI_SUBSYSTEM_ID_GENWQE5,
-	  .class       = (PCI_CLASSCODE_GENWQE5 << 8),
-	  .class_mask  = ~0,
-	  .driver_data = 0 },
-
-	/* Initial SR-IOV bring-up image */
-	{ .vendor      = PCI_VENDOR_ID_IBM,
-	  .device      = PCI_DEVICE_GENWQE,
-	  .subvendor   = PCI_SUBVENDOR_ID_IBM_SRIOV,
-	  .subdevice   = PCI_SUBSYSTEM_ID_GENWQE5_SRIOV,
-	  .class       = (PCI_CLASSCODE_GENWQE5_SRIOV << 8),
-	  .class_mask  = ~0,
-	  .driver_data = 0 },
-
-	{ .vendor      = PCI_VENDOR_ID_IBM,  /* VF Vendor ID */
-	  .device      = 0x0000,  /* VF Device ID */
-	  .subvendor   = PCI_SUBVENDOR_ID_IBM_SRIOV,
-	  .subdevice   = PCI_SUBSYSTEM_ID_GENWQE5_SRIOV,
-	  .class       = (PCI_CLASSCODE_GENWQE5_SRIOV << 8),
-	  .class_mask  = ~0,
-	  .driver_data = 0 },
-
-	/* Fixed up image */
-	{ .vendor      = PCI_VENDOR_ID_IBM,
-	  .device      = PCI_DEVICE_GENWQE,
-	  .subvendor   = PCI_SUBVENDOR_ID_IBM_SRIOV,
-	  .subdevice   = PCI_SUBSYSTEM_ID_GENWQE5,
-	  .class       = (PCI_CLASSCODE_GENWQE5_SRIOV << 8),
-	  .class_mask  = ~0,
-	  .driver_data = 0 },
-
-	{ .vendor      = PCI_VENDOR_ID_IBM,  /* VF Vendor ID */
-	  .device      = 0x0000,  /* VF Device ID */
-	  .subvendor   = PCI_SUBVENDOR_ID_IBM_SRIOV,
-	  .subdevice   = PCI_SUBSYSTEM_ID_GENWQE5,
-	  .class       = (PCI_CLASSCODE_GENWQE5_SRIOV << 8),
-	  .class_mask  = ~0,
-	  .driver_data = 0 },
-
-	/* Even one more ... */
-	{ .vendor      = PCI_VENDOR_ID_IBM,
-	  .device      = PCI_DEVICE_GENWQE,
-	  .subvendor   = PCI_SUBVENDOR_ID_IBM,
-	  .subdevice   = PCI_SUBSYSTEM_ID_GENWQE5_NEW,
-	  .class       = (PCI_CLASSCODE_GENWQE5 << 8),
-	  .class_mask  = ~0,
-	  .driver_data = 0 },
-
-	{ 0, }			/* 0 terminated list. */
+	{
+		PCI_DEVICE_SUB(PCI_VENDOR_ID_IBM, PCI_DEVICE_GENWQE,
+			       PCI_SUBVENDOR_ID_IBM, PCI_SUBSYSTEM_ID_GENWQE5),
+		.class       = PCI_CLASSCODE_GENWQE5 << 8,
+		.class_mask  = ~0,
+	}, {
+		/* Initial SR-IOV bring-up image */
+		PCI_DEVICE_SUB(PCI_VENDOR_ID_IBM, PCI_VENDOR_ID_IBM, PCI_DEVICE_GENWQE,
+			       PCI_SUBVENDOR_ID_IBM_SRIOV),
+		.class       = PCI_CLASSCODE_GENWQE5_SRIOV << 8,
+		.class_mask  = ~0,
+	}, {
+		PCI_DEVICE_SUB(PCI_VENDOR_ID_IBM, 0x0000,
+			       PCI_SUBVENDOR_ID_IBM_SRIOV, PCI_SUBSYSTEM_ID_GENWQE5_SRIOV),
+		.class       = PCI_CLASSCODE_GENWQE5_SRIOV << 8,
+		.class_mask  = ~0,
+	}, {
+		/* Fixed up image */
+		PCI_DEVICE_SUB(PCI_VENDOR_ID_IBM, PCI_DEVICE_GENWQE,
+			       PCI_SUBVENDOR_ID_IBM_SRIOV, PCI_SUBSYSTEM_ID_GENWQE5),
+		.class       = PCI_CLASSCODE_GENWQE5_SRIOV << 8,
+		.class_mask  = ~0,
+	}, {
+		PCI_DEVICE_SUB(PCI_VENDOR_ID_IBM, 0x0000,
+			       PCI_SUBVENDOR_ID_IBM_SRIOV, PCI_SUBSYSTEM_ID_GENWQE5),
+		.class       = PCI_CLASSCODE_GENWQE5_SRIOV << 8,
+		.class_mask  = ~0,
+	}, {
+		/* Even one more ... */
+		PCI_DEVICE_SUB(PCI_VENDOR_ID_IBM, PCI_DEVICE_GENWQE,
+			       PCI_SUBVENDOR_ID_IBM, PCI_SUBSYSTEM_ID_GENWQE5_NEW),
+		.class       = (PCI_CLASSCODE_GENWQE5 << 8),
+		.class_mask  = ~0,
+	},
+	{ }			/* 0 terminated list. */
 };
-
 MODULE_DEVICE_TABLE(pci, genwqe_device_table);
 
 /**
-- 
2.55.0.11.g153666a7d9bb


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

* [PATCH v2 04/12] misc: eeprom: Use named initializers for arrays of i2c_device_data
  2026-07-17 14:50 [PATCH v2 00/12] misc: Improvements around *_device_id defintions Uwe Kleine-König (The Capable Hub)
                   ` (2 preceding siblings ...)
  2026-07-17 14:50 ` [PATCH v2 03/12] misc: genwqe: Drop unused assignment of pci_device_id " Uwe Kleine-König (The Capable Hub)
@ 2026-07-17 14:50 ` Uwe Kleine-König (The Capable Hub)
  2026-07-17 14:50 ` [PATCH v2 05/12] misc: " Uwe Kleine-König (The Capable Hub)
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-07-17 14:50 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman
  Cc: Takashi Sakamoto, Danilo Krummrich, Bjorn Helgaas, Kees Cook,
	linux-kernel

While being less compact, using named initializers allows to more easily
see which members of the structs are assigned which value without having
to lookup the declaration of the struct. And it's also more robust
against changes to the struct definition.

While touching all these arrays, unify usage of whitespace.

This patch doesn't modify the compiled arrays, only their representation
in source form benefits.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
 drivers/misc/eeprom/idt_89hpesx.c | 108 +++++++++++++++---------------
 drivers/misc/eeprom/max6875.c     |   2 +-
 2 files changed, 55 insertions(+), 55 deletions(-)

diff --git a/drivers/misc/eeprom/idt_89hpesx.c b/drivers/misc/eeprom/idt_89hpesx.c
index e056d2dea8c3..5bc0294349a0 100644
--- a/drivers/misc/eeprom/idt_89hpesx.c
+++ b/drivers/misc/eeprom/idt_89hpesx.c
@@ -1375,12 +1375,12 @@ static void idt_remove(struct i2c_client *client)
  * ee_ids - array of supported EEPROMs
  */
 static const struct i2c_device_id ee_ids[] = {
-	{ "24c32",  4096},
-	{ "24c64",  8192},
-	{ "24c128", 16384},
-	{ "24c256", 32768},
-	{ "24c512", 65536},
-	{}
+	{ .name = "24c32", .driver_data = 4096 },
+	{ .name = "24c64", .driver_data = 8192 },
+	{ .name = "24c128", .driver_data = 16384 },
+	{ .name = "24c256", .driver_data = 32768 },
+	{ .name = "24c512", .driver_data = 65536 },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ee_ids);
 
@@ -1388,58 +1388,58 @@ MODULE_DEVICE_TABLE(i2c, ee_ids);
  * idt_ids - supported IDT 89HPESx devices
  */
 static const struct i2c_device_id idt_ids[] = {
-	{ "89hpes8nt2" },
-	{ "89hpes12nt3" },
+	{ .name = "89hpes8nt2" },
+	{ .name = "89hpes12nt3" },
 
-	{ "89hpes24nt6ag2" },
-	{ "89hpes32nt8ag2" },
-	{ "89hpes32nt8bg2" },
-	{ "89hpes12nt12g2" },
-	{ "89hpes16nt16g2" },
-	{ "89hpes24nt24g2" },
-	{ "89hpes32nt24ag2" },
-	{ "89hpes32nt24bg2" },
+	{ .name = "89hpes24nt6ag2" },
+	{ .name = "89hpes32nt8ag2" },
+	{ .name = "89hpes32nt8bg2" },
+	{ .name = "89hpes12nt12g2" },
+	{ .name = "89hpes16nt16g2" },
+	{ .name = "89hpes24nt24g2" },
+	{ .name = "89hpes32nt24ag2" },
+	{ .name = "89hpes32nt24bg2" },
 
-	{ "89hpes12n3" },
-	{ "89hpes12n3a" },
-	{ "89hpes24n3" },
-	{ "89hpes24n3a" },
+	{ .name = "89hpes12n3" },
+	{ .name = "89hpes12n3a" },
+	{ .name = "89hpes24n3" },
+	{ .name = "89hpes24n3a" },
 
-	{ "89hpes32h8" },
-	{ "89hpes32h8g2" },
-	{ "89hpes48h12" },
-	{ "89hpes48h12g2" },
-	{ "89hpes48h12ag2" },
-	{ "89hpes16h16" },
-	{ "89hpes22h16" },
-	{ "89hpes22h16g2" },
-	{ "89hpes34h16" },
-	{ "89hpes34h16g2" },
-	{ "89hpes64h16" },
-	{ "89hpes64h16g2" },
-	{ "89hpes64h16ag2" },
+	{ .name = "89hpes32h8" },
+	{ .name = "89hpes32h8g2" },
+	{ .name = "89hpes48h12" },
+	{ .name = "89hpes48h12g2" },
+	{ .name = "89hpes48h12ag2" },
+	{ .name = "89hpes16h16" },
+	{ .name = "89hpes22h16" },
+	{ .name = "89hpes22h16g2" },
+	{ .name = "89hpes34h16" },
+	{ .name = "89hpes34h16g2" },
+	{ .name = "89hpes64h16" },
+	{ .name = "89hpes64h16g2" },
+	{ .name = "89hpes64h16ag2" },
 
-	/* { "89hpes3t3" }, // No SMBus-slave iface */
-	{ "89hpes12t3g2" },
-	{ "89hpes24t3g2" },
-	/* { "89hpes4t4" }, // No SMBus-slave iface */
-	{ "89hpes16t4" },
-	{ "89hpes4t4g2" },
-	{ "89hpes10t4g2" },
-	{ "89hpes16t4g2" },
-	{ "89hpes16t4ag2" },
-	{ "89hpes5t5" },
-	{ "89hpes6t5" },
-	{ "89hpes8t5" },
-	{ "89hpes8t5a" },
-	{ "89hpes24t6" },
-	{ "89hpes6t6g2" },
-	{ "89hpes24t6g2" },
-	{ "89hpes16t7" },
-	{ "89hpes32t8" },
-	{ "89hpes32t8g2" },
-	{ "89hpes48t12" },
-	{ "89hpes48t12g2" },
+	/* { .name = "89hpes3t3" }, // No SMBus-slave iface */
+	{ .name = "89hpes12t3g2" },
+	{ .name = "89hpes24t3g2" },
+	/* { .name = "89hpes4t4" }, // No SMBus-slave iface */
+	{ .name = "89hpes16t4" },
+	{ .name = "89hpes4t4g2" },
+	{ .name = "89hpes10t4g2" },
+	{ .name = "89hpes16t4g2" },
+	{ .name = "89hpes16t4ag2" },
+	{ .name = "89hpes5t5" },
+	{ .name = "89hpes6t5" },
+	{ .name = "89hpes8t5" },
+	{ .name = "89hpes8t5a" },
+	{ .name = "89hpes24t6" },
+	{ .name = "89hpes6t6g2" },
+	{ .name = "89hpes24t6g2" },
+	{ .name = "89hpes16t7" },
+	{ .name = "89hpes32t8" },
+	{ .name = "89hpes32t8g2" },
+	{ .name = "89hpes48t12" },
+	{ .name = "89hpes48t12g2" },
 	{ /* END OF LIST */ }
 };
 MODULE_DEVICE_TABLE(i2c, idt_ids);
diff --git a/drivers/misc/eeprom/max6875.c b/drivers/misc/eeprom/max6875.c
index 5731d2dc8a57..be5e6d19be10 100644
--- a/drivers/misc/eeprom/max6875.c
+++ b/drivers/misc/eeprom/max6875.c
@@ -183,7 +183,7 @@ static void max6875_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id max6875_id[] = {
-	{ "max6875" },
+	{ .name = "max6875" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, max6875_id);
-- 
2.55.0.11.g153666a7d9bb


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

* [PATCH v2 05/12] misc: Use named initializers for arrays of i2c_device_data
  2026-07-17 14:50 [PATCH v2 00/12] misc: Improvements around *_device_id defintions Uwe Kleine-König (The Capable Hub)
                   ` (3 preceding siblings ...)
  2026-07-17 14:50 ` [PATCH v2 04/12] misc: eeprom: Use named initializers for arrays of i2c_device_data Uwe Kleine-König (The Capable Hub)
@ 2026-07-17 14:50 ` Uwe Kleine-König (The Capable Hub)
  2026-07-17 14:50 ` [PATCH v2 06/12] misc: Use named initializers for arrays of spi_device_data Uwe Kleine-König (The Capable Hub)
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-07-17 14:50 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman
  Cc: Eric Piel, Akshay Gupta, Naveen Krishna Chatradhi, linux-kernel

While being less compact, using named initializers allows to more easily
see which members of the structs are assigned which value without having
to lookup the declaration of the struct. And it's also more robust
against changes to the struct definition.

The mentioned robustness is relevant for a planned change to struct
i2c_device_id that replaces .driver_data by an anonymous union.

While touching all these arrays, unify usage of whitespace.

This patch doesn't modify the compiled arrays, only their representation
in source form benefits.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
 drivers/misc/ad525x_dpot-i2c.c         | 52 +++++++++++++-------------
 drivers/misc/amd-sbi/rmi-i2c.c         |  4 +-
 drivers/misc/apds9802als.c             |  2 +-
 drivers/misc/bh1770glc.c               |  6 +--
 drivers/misc/ds1682.c                  |  2 +-
 drivers/misc/hmc6352.c                 |  2 +-
 drivers/misc/ics932s401.c              |  2 +-
 drivers/misc/isl29003.c                |  4 +-
 drivers/misc/isl29020.c                |  2 +-
 drivers/misc/lis3lv02d/lis3lv02d_i2c.c |  6 +--
 drivers/misc/tsl2550.c                 |  2 +-
 11 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/drivers/misc/ad525x_dpot-i2c.c b/drivers/misc/ad525x_dpot-i2c.c
index 469478f7a1d3..e02be9098b3b 100644
--- a/drivers/misc/ad525x_dpot-i2c.c
+++ b/drivers/misc/ad525x_dpot-i2c.c
@@ -73,32 +73,32 @@ static void ad_dpot_i2c_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ad_dpot_id[] = {
-	{"ad5258", AD5258_ID},
-	{"ad5259", AD5259_ID},
-	{"ad5251", AD5251_ID},
-	{"ad5252", AD5252_ID},
-	{"ad5253", AD5253_ID},
-	{"ad5254", AD5254_ID},
-	{"ad5255", AD5255_ID},
-	{"ad5241", AD5241_ID},
-	{"ad5242", AD5242_ID},
-	{"ad5243", AD5243_ID},
-	{"ad5245", AD5245_ID},
-	{"ad5246", AD5246_ID},
-	{"ad5247", AD5247_ID},
-	{"ad5248", AD5248_ID},
-	{"ad5280", AD5280_ID},
-	{"ad5282", AD5282_ID},
-	{"adn2860", ADN2860_ID},
-	{"ad5273", AD5273_ID},
-	{"ad5161", AD5161_ID},
-	{"ad5171", AD5171_ID},
-	{"ad5170", AD5170_ID},
-	{"ad5172", AD5172_ID},
-	{"ad5173", AD5173_ID},
-	{"ad5272", AD5272_ID},
-	{"ad5274", AD5274_ID},
-	{}
+	{ .name = "ad5258", .driver_data = AD5258_ID },
+	{ .name = "ad5259", .driver_data = AD5259_ID },
+	{ .name = "ad5251", .driver_data = AD5251_ID },
+	{ .name = "ad5252", .driver_data = AD5252_ID },
+	{ .name = "ad5253", .driver_data = AD5253_ID },
+	{ .name = "ad5254", .driver_data = AD5254_ID },
+	{ .name = "ad5255", .driver_data = AD5255_ID },
+	{ .name = "ad5241", .driver_data = AD5241_ID },
+	{ .name = "ad5242", .driver_data = AD5242_ID },
+	{ .name = "ad5243", .driver_data = AD5243_ID },
+	{ .name = "ad5245", .driver_data = AD5245_ID },
+	{ .name = "ad5246", .driver_data = AD5246_ID },
+	{ .name = "ad5247", .driver_data = AD5247_ID },
+	{ .name = "ad5248", .driver_data = AD5248_ID },
+	{ .name = "ad5280", .driver_data = AD5280_ID },
+	{ .name = "ad5282", .driver_data = AD5282_ID },
+	{ .name = "adn2860", .driver_data = ADN2860_ID },
+	{ .name = "ad5273", .driver_data = AD5273_ID },
+	{ .name = "ad5161", .driver_data = AD5161_ID },
+	{ .name = "ad5171", .driver_data = AD5171_ID },
+	{ .name = "ad5170", .driver_data = AD5170_ID },
+	{ .name = "ad5172", .driver_data = AD5172_ID },
+	{ .name = "ad5173", .driver_data = AD5173_ID },
+	{ .name = "ad5272", .driver_data = AD5272_ID },
+	{ .name = "ad5274", .driver_data = AD5274_ID },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ad_dpot_id);
 
diff --git a/drivers/misc/amd-sbi/rmi-i2c.c b/drivers/misc/amd-sbi/rmi-i2c.c
index 37e5ea83bf97..bbc0d14d1cfc 100644
--- a/drivers/misc/amd-sbi/rmi-i2c.c
+++ b/drivers/misc/amd-sbi/rmi-i2c.c
@@ -141,8 +141,8 @@ static void sbrmi_i2c_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id sbrmi_id[] = {
-	{"sbrmi-i2c"},
-	{}
+	{ .name = "sbrmi-i2c" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, sbrmi_id);
 
diff --git a/drivers/misc/apds9802als.c b/drivers/misc/apds9802als.c
index fc504bd8d916..1488e28819b7 100644
--- a/drivers/misc/apds9802als.c
+++ b/drivers/misc/apds9802als.c
@@ -285,7 +285,7 @@ static UNIVERSAL_DEV_PM_OPS(apds9802als_pm_ops, apds9802als_suspend,
 #endif	/* CONFIG_PM */
 
 static const struct i2c_device_id apds9802als_id[] = {
-	{ DRIVER_NAME },
+	{ .name = DRIVER_NAME },
 	{ }
 };
 
diff --git a/drivers/misc/bh1770glc.c b/drivers/misc/bh1770glc.c
index 45f8fc69a711..98fc5970b2bb 100644
--- a/drivers/misc/bh1770glc.c
+++ b/drivers/misc/bh1770glc.c
@@ -1363,9 +1363,9 @@ static int bh1770_runtime_resume(struct device *dev)
 #endif
 
 static const struct i2c_device_id bh1770_id[] = {
-	{ "bh1770glc" },
-	{ "sfh7770" },
-	{}
+	{ .name = "bh1770glc" },
+	{ .name = "sfh7770" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, bh1770_id);
diff --git a/drivers/misc/ds1682.c b/drivers/misc/ds1682.c
index cb09e056531a..f073a5067fc8 100644
--- a/drivers/misc/ds1682.c
+++ b/drivers/misc/ds1682.c
@@ -271,7 +271,7 @@ static void ds1682_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ds1682_id[] = {
-	{ "ds1682" },
+	{ .name = "ds1682" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ds1682_id);
diff --git a/drivers/misc/hmc6352.c b/drivers/misc/hmc6352.c
index ff92c6edff6b..275dc054ca04 100644
--- a/drivers/misc/hmc6352.c
+++ b/drivers/misc/hmc6352.c
@@ -121,7 +121,7 @@ static void hmc6352_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id hmc6352_id[] = {
-	{ "hmc6352" },
+	{ .name = "hmc6352" },
 	{ }
 };
 
diff --git a/drivers/misc/ics932s401.c b/drivers/misc/ics932s401.c
index 015710762a65..e8bcf0df2da8 100644
--- a/drivers/misc/ics932s401.c
+++ b/drivers/misc/ics932s401.c
@@ -95,7 +95,7 @@ static int ics932s401_detect(struct i2c_client *client,
 static void ics932s401_remove(struct i2c_client *client);
 
 static const struct i2c_device_id ics932s401_id[] = {
-	{ "ics932s401" },
+	{ .name = "ics932s401" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, ics932s401_id);
diff --git a/drivers/misc/isl29003.c b/drivers/misc/isl29003.c
index 95480e16ae5f..c9b526a212d0 100644
--- a/drivers/misc/isl29003.c
+++ b/drivers/misc/isl29003.c
@@ -449,8 +449,8 @@ static SIMPLE_DEV_PM_OPS(isl29003_pm_ops, isl29003_suspend, isl29003_resume);
 #endif /* CONFIG_PM_SLEEP */
 
 static const struct i2c_device_id isl29003_id[] = {
-	{ "isl29003" },
-	{}
+	{ .name = "isl29003" },
+	{ }
 };
 MODULE_DEVICE_TABLE(i2c, isl29003_id);
 
diff --git a/drivers/misc/isl29020.c b/drivers/misc/isl29020.c
index c288aeec16c0..dd966db28ec4 100644
--- a/drivers/misc/isl29020.c
+++ b/drivers/misc/isl29020.c
@@ -177,7 +177,7 @@ static void isl29020_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id isl29020_id[] = {
-	{ "isl29020" },
+	{ .name = "isl29020" },
 	{ }
 };
 
diff --git a/drivers/misc/lis3lv02d/lis3lv02d_i2c.c b/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
index 15119584473c..36032fc125f3 100644
--- a/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
+++ b/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
@@ -247,9 +247,9 @@ static int lis3_i2c_runtime_resume(struct device *dev)
 #endif /* CONFIG_PM */
 
 static const struct i2c_device_id lis3lv02d_id[] = {
-	{"lis3lv02d", LIS3LV02D},
-	{"lis331dlh", LIS331DLH},
-	{}
+	{ .name = "lis3lv02d", .driver_data = LIS3LV02D },
+	{ .name = "lis331dlh", .driver_data = LIS331DLH },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, lis3lv02d_id);
diff --git a/drivers/misc/tsl2550.c b/drivers/misc/tsl2550.c
index 03f19eda641e..c871ea860bb5 100644
--- a/drivers/misc/tsl2550.c
+++ b/drivers/misc/tsl2550.c
@@ -420,7 +420,7 @@ static SIMPLE_DEV_PM_OPS(tsl2550_pm_ops, tsl2550_suspend, tsl2550_resume);
 #endif /* CONFIG_PM_SLEEP */
 
 static const struct i2c_device_id tsl2550_id[] = {
-	{ "tsl2550" },
+	{ .name = "tsl2550" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, tsl2550_id);
-- 
2.55.0.11.g153666a7d9bb


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

* [PATCH v2 06/12] misc: Use named initializers for arrays of spi_device_data
  2026-07-17 14:50 [PATCH v2 00/12] misc: Improvements around *_device_id defintions Uwe Kleine-König (The Capable Hub)
                   ` (4 preceding siblings ...)
  2026-07-17 14:50 ` [PATCH v2 05/12] misc: " Uwe Kleine-König (The Capable Hub)
@ 2026-07-17 14:50 ` Uwe Kleine-König (The Capable Hub)
  2026-07-17 15:21   ` Uwe Kleine-König (The Capable Hub)
  2026-07-17 14:50 ` [PATCH v2 07/12] misc: mei: Use named initializers for acpi_device_id array Uwe Kleine-König (The Capable Hub)
                   ` (5 subsequent siblings)
  11 siblings, 1 reply; 14+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-07-17 14:50 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman; +Cc: linux-kernel, Uwe Kleine-König

While being less compact, using named initializers allows to more easily
see which members of the structs are assigned which value without having
to lookup the declaration of the struct. And it's also more robust
against changes to the struct definition.

The mentioned robustness is relevant for a planned change to struct
spi_device_id that replaces .driver_data by an anonymous union.

While touching all these arrays, unify usage of whitespace.

This patch doesn't modify the compiled arrays, only their representation
in source form benefits.

Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
---
 drivers/misc/ad525x_dpot-spi.c     | 58 +++++++++++++++---------------
 drivers/misc/gehc-achc.c           |  4 +--
 drivers/misc/keba/lan9252.c        |  4 +--
 drivers/misc/lattice-ecp3-config.c |  4 +--
 4 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/drivers/misc/ad525x_dpot-spi.c b/drivers/misc/ad525x_dpot-spi.c
index 263055bda48b..b582a14a3546 100644
--- a/drivers/misc/ad525x_dpot-spi.c
+++ b/drivers/misc/ad525x_dpot-spi.c
@@ -96,35 +96,35 @@ static void ad_dpot_spi_remove(struct spi_device *spi)
 }
 
 static const struct spi_device_id ad_dpot_spi_id[] = {
-	{"ad5160", AD5160_ID},
-	{"ad5161", AD5161_ID},
-	{"ad5162", AD5162_ID},
-	{"ad5165", AD5165_ID},
-	{"ad5200", AD5200_ID},
-	{"ad5201", AD5201_ID},
-	{"ad5203", AD5203_ID},
-	{"ad5204", AD5204_ID},
-	{"ad5206", AD5206_ID},
-	{"ad5207", AD5207_ID},
-	{"ad5231", AD5231_ID},
-	{"ad5232", AD5232_ID},
-	{"ad5233", AD5233_ID},
-	{"ad5235", AD5235_ID},
-	{"ad5260", AD5260_ID},
-	{"ad5262", AD5262_ID},
-	{"ad5263", AD5263_ID},
-	{"ad5290", AD5290_ID},
-	{"ad5291", AD5291_ID},
-	{"ad5292", AD5292_ID},
-	{"ad5293", AD5293_ID},
-	{"ad7376", AD7376_ID},
-	{"ad8400", AD8400_ID},
-	{"ad8402", AD8402_ID},
-	{"ad8403", AD8403_ID},
-	{"adn2850", ADN2850_ID},
-	{"ad5270", AD5270_ID},
-	{"ad5271", AD5271_ID},
-	{}
+	{ .name = "ad5160", .driver_data = AD5160_ID },
+	{ .name = "ad5161", .driver_data = AD5161_ID },
+	{ .name = "ad5162", .driver_data = AD5162_ID },
+	{ .name = "ad5165", .driver_data = AD5165_ID },
+	{ .name = "ad5200", .driver_data = AD5200_ID },
+	{ .name = "ad5201", .driver_data = AD5201_ID },
+	{ .name = "ad5203", .driver_data = AD5203_ID },
+	{ .name = "ad5204", .driver_data = AD5204_ID },
+	{ .name = "ad5206", .driver_data = AD5206_ID },
+	{ .name = "ad5207", .driver_data = AD5207_ID },
+	{ .name = "ad5231", .driver_data = AD5231_ID },
+	{ .name = "ad5232", .driver_data = AD5232_ID },
+	{ .name = "ad5233", .driver_data = AD5233_ID },
+	{ .name = "ad5235", .driver_data = AD5235_ID },
+	{ .name = "ad5260", .driver_data = AD5260_ID },
+	{ .name = "ad5262", .driver_data = AD5262_ID },
+	{ .name = "ad5263", .driver_data = AD5263_ID },
+	{ .name = "ad5290", .driver_data = AD5290_ID },
+	{ .name = "ad5291", .driver_data = AD5291_ID },
+	{ .name = "ad5292", .driver_data = AD5292_ID },
+	{ .name = "ad5293", .driver_data = AD5293_ID },
+	{ .name = "ad7376", .driver_data = AD7376_ID },
+	{ .name = "ad8400", .driver_data = AD8400_ID },
+	{ .name = "ad8402", .driver_data = AD8402_ID },
+	{ .name = "ad8403", .driver_data = AD8403_ID },
+	{ .name = "adn2850", .driver_data = ADN2850_ID },
+	{ .name = "ad5270", .driver_data = AD5270_ID },
+	{ .name = "ad5271", .driver_data = AD5271_ID },
+	{ }
 };
 MODULE_DEVICE_TABLE(spi, ad_dpot_spi_id);
 
diff --git a/drivers/misc/gehc-achc.c b/drivers/misc/gehc-achc.c
index 1abfa6c257de..9792189c0923 100644
--- a/drivers/misc/gehc-achc.c
+++ b/drivers/misc/gehc-achc.c
@@ -538,8 +538,8 @@ static int gehc_achc_probe(struct spi_device *spi)
 }
 
 static const struct spi_device_id gehc_achc_id[] = {
-	{ "ge,achc" },
-	{ "achc" },
+	{ .name = "ge,achc" },
+	{ .name = "achc" },
 	{ }
 };
 MODULE_DEVICE_TABLE(spi, gehc_achc_id);
diff --git a/drivers/misc/keba/lan9252.c b/drivers/misc/keba/lan9252.c
index fc54afd1d05b..874dd50fac66 100644
--- a/drivers/misc/keba/lan9252.c
+++ b/drivers/misc/keba/lan9252.c
@@ -339,8 +339,8 @@ static int lan9252_probe(struct spi_device *spi)
 }
 
 static const struct spi_device_id lan9252_id[] = {
-	{"lan9252"},
-	{}
+	{ .name = "lan9252" },
+	{ }
 };
 MODULE_DEVICE_TABLE(spi, lan9252_id);
 
diff --git a/drivers/misc/lattice-ecp3-config.c b/drivers/misc/lattice-ecp3-config.c
index 2b93d5660bf2..740b5cf53842 100644
--- a/drivers/misc/lattice-ecp3-config.c
+++ b/drivers/misc/lattice-ecp3-config.c
@@ -219,8 +219,8 @@ static void lattice_ecp3_remove(struct spi_device *spi)
 }
 
 static const struct spi_device_id lattice_ecp3_id[] = {
-	{ "ecp3-17" },
-	{ "ecp3-35" },
+	{ .name = "ecp3-17" },
+	{ .name = "ecp3-35" },
 	{ }
 };
 MODULE_DEVICE_TABLE(spi, lattice_ecp3_id);
-- 
2.55.0.11.g153666a7d9bb


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

* [PATCH v2 07/12] misc: mei: Use named initializers for acpi_device_id array
  2026-07-17 14:50 [PATCH v2 00/12] misc: Improvements around *_device_id defintions Uwe Kleine-König (The Capable Hub)
                   ` (5 preceding siblings ...)
  2026-07-17 14:50 ` [PATCH v2 06/12] misc: Use named initializers for arrays of spi_device_data Uwe Kleine-König (The Capable Hub)
@ 2026-07-17 14:50 ` Uwe Kleine-König (The Capable Hub)
  2026-07-17 14:50 ` [PATCH v2 08/12] misc: mei: Use named initializer for platform_device_id array Uwe Kleine-König (The Capable Hub)
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-07-17 14:50 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman; +Cc: Alexander Usyskin, linux-kernel

While being less compact, using named initializers allows to more easily
see which members of the structs are assigned which value without having
to lookup the declaration of the struct. And it's also more robust
against changes to the struct definition.

While touching this array, add a space to the list terminator to make it
match the most common usage.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
 drivers/misc/mei/vsc-tp.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/misc/mei/vsc-tp.c b/drivers/misc/mei/vsc-tp.c
index 5ecf99883996..432bc59f11f9 100644
--- a/drivers/misc/mei/vsc-tp.c
+++ b/drivers/misc/mei/vsc-tp.c
@@ -552,11 +552,11 @@ static void vsc_tp_remove(struct spi_device *spi)
 }
 
 static const struct acpi_device_id vsc_tp_acpi_ids[] = {
-	{ "INTC1009" }, /* Raptor Lake */
-	{ "INTC1058" }, /* Tiger Lake */
-	{ "INTC1094" }, /* Alder Lake */
-	{ "INTC10D0" }, /* Meteor Lake */
-	{}
+	{ .id = "INTC1009" }, /* Raptor Lake */
+	{ .id = "INTC1058" }, /* Tiger Lake */
+	{ .id = "INTC1094" }, /* Alder Lake */
+	{ .id = "INTC10D0" }, /* Meteor Lake */
+	{ }
 };
 MODULE_DEVICE_TABLE(acpi, vsc_tp_acpi_ids);
 
-- 
2.55.0.11.g153666a7d9bb


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

* [PATCH v2 08/12] misc: mei: Use named initializer for platform_device_id array
  2026-07-17 14:50 [PATCH v2 00/12] misc: Improvements around *_device_id defintions Uwe Kleine-König (The Capable Hub)
                   ` (6 preceding siblings ...)
  2026-07-17 14:50 ` [PATCH v2 07/12] misc: mei: Use named initializers for acpi_device_id array Uwe Kleine-König (The Capable Hub)
@ 2026-07-17 14:50 ` Uwe Kleine-König (The Capable Hub)
  2026-07-17 14:50 ` [PATCH v2 09/12] misc: ibmvmc: Use named initializers for vio_device_id array Uwe Kleine-König (The Capable Hub)
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-07-17 14:50 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman; +Cc: Alexander Usyskin, linux-kernel

While being less compact, using named initializers allows to more easily
see which members of the structs are assigned which value without having
to lookup the declaration of the struct. And it's also more robust
against changes to the struct definition.

The mentioned robustness is relevant for a planned change to struct
platform_device_id that replaces .driver_data by an anonymous union (though
this driver doesn't use .driver_data, so this patch isn't strictly
necessary for the plan, but still ok for consistency).

This patch doesn't modify the compiled array, only its representation
in source form benefits.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
 drivers/misc/mei/platform-vsc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/mei/platform-vsc.c b/drivers/misc/mei/platform-vsc.c
index 5100234ba5b6..ef6dcc043862 100644
--- a/drivers/misc/mei/platform-vsc.c
+++ b/drivers/misc/mei/platform-vsc.c
@@ -435,7 +435,7 @@ static int mei_vsc_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(mei_vsc_pm_ops, mei_vsc_suspend, mei_vsc_resume);
 
 static const struct platform_device_id mei_vsc_id_table[] = {
-	{ MEI_VSC_DRV_NAME },
+	{ .name = MEI_VSC_DRV_NAME },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(platform, mei_vsc_id_table);
-- 
2.55.0.11.g153666a7d9bb


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

* [PATCH v2 09/12] misc: ibmvmc: Use named initializers for vio_device_id array
  2026-07-17 14:50 [PATCH v2 00/12] misc: Improvements around *_device_id defintions Uwe Kleine-König (The Capable Hub)
                   ` (7 preceding siblings ...)
  2026-07-17 14:50 ` [PATCH v2 08/12] misc: mei: Use named initializer for platform_device_id array Uwe Kleine-König (The Capable Hub)
@ 2026-07-17 14:50 ` Uwe Kleine-König (The Capable Hub)
  2026-07-17 14:50 ` [PATCH v2 10/12] misc: eeprom: idt_89hpesx: Unify style of of_device_id array Uwe Kleine-König (The Capable Hub)
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-07-17 14:50 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman; +Cc: Brad Warrum, Ritu Agarwal, linux-kernel

While being less compact, using named initializers allows to more easily
see which members of the structs are assigned which value without having
to lookup the declaration of the struct. And it's also more robust
against changes to the struct definition.

While touching this array, also simplify the list terminator. This
change doesn't introduce differences to the compiled result.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
 drivers/misc/ibmvmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/ibmvmc.c b/drivers/misc/ibmvmc.c
index beb18c34f20d..a1d4955db5f3 100644
--- a/drivers/misc/ibmvmc.c
+++ b/drivers/misc/ibmvmc.c
@@ -2298,8 +2298,8 @@ static void ibmvmc_remove(struct vio_dev *vdev)
 }
 
 static struct vio_device_id ibmvmc_device_table[] = {
-	{ "ibm,vmc", "IBM,vmc" },
-	{ "", "" }
+	{ .type = "ibm,vmc", .compat = "IBM,vmc" },
+	{ }
 };
 MODULE_DEVICE_TABLE(vio, ibmvmc_device_table);
 
-- 
2.55.0.11.g153666a7d9bb


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

* [PATCH v2 10/12] misc: eeprom: idt_89hpesx: Unify style of of_device_id array
  2026-07-17 14:50 [PATCH v2 00/12] misc: Improvements around *_device_id defintions Uwe Kleine-König (The Capable Hub)
                   ` (8 preceding siblings ...)
  2026-07-17 14:50 ` [PATCH v2 09/12] misc: ibmvmc: Use named initializers for vio_device_id array Uwe Kleine-König (The Capable Hub)
@ 2026-07-17 14:50 ` Uwe Kleine-König (The Capable Hub)
  2026-07-17 14:50 ` [PATCH v2 11/12] misc: Unify style of of_device_id arrays Uwe Kleine-König (The Capable Hub)
  2026-07-17 14:50 ` [PATCH v2 12/12] misc: Unify code style for various *_device_id arrays Uwe Kleine-König (The Capable Hub)
  11 siblings, 0 replies; 14+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-07-17 14:50 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman
  Cc: Danilo Krummrich, Takashi Sakamoto, Bjorn Helgaas, linux-kernel

Update the of_device_id array to conform to the most used and generally
recommended coding style. That is:

 - No comma after the list terminator;
 - A comma after an initializer if (and only if) the closing } is not
   directly following;
 - No explicit zeros in the list terminator;
 - A space after an opening { and before a closing }, a single space in
   the list terminator;

Adapt the driver's array accordingly.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
 drivers/misc/eeprom/idt_89hpesx.c | 94 +++++++++++++++----------------
 1 file changed, 47 insertions(+), 47 deletions(-)

diff --git a/drivers/misc/eeprom/idt_89hpesx.c b/drivers/misc/eeprom/idt_89hpesx.c
index 5bc0294349a0..ea7478cfdd27 100644
--- a/drivers/misc/eeprom/idt_89hpesx.c
+++ b/drivers/misc/eeprom/idt_89hpesx.c
@@ -1445,58 +1445,58 @@ static const struct i2c_device_id idt_ids[] = {
 MODULE_DEVICE_TABLE(i2c, idt_ids);
 
 static const struct of_device_id idt_of_match[] = {
-	{ .compatible = "idt,89hpes8nt2", },
-	{ .compatible = "idt,89hpes12nt3", },
+	{ .compatible = "idt,89hpes8nt2" },
+	{ .compatible = "idt,89hpes12nt3" },
 
-	{ .compatible = "idt,89hpes24nt6ag2", },
-	{ .compatible = "idt,89hpes32nt8ag2", },
-	{ .compatible = "idt,89hpes32nt8bg2", },
-	{ .compatible = "idt,89hpes12nt12g2", },
-	{ .compatible = "idt,89hpes16nt16g2", },
-	{ .compatible = "idt,89hpes24nt24g2", },
-	{ .compatible = "idt,89hpes32nt24ag2", },
-	{ .compatible = "idt,89hpes32nt24bg2", },
+	{ .compatible = "idt,89hpes24nt6ag2" },
+	{ .compatible = "idt,89hpes32nt8ag2" },
+	{ .compatible = "idt,89hpes32nt8bg2" },
+	{ .compatible = "idt,89hpes12nt12g2" },
+	{ .compatible = "idt,89hpes16nt16g2" },
+	{ .compatible = "idt,89hpes24nt24g2" },
+	{ .compatible = "idt,89hpes32nt24ag2" },
+	{ .compatible = "idt,89hpes32nt24bg2" },
 
-	{ .compatible = "idt,89hpes12n3", },
-	{ .compatible = "idt,89hpes12n3a", },
-	{ .compatible = "idt,89hpes24n3", },
-	{ .compatible = "idt,89hpes24n3a", },
+	{ .compatible = "idt,89hpes12n3" },
+	{ .compatible = "idt,89hpes12n3a" },
+	{ .compatible = "idt,89hpes24n3" },
+	{ .compatible = "idt,89hpes24n3a" },
 
-	{ .compatible = "idt,89hpes32h8", },
-	{ .compatible = "idt,89hpes32h8g2", },
-	{ .compatible = "idt,89hpes48h12", },
-	{ .compatible = "idt,89hpes48h12g2", },
-	{ .compatible = "idt,89hpes48h12ag2", },
-	{ .compatible = "idt,89hpes16h16", },
-	{ .compatible = "idt,89hpes22h16", },
-	{ .compatible = "idt,89hpes22h16g2", },
-	{ .compatible = "idt,89hpes34h16", },
-	{ .compatible = "idt,89hpes34h16g2", },
-	{ .compatible = "idt,89hpes64h16", },
-	{ .compatible = "idt,89hpes64h16g2", },
-	{ .compatible = "idt,89hpes64h16ag2", },
+	{ .compatible = "idt,89hpes32h8" },
+	{ .compatible = "idt,89hpes32h8g2" },
+	{ .compatible = "idt,89hpes48h12" },
+	{ .compatible = "idt,89hpes48h12g2" },
+	{ .compatible = "idt,89hpes48h12ag2" },
+	{ .compatible = "idt,89hpes16h16" },
+	{ .compatible = "idt,89hpes22h16" },
+	{ .compatible = "idt,89hpes22h16g2" },
+	{ .compatible = "idt,89hpes34h16" },
+	{ .compatible = "idt,89hpes34h16g2" },
+	{ .compatible = "idt,89hpes64h16" },
+	{ .compatible = "idt,89hpes64h16g2" },
+	{ .compatible = "idt,89hpes64h16ag2" },
 
-	{ .compatible = "idt,89hpes12t3g2", },
-	{ .compatible = "idt,89hpes24t3g2", },
+	{ .compatible = "idt,89hpes12t3g2" },
+	{ .compatible = "idt,89hpes24t3g2" },
 
-	{ .compatible = "idt,89hpes16t4", },
-	{ .compatible = "idt,89hpes4t4g2", },
-	{ .compatible = "idt,89hpes10t4g2", },
-	{ .compatible = "idt,89hpes16t4g2", },
-	{ .compatible = "idt,89hpes16t4ag2", },
-	{ .compatible = "idt,89hpes5t5", },
-	{ .compatible = "idt,89hpes6t5", },
-	{ .compatible = "idt,89hpes8t5", },
-	{ .compatible = "idt,89hpes8t5a", },
-	{ .compatible = "idt,89hpes24t6", },
-	{ .compatible = "idt,89hpes6t6g2", },
-	{ .compatible = "idt,89hpes24t6g2", },
-	{ .compatible = "idt,89hpes16t7", },
-	{ .compatible = "idt,89hpes32t8", },
-	{ .compatible = "idt,89hpes32t8g2", },
-	{ .compatible = "idt,89hpes48t12", },
-	{ .compatible = "idt,89hpes48t12g2", },
-	{ },
+	{ .compatible = "idt,89hpes16t4" },
+	{ .compatible = "idt,89hpes4t4g2" },
+	{ .compatible = "idt,89hpes10t4g2" },
+	{ .compatible = "idt,89hpes16t4g2" },
+	{ .compatible = "idt,89hpes16t4ag2" },
+	{ .compatible = "idt,89hpes5t5" },
+	{ .compatible = "idt,89hpes6t5" },
+	{ .compatible = "idt,89hpes8t5" },
+	{ .compatible = "idt,89hpes8t5a" },
+	{ .compatible = "idt,89hpes24t6" },
+	{ .compatible = "idt,89hpes6t6g2" },
+	{ .compatible = "idt,89hpes24t6g2" },
+	{ .compatible = "idt,89hpes16t7" },
+	{ .compatible = "idt,89hpes32t8" },
+	{ .compatible = "idt,89hpes32t8g2" },
+	{ .compatible = "idt,89hpes48t12" },
+	{ .compatible = "idt,89hpes48t12g2" },
+	{ }
 };
 MODULE_DEVICE_TABLE(of, idt_of_match);
 
-- 
2.55.0.11.g153666a7d9bb


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

* [PATCH v2 11/12] misc: Unify style of of_device_id arrays
  2026-07-17 14:50 [PATCH v2 00/12] misc: Improvements around *_device_id defintions Uwe Kleine-König (The Capable Hub)
                   ` (9 preceding siblings ...)
  2026-07-17 14:50 ` [PATCH v2 10/12] misc: eeprom: idt_89hpesx: Unify style of of_device_id array Uwe Kleine-König (The Capable Hub)
@ 2026-07-17 14:50 ` Uwe Kleine-König (The Capable Hub)
  2026-07-17 14:50 ` [PATCH v2 12/12] misc: Unify code style for various *_device_id arrays Uwe Kleine-König (The Capable Hub)
  11 siblings, 0 replies; 14+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-07-17 14:50 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman
  Cc: Srinivas Kandagatla, Ekansh Gupta, John Stultz, Eric Piel,
	Romain Gantois, Danilo Krummrich, Bjorn Helgaas,
	Takashi Sakamoto, linux-kernel, linux-arm-msm, dri-devel

Update the various of_device_id arrays to conform to the most used and
generally recommended coding style. That is:

 - No comma after the list terminator;
 - A comma after an initializer if (and only if) the closing } is not
   directly following;
 - No explicit zeros in the list terminator;
 - A space after an opening { and before a closing }, a single space in
   the list terminator;

Adapt the few offenders accordingly.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
 drivers/misc/ds1682.c                  | 4 ++--
 drivers/misc/fastrpc.c                 | 6 +++---
 drivers/misc/hisi_hikey_usb.c          | 2 +-
 drivers/misc/lis3lv02d/lis3lv02d_i2c.c | 2 +-
 drivers/misc/lis3lv02d/lis3lv02d_spi.c | 2 +-
 drivers/misc/open-dice.c               | 2 +-
 drivers/misc/pvpanic/pvpanic-mmio.c    | 4 ++--
 drivers/misc/qcom-coincell.c           | 4 ++--
 drivers/misc/sram.c                    | 2 +-
 drivers/misc/ti_fpc202.c               | 2 +-
 drivers/misc/vcpu_stall_detector.c     | 4 ++--
 11 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/misc/ds1682.c b/drivers/misc/ds1682.c
index f073a5067fc8..4500d7d0ea77 100644
--- a/drivers/misc/ds1682.c
+++ b/drivers/misc/ds1682.c
@@ -277,8 +277,8 @@ static const struct i2c_device_id ds1682_id[] = {
 MODULE_DEVICE_TABLE(i2c, ds1682_id);
 
 static const struct of_device_id ds1682_of_match[] = {
-	{ .compatible = "dallas,ds1682", },
-	{}
+	{ .compatible = "dallas,ds1682" },
+	{ }
 };
 MODULE_DEVICE_TABLE(of, ds1682_of_match);
 
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
index d86e79134c68..f7b6aba8b71d 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -2299,8 +2299,8 @@ static void fastrpc_cb_remove(struct platform_device *pdev)
 }
 
 static const struct of_device_id fastrpc_match_table[] = {
-	{ .compatible = "qcom,fastrpc-compute-cb", },
-	{}
+	{ .compatible = "qcom,fastrpc-compute-cb" },
+	{ }
 };
 
 static struct platform_driver fastrpc_cb_driver = {
@@ -2579,7 +2579,7 @@ static int fastrpc_rpmsg_callback(struct rpmsg_device *rpdev, void *data,
 static const struct of_device_id fastrpc_rpmsg_of_match[] = {
 	{ .compatible = "qcom,kaanapali-fastrpc", .data = &kaanapali_soc_data },
 	{ .compatible = "qcom,fastrpc", .data = &default_soc_data },
-	{ },
+	{ }
 };
 MODULE_DEVICE_TABLE(of, fastrpc_rpmsg_of_match);
 
diff --git a/drivers/misc/hisi_hikey_usb.c b/drivers/misc/hisi_hikey_usb.c
index 79f06001259b..e68bc6e384d5 100644
--- a/drivers/misc/hisi_hikey_usb.c
+++ b/drivers/misc/hisi_hikey_usb.c
@@ -254,7 +254,7 @@ static void hisi_hikey_usb_remove(struct platform_device *pdev)
 
 static const struct of_device_id id_table_hisi_hikey_usb[] = {
 	{ .compatible = "hisilicon,usbhub" },
-	{}
+	{ }
 };
 MODULE_DEVICE_TABLE(of, id_table_hisi_hikey_usb);
 
diff --git a/drivers/misc/lis3lv02d/lis3lv02d_i2c.c b/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
index 36032fc125f3..7c3ca6d604d1 100644
--- a/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
+++ b/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
@@ -95,7 +95,7 @@ static union axis_conversion lis3lv02d_axis_map =
 #ifdef CONFIG_OF
 static const struct of_device_id lis3lv02d_i2c_dt_ids[] = {
 	{ .compatible = "st,lis3lv02d" },
-	{}
+	{ }
 };
 MODULE_DEVICE_TABLE(of, lis3lv02d_i2c_dt_ids);
 #endif
diff --git a/drivers/misc/lis3lv02d/lis3lv02d_spi.c b/drivers/misc/lis3lv02d/lis3lv02d_spi.c
index 203a108b8883..5bf95176a00e 100644
--- a/drivers/misc/lis3lv02d/lis3lv02d_spi.c
+++ b/drivers/misc/lis3lv02d/lis3lv02d_spi.c
@@ -60,7 +60,7 @@ static union axis_conversion lis3lv02d_axis_normal =
 #ifdef CONFIG_OF
 static const struct of_device_id lis302dl_spi_dt_ids[] = {
 	{ .compatible = "st,lis302dl-spi" },
-	{}
+	{ }
 };
 MODULE_DEVICE_TABLE(of, lis302dl_spi_dt_ids);
 #endif
diff --git a/drivers/misc/open-dice.c b/drivers/misc/open-dice.c
index 45060fb4ea27..77ab0c1e83d3 100644
--- a/drivers/misc/open-dice.c
+++ b/drivers/misc/open-dice.c
@@ -177,7 +177,7 @@ static void open_dice_remove(struct platform_device *pdev)
 
 static const struct of_device_id open_dice_of_match[] = {
 	{ .compatible = "google,open-dice" },
-	{},
+	{ }
 };
 
 static struct platform_driver open_dice_driver = {
diff --git a/drivers/misc/pvpanic/pvpanic-mmio.c b/drivers/misc/pvpanic/pvpanic-mmio.c
index 43a094bfdaec..724dfddf69e4 100644
--- a/drivers/misc/pvpanic/pvpanic-mmio.c
+++ b/drivers/misc/pvpanic/pvpanic-mmio.c
@@ -51,8 +51,8 @@ static int pvpanic_mmio_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id pvpanic_mmio_match[] = {
-	{ .compatible = "qemu,pvpanic-mmio", },
-	{}
+	{ .compatible = "qemu,pvpanic-mmio" },
+	{ }
 };
 MODULE_DEVICE_TABLE(of, pvpanic_mmio_match);
 
diff --git a/drivers/misc/qcom-coincell.c b/drivers/misc/qcom-coincell.c
index 3c57f7429147..b58bd34fc471 100644
--- a/drivers/misc/qcom-coincell.c
+++ b/drivers/misc/qcom-coincell.c
@@ -124,8 +124,8 @@ static int qcom_coincell_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id qcom_coincell_match_table[] = {
-	{ .compatible = "qcom,pm8941-coincell", },
-	{}
+	{ .compatible = "qcom,pm8941-coincell" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(of, qcom_coincell_match_table);
diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c
index 1919d24c8236..c8990e83a65a 100644
--- a/drivers/misc/sram.c
+++ b/drivers/misc/sram.c
@@ -370,7 +370,7 @@ static const struct of_device_id sram_dt_ids[] = {
 	{ .compatible = "nvidia,tegra186-sysram", .data = &tegra_sysram_config },
 	{ .compatible = "nvidia,tegra194-sysram", .data = &tegra_sysram_config },
 	{ .compatible = "nvidia,tegra234-sysram", .data = &tegra_sysram_config },
-	{}
+	{ }
 };
 
 static int sram_probe(struct platform_device *pdev)
diff --git a/drivers/misc/ti_fpc202.c b/drivers/misc/ti_fpc202.c
index 2aac83ec4a39..9e2d24f89457 100644
--- a/drivers/misc/ti_fpc202.c
+++ b/drivers/misc/ti_fpc202.c
@@ -718,7 +718,7 @@ static void fpc202_remove(struct i2c_client *client)
 
 static const struct of_device_id fpc202_of_match[] = {
 	{ .compatible = "ti,fpc202" },
-	{}
+	{ }
 };
 MODULE_DEVICE_TABLE(of, fpc202_of_match);
 
diff --git a/drivers/misc/vcpu_stall_detector.c b/drivers/misc/vcpu_stall_detector.c
index 26166357b255..1306b2c1ef99 100644
--- a/drivers/misc/vcpu_stall_detector.c
+++ b/drivers/misc/vcpu_stall_detector.c
@@ -224,8 +224,8 @@ static void vcpu_stall_detect_remove(struct platform_device *pdev)
 }
 
 static const struct of_device_id vcpu_stall_detect_of_match[] = {
-	{ .compatible = "qemu,vcpu-stall-detector", },
-	{}
+	{ .compatible = "qemu,vcpu-stall-detector" },
+	{ }
 };
 
 MODULE_DEVICE_TABLE(of, vcpu_stall_detect_of_match);
-- 
2.55.0.11.g153666a7d9bb


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

* [PATCH v2 12/12] misc: Unify code style for various *_device_id arrays
  2026-07-17 14:50 [PATCH v2 00/12] misc: Improvements around *_device_id defintions Uwe Kleine-König (The Capable Hub)
                   ` (10 preceding siblings ...)
  2026-07-17 14:50 ` [PATCH v2 11/12] misc: Unify style of of_device_id arrays Uwe Kleine-König (The Capable Hub)
@ 2026-07-17 14:50 ` Uwe Kleine-König (The Capable Hub)
  11 siblings, 0 replies; 14+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-07-17 14:50 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman
  Cc: Scott Branden, Broadcom internal kernel review list,
	Michał Mirosław, Keng-Yu Lin, Vaibhaav Ram T.L,
	Kumaravel Thiagarajan, Alexander Usyskin, Vamsi Attunuru,
	Alexander Graf, The AWS Nitro Enclaves Team, Mahesh J Salgaonkar,
	Andrew Donnellan, Manivannan Sadhasivam,
	Krzysztof Wilczyński, Kishon Vijay Abraham I, Frank Li,
	Jiri Slaby, Andrea della Porta, Bryan Tan, Vishnu Dasa,
	Naveen Krishna Chatradhi, Akshay Gupta, Kees Cook, linux-kernel,
	linux-gpio, linuxppc-dev, linux-pci

 - Add a trailing comma for initializers unless the closing brace is on
   the same line and for the list terminator;
 - Use a single space in the list terminator;
 - A space after an opening { and before a closing };
 - Use the PCI_DEVICE* macro in two drivers for pci_device_id entry
   which is usual for these arrays
 - No explicit zeros in the list terminator;

None of these changes introduces changes to the compiled result.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
 drivers/misc/amd-sbi/rmi-i2c.c                |   2 +-
 drivers/misc/bcm-vk/bcm_vk_dev.c              |   2 +-
 drivers/misc/cardreader/alcor_pci.c           |   2 +-
 drivers/misc/cb710/core.c                     |   5 +-
 drivers/misc/hi6421v600-irq.c                 |   2 +-
 drivers/misc/hpilo.c                          |   6 +-
 drivers/misc/ibmasm/module.c                  |   2 +-
 drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c |   2 +-
 .../misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c   |   4 +-
 .../misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c |   4 +-
 drivers/misc/mei/pci-csc.c                    |   2 +-
 drivers/misc/mei/pci-me.c                     | 166 +++++++++---------
 drivers/misc/mei/pci-txe.c                    |   6 +-
 drivers/misc/mrvl_cn10k_dpi.c                 |   2 +-
 drivers/misc/nsm.c                            |   2 +-
 drivers/misc/ocxl/pci.c                       |   2 +-
 drivers/misc/pci_endpoint_test.c              |  16 +-
 drivers/misc/phantom.c                        |   6 +-
 drivers/misc/pvpanic/pvpanic-pci.c            |   4 +-
 drivers/misc/rp1/rp1_pci.c                    |   2 +-
 drivers/misc/vmw_vmci/vmci_guest.c            |   4 +-
 21 files changed, 121 insertions(+), 122 deletions(-)

diff --git a/drivers/misc/amd-sbi/rmi-i2c.c b/drivers/misc/amd-sbi/rmi-i2c.c
index bbc0d14d1cfc..463a9a757464 100644
--- a/drivers/misc/amd-sbi/rmi-i2c.c
+++ b/drivers/misc/amd-sbi/rmi-i2c.c
@@ -226,7 +226,7 @@ static const struct i3c_device_id sbrmi_i3c_id[] = {
 	I3C_DEVICE_EXTRA_INFO(0x0, 0x100, 0x118, NULL), /* Socket:1, Venice */
 	I3C_DEVICE_EXTRA_INFO(0x112, 0x0, 0x119, NULL), /* Socket:0, Venice */
 	I3C_DEVICE_EXTRA_INFO(0x112, 0x100, 0x119, NULL), /* Socket:1, Venice */
-	{}
+	{ }
 };
 MODULE_DEVICE_TABLE(i3c, sbrmi_i3c_id);
 
diff --git a/drivers/misc/bcm-vk/bcm_vk_dev.c b/drivers/misc/bcm-vk/bcm_vk_dev.c
index 5773ffb46f0f..7aa818a7717a 100644
--- a/drivers/misc/bcm-vk/bcm_vk_dev.c
+++ b/drivers/misc/bcm-vk/bcm_vk_dev.c
@@ -1632,7 +1632,7 @@ static void bcm_vk_shutdown(struct pci_dev *pdev)
 }
 
 static const struct pci_device_id bcm_vk_ids[] = {
-	{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_VALKYRIE), },
+	{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_VALKYRIE) },
 	{ }
 };
 MODULE_DEVICE_TABLE(pci, bcm_vk_ids);
diff --git a/drivers/misc/cardreader/alcor_pci.c b/drivers/misc/cardreader/alcor_pci.c
index 8e7ea2c9142d..9e0f4f91763e 100644
--- a/drivers/misc/cardreader/alcor_pci.c
+++ b/drivers/misc/cardreader/alcor_pci.c
@@ -47,7 +47,7 @@ static const struct pci_device_id pci_ids[] = {
 		.driver_data = (kernel_ulong_t)&au6621_cfg },
 	{ PCI_DEVICE(PCI_ID_ALCOR_MICRO, PCI_ID_AU6625),
 		.driver_data = (kernel_ulong_t)&au6625_cfg },
-	{},
+	{ }
 };
 MODULE_DEVICE_TABLE(pci, pci_ids);
 
diff --git a/drivers/misc/cb710/core.c b/drivers/misc/cb710/core.c
index 2dd212f04fed..8e0d11e59c4e 100644
--- a/drivers/misc/cb710/core.c
+++ b/drivers/misc/cb710/core.c
@@ -292,9 +292,8 @@ static void cb710_remove_one(struct pci_dev *pdev)
 }
 
 static const struct pci_device_id cb710_pci_tbl[] = {
-	{ PCI_VENDOR_ID_ENE, PCI_DEVICE_ID_ENE_CB710_FLASH,
-		PCI_ANY_ID, PCI_ANY_ID, },
-	{ 0, }
+	{ PCI_DEVICE(PCI_VENDOR_ID_ENE, PCI_DEVICE_ID_ENE_CB710_FLASH) },
+	{ }
 };
 
 static SIMPLE_DEV_PM_OPS(cb710_pm_ops, cb710_suspend, cb710_resume);
diff --git a/drivers/misc/hi6421v600-irq.c b/drivers/misc/hi6421v600-irq.c
index 5ba40222eb12..143f2ffa846f 100644
--- a/drivers/misc/hi6421v600-irq.c
+++ b/drivers/misc/hi6421v600-irq.c
@@ -285,7 +285,7 @@ static int hi6421v600_irq_probe(struct platform_device *pdev)
 
 static const struct platform_device_id hi6421v600_irq_table[] = {
 	{ .name = "hi6421v600-irq" },
-	{},
+	{ }
 };
 MODULE_DEVICE_TABLE(platform, hi6421v600_irq_table);
 
diff --git a/drivers/misc/hpilo.c b/drivers/misc/hpilo.c
index ff3f03ea577e..40e96d15164a 100644
--- a/drivers/misc/hpilo.c
+++ b/drivers/misc/hpilo.c
@@ -33,10 +33,10 @@ static unsigned int max_ccb = 16;
 static char ilo_hwdev[MAX_ILO_DEV];
 static const struct pci_device_id ilo_blacklist[] = {
 	/* auxiliary iLO */
-	{PCI_DEVICE_SUB(PCI_VENDOR_ID_HP, 0x3307, PCI_VENDOR_ID_HP, 0x1979)},
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_HP, 0x3307, PCI_VENDOR_ID_HP, 0x1979) },
 	/* CL */
-	{PCI_DEVICE_SUB(PCI_VENDOR_ID_HP, 0x3307, PCI_VENDOR_ID_HP_3PAR, 0x0289)},
-	{}
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_HP, 0x3307, PCI_VENDOR_ID_HP_3PAR, 0x0289) },
+	{ }
 };
 
 static inline int get_entry_id(int entry)
diff --git a/drivers/misc/ibmasm/module.c b/drivers/misc/ibmasm/module.c
index 4509c15a76a8..97f661f54b31 100644
--- a/drivers/misc/ibmasm/module.c
+++ b/drivers/misc/ibmasm/module.c
@@ -178,7 +178,7 @@ static void ibmasm_remove_one(struct pci_dev *pdev)
 static struct pci_device_id ibmasm_pci_table[] =
 {
 	{ PCI_DEVICE(VENDORID_IBM, DEVICEID_RSA) },
-	{},
+	{ }
 };
 
 static struct pci_driver ibmasm_driver = {
diff --git a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c
index 48bea1117771..b0b678e6b28d 100644
--- a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c
+++ b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c
@@ -150,7 +150,7 @@ static const struct pci_device_id pci1xxxx_tbl[] = {
 	{ PCI_DEVICE(0x1055, 0xA035) },
 	{ PCI_DEVICE(0x1055, 0xA045) },
 	{ PCI_DEVICE(0x1055, 0xA055) },
-	{0,}
+	{ }
 };
 MODULE_DEVICE_TABLE(pci, pci1xxxx_tbl);
 
diff --git a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c
index 8eddbaa1fccd..82635db04dc5 100644
--- a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c
+++ b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c
@@ -513,8 +513,8 @@ static int pci1xxxx_gpio_probe(struct auxiliary_device *aux_dev,
 static DEFINE_SIMPLE_DEV_PM_OPS(pci1xxxx_gpio_pm_ops, pci1xxxx_gpio_suspend, pci1xxxx_gpio_resume);
 
 static const struct auxiliary_device_id pci1xxxx_gpio_auxiliary_id_table[] = {
-	{.name = "mchp_pci1xxxx_gp.gp_gpio"},
-	{}
+	{ .name = "mchp_pci1xxxx_gp.gp_gpio" },
+	{ }
 };
 MODULE_DEVICE_TABLE(auxiliary, pci1xxxx_gpio_auxiliary_id_table);
 
diff --git a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c
index a2ed477e0370..09841c4f1a06 100644
--- a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c
+++ b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c
@@ -419,8 +419,8 @@ static void pci1xxxx_otp_eeprom_remove(struct auxiliary_device *aux_dev)
 }
 
 static const struct auxiliary_device_id pci1xxxx_otp_eeprom_auxiliary_id_table[] = {
-	{.name = "mchp_pci1xxxx_gp.gp_otp_e2p"},
-	{},
+	{ .name = "mchp_pci1xxxx_gp.gp_otp_e2p" },
+	{ }
 };
 MODULE_DEVICE_TABLE(auxiliary, pci1xxxx_otp_eeprom_auxiliary_id_table);
 
diff --git a/drivers/misc/mei/pci-csc.c b/drivers/misc/mei/pci-csc.c
index 70792bf9b3c0..6e1e8008f267 100644
--- a/drivers/misc/mei/pci-csc.c
+++ b/drivers/misc/mei/pci-csc.c
@@ -240,7 +240,7 @@ static const struct dev_pm_ops mei_csc_pm_ops = {
 
 static const struct pci_device_id mei_csc_pci_tbl[] = {
 	{ PCI_DEVICE_DATA(INTEL, MEI_CRI, MEI_ME_CSC_CFG) },
-	{}
+	{ }
 };
 MODULE_DEVICE_TABLE(pci, mei_csc_pci_tbl);
 
diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c
index 55e0b8a98827..790a4647811b 100644
--- a/drivers/misc/mei/pci-me.c
+++ b/drivers/misc/mei/pci-me.c
@@ -27,114 +27,114 @@
 
 /* mei_pci_tbl - PCI Device ID Table */
 static const struct pci_device_id mei_me_pci_tbl[] = {
-	{PCI_DEVICE_DATA(INTEL, MEI_82946GZ, MEI_ME_ICH_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_82G35, MEI_ME_ICH_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_82Q965, MEI_ME_ICH_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_82G965, MEI_ME_ICH_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_82GM965, MEI_ME_ICH_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_82GME965, MEI_ME_ICH_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ICH9_82Q35, MEI_ME_ICH_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ICH9_82G33, MEI_ME_ICH_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ICH9_82Q33, MEI_ME_ICH_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ICH9_82X38, MEI_ME_ICH_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ICH9_3200, MEI_ME_ICH_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_82946GZ, MEI_ME_ICH_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_82G35, MEI_ME_ICH_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_82Q965, MEI_ME_ICH_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_82G965, MEI_ME_ICH_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_82GM965, MEI_ME_ICH_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_82GME965, MEI_ME_ICH_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ICH9_82Q35, MEI_ME_ICH_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ICH9_82G33, MEI_ME_ICH_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ICH9_82Q33, MEI_ME_ICH_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ICH9_82X38, MEI_ME_ICH_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ICH9_3200, MEI_ME_ICH_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_ICH9_6, MEI_ME_ICH_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ICH9_7, MEI_ME_ICH_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ICH9_8, MEI_ME_ICH_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ICH9_9, MEI_ME_ICH_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ICH9_10, MEI_ME_ICH_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ICH9M_1, MEI_ME_ICH_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ICH9M_2, MEI_ME_ICH_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ICH9M_3, MEI_ME_ICH_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ICH9M_4, MEI_ME_ICH_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_ICH9_6, MEI_ME_ICH_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ICH9_7, MEI_ME_ICH_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ICH9_8, MEI_ME_ICH_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ICH9_9, MEI_ME_ICH_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ICH9_10, MEI_ME_ICH_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ICH9M_1, MEI_ME_ICH_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ICH9M_2, MEI_ME_ICH_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ICH9M_3, MEI_ME_ICH_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ICH9M_4, MEI_ME_ICH_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_ICH10_1, MEI_ME_ICH10_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ICH10_2, MEI_ME_ICH10_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ICH10_3, MEI_ME_ICH10_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ICH10_4, MEI_ME_ICH10_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_ICH10_1, MEI_ME_ICH10_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ICH10_2, MEI_ME_ICH10_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ICH10_3, MEI_ME_ICH10_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ICH10_4, MEI_ME_ICH10_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_IBXPK_1, MEI_ME_PCH6_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_IBXPK_2, MEI_ME_PCH6_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_CPT_1, MEI_ME_PCH_CPT_PBG_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_PBG_1, MEI_ME_PCH_CPT_PBG_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_PPT_1, MEI_ME_PCH7_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_PPT_2, MEI_ME_PCH7_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_PPT_3, MEI_ME_PCH7_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_LPT_H, MEI_ME_PCH8_SPS_4_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_LPT_W, MEI_ME_PCH8_SPS_4_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_LPT_LP, MEI_ME_PCH8_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_LPT_HR, MEI_ME_PCH8_SPS_4_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_WPT_LP, MEI_ME_PCH8_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_WPT_LP_2, MEI_ME_PCH8_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_IBXPK_1, MEI_ME_PCH6_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_IBXPK_2, MEI_ME_PCH6_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_CPT_1, MEI_ME_PCH_CPT_PBG_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_PBG_1, MEI_ME_PCH_CPT_PBG_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_PPT_1, MEI_ME_PCH7_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_PPT_2, MEI_ME_PCH7_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_PPT_3, MEI_ME_PCH7_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_LPT_H, MEI_ME_PCH8_SPS_4_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_LPT_W, MEI_ME_PCH8_SPS_4_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_LPT_LP, MEI_ME_PCH8_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_LPT_HR, MEI_ME_PCH8_SPS_4_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_WPT_LP, MEI_ME_PCH8_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_WPT_LP_2, MEI_ME_PCH8_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_SPT, MEI_ME_PCH8_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_SPT_2, MEI_ME_PCH8_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_SPT_3, MEI_ME_PCH8_ITOUCH_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_SPT_H, MEI_ME_PCH8_SPS_4_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_SPT_H_2, MEI_ME_PCH8_SPS_4_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_LBG, MEI_ME_PCH12_SPS_4_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_SPT, MEI_ME_PCH8_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_SPT_2, MEI_ME_PCH8_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_SPT_3, MEI_ME_PCH8_ITOUCH_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_SPT_H, MEI_ME_PCH8_SPS_4_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_SPT_H_2, MEI_ME_PCH8_SPS_4_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_LBG, MEI_ME_PCH12_SPS_4_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_BXT_M, MEI_ME_PCH8_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_APL_I, MEI_ME_PCH8_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_BXT_M, MEI_ME_PCH8_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_APL_I, MEI_ME_PCH8_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_DNV_IE, MEI_ME_PCH8_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_DNV_IE, MEI_ME_PCH8_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_GLK, MEI_ME_PCH8_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_GLK, MEI_ME_PCH8_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_KBP, MEI_ME_PCH8_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_KBP_2, MEI_ME_PCH8_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_KBP_3, MEI_ME_PCH8_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_KBP, MEI_ME_PCH8_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_KBP_2, MEI_ME_PCH8_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_KBP_3, MEI_ME_PCH8_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_CNP_LP, MEI_ME_PCH12_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_CNP_LP_3, MEI_ME_PCH8_ITOUCH_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_CNP_H, MEI_ME_PCH12_SPS_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_CNP_H_3, MEI_ME_PCH12_SPS_ITOUCH_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_CNP_LP, MEI_ME_PCH12_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_CNP_LP_3, MEI_ME_PCH8_ITOUCH_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_CNP_H, MEI_ME_PCH12_SPS_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_CNP_H_3, MEI_ME_PCH12_SPS_ITOUCH_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_CMP_LP, MEI_ME_PCH12_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_CMP_LP_3, MEI_ME_PCH8_ITOUCH_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_CMP_V, MEI_ME_PCH12_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_CMP_H, MEI_ME_PCH12_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_CMP_H_3, MEI_ME_PCH8_ITOUCH_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_CMP_LP, MEI_ME_PCH12_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_CMP_LP_3, MEI_ME_PCH8_ITOUCH_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_CMP_V, MEI_ME_PCH12_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_CMP_H, MEI_ME_PCH12_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_CMP_H_3, MEI_ME_PCH8_ITOUCH_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_ICP_LP, MEI_ME_PCH12_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ICP_N, MEI_ME_PCH12_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_ICP_LP, MEI_ME_PCH12_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ICP_N, MEI_ME_PCH12_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_TGP_LP, MEI_ME_PCH15_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_TGP_H, MEI_ME_PCH15_SPS_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_TGP_LP, MEI_ME_PCH15_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_TGP_H, MEI_ME_PCH15_SPS_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_JSP_N, MEI_ME_PCH15_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_JSP_N, MEI_ME_PCH15_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_MCC, MEI_ME_PCH15_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_MCC_4, MEI_ME_PCH8_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_MCC, MEI_ME_PCH15_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_MCC_4, MEI_ME_PCH8_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_CDF, MEI_ME_PCH8_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_CDF, MEI_ME_PCH8_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_EBG, MEI_ME_PCH15_SPS_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_EBG, MEI_ME_PCH15_SPS_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_ADP_S, MEI_ME_PCH15_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ADP_LP, MEI_ME_PCH15_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ADP_P, MEI_ME_PCH15_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ADP_N, MEI_ME_PCH15_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_ADP_S, MEI_ME_PCH15_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ADP_LP, MEI_ME_PCH15_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ADP_P, MEI_ME_PCH15_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ADP_N, MEI_ME_PCH15_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_RPL_S, MEI_ME_PCH15_SPS_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_RPL_S, MEI_ME_PCH15_SPS_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_MTL_M, MEI_ME_PCH15_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ARL_S, MEI_ME_PCH15_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_ARL_H, MEI_ME_PCH15_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_MTL_M, MEI_ME_PCH15_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ARL_S, MEI_ME_PCH15_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_ARL_H, MEI_ME_PCH15_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_LNL_M, MEI_ME_PCH15_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_LNL_M, MEI_ME_PCH15_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_PTL_H, MEI_ME_PCH15_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_PTL_P, MEI_ME_PCH15_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_PTL_H, MEI_ME_PCH15_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_PTL_P, MEI_ME_PCH15_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_WCL_P, MEI_ME_PCH15_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_WCL_P, MEI_ME_PCH15_CFG) },
 
-	{PCI_DEVICE_DATA(INTEL, MEI_NVL_S, MEI_ME_PCH22_IOE_CFG)},
-	{PCI_DEVICE_DATA(INTEL, MEI_NVL_H, MEI_ME_PCH15_CFG)},
+	{ PCI_DEVICE_DATA(INTEL, MEI_NVL_S, MEI_ME_PCH22_IOE_CFG) },
+	{ PCI_DEVICE_DATA(INTEL, MEI_NVL_H, MEI_ME_PCH15_CFG) },
 
 	/* required last entry */
-	{0, }
+	{ }
 };
 
 MODULE_DEVICE_TABLE(pci, mei_me_pci_tbl);
diff --git a/drivers/misc/mei/pci-txe.c b/drivers/misc/mei/pci-txe.c
index f5441bc5efe2..815ca72877ce 100644
--- a/drivers/misc/mei/pci-txe.c
+++ b/drivers/misc/mei/pci-txe.c
@@ -24,10 +24,10 @@
 #include "hw-txe.h"
 
 static const struct pci_device_id mei_txe_pci_tbl[] = {
-	{PCI_VDEVICE(INTEL, 0x0F18)}, /* Baytrail */
-	{PCI_VDEVICE(INTEL, 0x2298)}, /* Cherrytrail */
+	{ PCI_VDEVICE(INTEL, 0x0F18) }, /* Baytrail */
+	{ PCI_VDEVICE(INTEL, 0x2298) }, /* Cherrytrail */
 
-	{0, }
+	{ }
 };
 MODULE_DEVICE_TABLE(pci, mei_txe_pci_tbl);
 
diff --git a/drivers/misc/mrvl_cn10k_dpi.c b/drivers/misc/mrvl_cn10k_dpi.c
index 7d5433121ff6..29b7a4110300 100644
--- a/drivers/misc/mrvl_cn10k_dpi.c
+++ b/drivers/misc/mrvl_cn10k_dpi.c
@@ -658,7 +658,7 @@ static void dpi_remove(struct pci_dev *pdev)
 static const struct pci_device_id dpi_id_table[] = {
 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_MRVL_CN10K_DPI_PF,
 			 PCI_VENDOR_ID_CAVIUM, PCI_SUBDEVID_MRVL_CN10K_DPI_PF) },
-	{ 0, }  /* end of table */
+	{ }  /* end of table */
 };
 
 static struct pci_driver dpi_driver = {
diff --git a/drivers/misc/nsm.c b/drivers/misc/nsm.c
index ef7b32742340..7940e80979a9 100644
--- a/drivers/misc/nsm.c
+++ b/drivers/misc/nsm.c
@@ -61,7 +61,7 @@ struct nsm {
 /* NSM device ID */
 static const struct virtio_device_id id_table[] = {
 	{ VIRTIO_ID_NITRO_SEC_MOD, VIRTIO_DEV_ANY_ID },
-	{ 0 },
+	{ }
 };
 
 static struct nsm *file_to_nsm(struct file *file)
diff --git a/drivers/misc/ocxl/pci.c b/drivers/misc/ocxl/pci.c
index cb920aa88d3a..0cf38bd482a9 100644
--- a/drivers/misc/ocxl/pci.c
+++ b/drivers/misc/ocxl/pci.c
@@ -9,7 +9,7 @@
  * vendor/device ID to help differentiate devices.
  */
 static const struct pci_device_id ocxl_pci_tbl[] = {
-	{ PCI_DEVICE(PCI_VENDOR_ID_IBM, 0x062B), },
+	{ PCI_DEVICE(PCI_VENDOR_ID_IBM, 0x062B) },
 	{ }
 };
 MODULE_DEVICE_TABLE(pci, ocxl_pci_tbl);
diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c
index 3635741c3e7a..a10fce77e0b4 100644
--- a/drivers/misc/pci_endpoint_test.c
+++ b/drivers/misc/pci_endpoint_test.c
@@ -1416,18 +1416,18 @@ static const struct pci_device_id pci_endpoint_test_tbl[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_FREESCALE, 0x81c0),
 	  .driver_data = (kernel_ulong_t)&default_data,
 	},
-	{ PCI_DEVICE(PCI_VENDOR_ID_FREESCALE, PCI_DEVICE_ID_IMX8),},
+	{ PCI_DEVICE(PCI_VENDOR_ID_FREESCALE, PCI_DEVICE_ID_IMX8) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_FREESCALE, PCI_DEVICE_ID_LS1088A),
 	  .driver_data = (kernel_ulong_t)&default_data,
 	},
 	{ PCI_DEVICE_DATA(SYNOPSYS, EDDA, NULL) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_AM654),
-	  .driver_data = (kernel_ulong_t)&am654_data
+	  .driver_data = (kernel_ulong_t)&am654_data,
 	},
-	{ PCI_DEVICE(PCI_VENDOR_ID_RENESAS, PCI_DEVICE_ID_RENESAS_R8A774A1),},
-	{ PCI_DEVICE(PCI_VENDOR_ID_RENESAS, PCI_DEVICE_ID_RENESAS_R8A774B1),},
-	{ PCI_DEVICE(PCI_VENDOR_ID_RENESAS, PCI_DEVICE_ID_RENESAS_R8A774C0),},
-	{ PCI_DEVICE(PCI_VENDOR_ID_RENESAS, PCI_DEVICE_ID_RENESAS_R8A774E1),},
+	{ PCI_DEVICE(PCI_VENDOR_ID_RENESAS, PCI_DEVICE_ID_RENESAS_R8A774A1) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_RENESAS, PCI_DEVICE_ID_RENESAS_R8A774B1) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_RENESAS, PCI_DEVICE_ID_RENESAS_R8A774C0) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_RENESAS, PCI_DEVICE_ID_RENESAS_R8A774E1) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_RENESAS, PCI_DEVICE_ID_RENESAS_R8A779F0),
 	  .driver_data = (kernel_ulong_t)&default_data,
 	},
@@ -1446,8 +1446,8 @@ static const struct pci_device_id pci_endpoint_test_tbl[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_ROCKCHIP, PCI_DEVICE_ID_ROCKCHIP_RK3588),
 	  .driver_data = (kernel_ulong_t)&rk3588_data,
 	},
-	{ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_TEGRA194_EP),},
-	{ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_TEGRA234_EP),},
+	{ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_TEGRA194_EP) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_TEGRA234_EP) },
 	{ }
 };
 MODULE_DEVICE_TABLE(pci, pci_endpoint_test_tbl);
diff --git a/drivers/misc/phantom.c b/drivers/misc/phantom.c
index 34a5054a6b40..331cae539290 100644
--- a/drivers/misc/phantom.c
+++ b/drivers/misc/phantom.c
@@ -481,10 +481,10 @@ static int __maybe_unused phantom_resume(struct device *dev_d)
 }
 
 static struct pci_device_id phantom_pci_tbl[] = {
-	{ .vendor = PCI_VENDOR_ID_PLX, .device = PCI_DEVICE_ID_PLX_9050,
-	  .subvendor = PCI_VENDOR_ID_PLX, .subdevice = PCI_DEVICE_ID_PLX_9050,
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
+			 PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050),
 	  .class = PCI_CLASS_BRIDGE_OTHER << 8, .class_mask = 0xffff00 },
-	{ 0, }
+	{ }
 };
 MODULE_DEVICE_TABLE(pci, phantom_pci_tbl);
 
diff --git a/drivers/misc/pvpanic/pvpanic-pci.c b/drivers/misc/pvpanic/pvpanic-pci.c
index b21598a18f6d..572c6148a297 100644
--- a/drivers/misc/pvpanic/pvpanic-pci.c
+++ b/drivers/misc/pvpanic/pvpanic-pci.c
@@ -35,8 +35,8 @@ static int pvpanic_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
 }
 
 static const struct pci_device_id pvpanic_pci_id_tbl[]  = {
-	{ PCI_DEVICE(PCI_VENDOR_ID_REDHAT, PCI_DEVICE_ID_REDHAT_PVPANIC)},
-	{}
+	{ PCI_DEVICE(PCI_VENDOR_ID_REDHAT, PCI_DEVICE_ID_REDHAT_PVPANIC) },
+	{ }
 };
 MODULE_DEVICE_TABLE(pci, pvpanic_pci_id_tbl);
 
diff --git a/drivers/misc/rp1/rp1_pci.c b/drivers/misc/rp1/rp1_pci.c
index 81685e3f3296..f5cdf05ae4ec 100644
--- a/drivers/misc/rp1/rp1_pci.c
+++ b/drivers/misc/rp1/rp1_pci.c
@@ -288,7 +288,7 @@ static void rp1_remove(struct pci_dev *pdev)
 }
 
 static const struct pci_device_id dev_id_table[] = {
-	{ PCI_DEVICE(PCI_VENDOR_ID_RPI, PCI_DEVICE_ID_RPI_RP1_C0), },
+	{ PCI_DEVICE(PCI_VENDOR_ID_RPI, PCI_DEVICE_ID_RPI_RP1_C0) },
 	{ }
 };
 MODULE_DEVICE_TABLE(pci, dev_id_table);
diff --git a/drivers/misc/vmw_vmci/vmci_guest.c b/drivers/misc/vmw_vmci/vmci_guest.c
index 476af89e751b..83355c0ec1d2 100644
--- a/drivers/misc/vmw_vmci/vmci_guest.c
+++ b/drivers/misc/vmw_vmci/vmci_guest.c
@@ -960,8 +960,8 @@ static void vmci_guest_remove_device(struct pci_dev *pdev)
 }
 
 static const struct pci_device_id vmci_ids[] = {
-	{ PCI_DEVICE(PCI_VENDOR_ID_VMWARE, PCI_DEVICE_ID_VMWARE_VMCI), },
-	{ 0 },
+	{ PCI_DEVICE(PCI_VENDOR_ID_VMWARE, PCI_DEVICE_ID_VMWARE_VMCI) },
+	{ }
 };
 MODULE_DEVICE_TABLE(pci, vmci_ids);
 
-- 
2.55.0.11.g153666a7d9bb


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

* Re: [PATCH v2 06/12] misc: Use named initializers for arrays of spi_device_data
  2026-07-17 14:50 ` [PATCH v2 06/12] misc: Use named initializers for arrays of spi_device_data Uwe Kleine-König (The Capable Hub)
@ 2026-07-17 15:21   ` Uwe Kleine-König (The Capable Hub)
  0 siblings, 0 replies; 14+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-07-17 15:21 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1318 bytes --]

Hello,

On Fri, Jul 17, 2026 at 04:50:52PM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> While being less compact, using named initializers allows to more easily
> see which members of the structs are assigned which value without having
> to lookup the declaration of the struct. And it's also more robust
> against changes to the struct definition.
> 
> The mentioned robustness is relevant for a planned change to struct
> spi_device_id that replaces .driver_data by an anonymous union.
> 
> While touching all these arrays, unify usage of whitespace.
> 
> This patch doesn't modify the compiled arrays, only their representation
> in source form benefits.
> 
> Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>

I fatfingered From: and S-o-b:, this should be 

	From: "Uwe Kleine-König (The Capable Hub)" <u.kleine-koenig@baylibre.com>
and

	Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>

respectively.

🤦, I even anticipated that error, but used `git grep @kernel.org
*.patch` instead of plain `grep ...` and as the patches are not under
version control, git showed no matches and I wrongly thought to have
gotten this right.

If this version of the series is to be applied, I appreciate an
according fixup.

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2026-07-17 15:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-17 14:50 [PATCH v2 00/12] misc: Improvements around *_device_id defintions Uwe Kleine-König (The Capable Hub)
2026-07-17 14:50 ` [PATCH v2 01/12] misc: Drop unused assignment of spi_device_id driver data Uwe Kleine-König (The Capable Hub)
2026-07-17 14:50 ` [PATCH v2 02/12] misc/pvpanic: Drop unused assignment of acpi_device_id " Uwe Kleine-König (The Capable Hub)
2026-07-17 14:50 ` [PATCH v2 03/12] misc: genwqe: Drop unused assignment of pci_device_id " Uwe Kleine-König (The Capable Hub)
2026-07-17 14:50 ` [PATCH v2 04/12] misc: eeprom: Use named initializers for arrays of i2c_device_data Uwe Kleine-König (The Capable Hub)
2026-07-17 14:50 ` [PATCH v2 05/12] misc: " Uwe Kleine-König (The Capable Hub)
2026-07-17 14:50 ` [PATCH v2 06/12] misc: Use named initializers for arrays of spi_device_data Uwe Kleine-König (The Capable Hub)
2026-07-17 15:21   ` Uwe Kleine-König (The Capable Hub)
2026-07-17 14:50 ` [PATCH v2 07/12] misc: mei: Use named initializers for acpi_device_id array Uwe Kleine-König (The Capable Hub)
2026-07-17 14:50 ` [PATCH v2 08/12] misc: mei: Use named initializer for platform_device_id array Uwe Kleine-König (The Capable Hub)
2026-07-17 14:50 ` [PATCH v2 09/12] misc: ibmvmc: Use named initializers for vio_device_id array Uwe Kleine-König (The Capable Hub)
2026-07-17 14:50 ` [PATCH v2 10/12] misc: eeprom: idt_89hpesx: Unify style of of_device_id array Uwe Kleine-König (The Capable Hub)
2026-07-17 14:50 ` [PATCH v2 11/12] misc: Unify style of of_device_id arrays Uwe Kleine-König (The Capable Hub)
2026-07-17 14:50 ` [PATCH v2 12/12] misc: Unify code style for various *_device_id arrays Uwe Kleine-König (The Capable Hub)

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