This series is converting lists that contain the *_device_id structs,
to make use of named initializers (which they do not use currently).
This work is part of the on going effort in the kernel associated with
device-ids [1]
The plan is to convert *_device_id::driver_data to have an anonymous
union, like it is currently introduced for PCI and I2C device ID tables
and already converted in ieee1394 and zorro tables. The goal is to
increase type-safety (most of the existing casts are gone),
to improve readability and to make use intent a bit more clear:
```
union {
kernel_ulong_t driver_data;
const void *driver_data_ptr;
}
```
But for that to work all lists containing the structs need to use named
initializers first to avoid triggering -Wmissing-braces for that field.
This effort is split per every subsystem into:
- pre-clean-ups that convert the lists to use named initializers
(which is this series)
- actual implementations that make some of the modules use the new
driver_data_ptr member (which is not needed in the mtd subsystem)
That way the task can be fragmented into manageable and independent chunks
of work and makes this effort easier to review.
Patches 1-3 implement the named initializer change
Patches 4-10 are just churn to unify the list termination and can be
dropped.
[1]
https://lore.kernel.org/all/[email protected]
Signed-off-by: Pawel Zalewski <[email protected]>
---
Changes in v2:
- Added tags from v1.
- Changed wording of the cover letter.
- Aligned list items in the spi-nor patch 4.
- Link to v1:
https://patch.msgid.link/[email protected]
To: Miquel Raynal <[email protected]>
To: Richard Weinberger <[email protected]>
To: Vignesh Raghavendra <[email protected]>
To: Pratyush Yadav <[email protected]>
To: Michael Walle <[email protected]>
To: Takahiro Kuwano <[email protected]>
To: Vladimir Zapolskiy <[email protected]>
To: Robert Jarzmik <[email protected]>
To: Alexander Usyskin <[email protected]>
To: Joern Engel <[email protected]>
To: Madhavan Srinivasan <[email protected]>
To: Michael Ellerman <[email protected]>
To: Nicholas Piggin <[email protected]>
To: "Christophe Leroy (CS GROUP)" <[email protected]>
To: "Ritesh Harjani (IBM)" <[email protected]>
To: Shrikanth Hegde <[email protected]>
To: Michal Simek <[email protected]>
To: Nicolas Ferre <[email protected]>
To: Alexandre Belloni <[email protected]>
To: Claudiu Beznea <[email protected]>
To: Brian Norris <[email protected]>
To: Kamal Dasu <[email protected]>
To: Broadcom internal kernel review list <[email protected]>
To: William Zhang <[email protected]>
To: Anand Gore <[email protected]>
To: Kursad Oney <[email protected]>
To: Florian Fainelli <[email protected]>
To: Rafał Miłecki <[email protected]>
To: Ray Jui <[email protected]>
To: Scott Branden <[email protected]>
To: Han Xu <[email protected]>
To: Harvey Hunt <[email protected]>
To: Paul Cercueil <[email protected]>
To: Keguang Zhang <[email protected]>
To: Piotr Wojtaszczyk <[email protected]>
To: Liang Yang <[email protected]>
To: Neil Armstrong <[email protected]>
To: Kevin Hilman <[email protected]>
To: Jerome Brunet <[email protected]>
To: Martin Blumenstingl <[email protected]>
To: Matthias Brugger <[email protected]>
To: AngeloGioacchino Del Regno <[email protected]>
To: Frank Li <[email protected]>
To: Sascha Hauer <[email protected]>
To: Pengutronix Kernel Team <[email protected]>
To: Fabio Estevam <[email protected]>
To: Manivannan Sadhasivam <[email protected]>
To: Heiko Stuebner <[email protected]>
To: Maxime Coquelin <[email protected]>
To: Alexandre Torgue <[email protected]>
To: Chen-Yu Tsai <[email protected]>
To: Jernej Skrabec <[email protected]>
To: Samuel Holland <[email protected]>
To: Stefan Agner <[email protected]>
To: Lucas Stach <[email protected]>
To: Thierry Reding <[email protected]>
To: Jonathan Hunter <[email protected]>
To: Jacky Huang <[email protected]>
To: Shan-Chun Hung <[email protected]>
To: Tudor Ambarus <[email protected]>
To: Linus Walleij <[email protected]>
To: Kyungmin Park <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
Pawel Zalewski (10):
mtd: maps: pismo: Use named initializers for i2c_device_id
mtd: spi-nor: Use named initializers for spi_device_id
mtd: maps: int0800: Use named initializers for acpi_device_id
mtd: spi-nor: Unify of_device_id list terminator and padding
mtd: devices: Unify list terminator for *_device_id lists
mtd: nand: raw: Unify list terminator for *_device_id lists
mtd: hyperbus: Unify list terminator for *_device_id lists
mtd: maps: Unify list terminator for of_device_id lists
mtd: nand: Unify list terminator for *_device_id lists
mtd: parsers: Unify list terminator for of_device_id lists
drivers/mtd/devices/docg3.c | 2 +-
drivers/mtd/devices/mchp23k256.c | 4 +-
drivers/mtd/devices/mchp48l640.c | 4 +-
drivers/mtd/devices/mtd_dataflash.c | 8 +--
drivers/mtd/devices/mtd_intel_dg.c | 4 +-
drivers/mtd/devices/phram.c | 2 +-
drivers/mtd/devices/powernv_flash.c | 2 +-
drivers/mtd/devices/spear_smi.c | 2 +-
drivers/mtd/devices/st_spi_fsm.c | 2 +-
drivers/mtd/hyperbus/hbmc-am654.c | 2 +-
drivers/mtd/hyperbus/rpc-if.c | 2 +-
drivers/mtd/maps/int0800.c | 2 +-
drivers/mtd/maps/lantiq-flash.c | 2 +-
drivers/mtd/maps/physmap-versatile.c | 4 +-
drivers/mtd/maps/pismo.c | 4 +-
drivers/mtd/maps/sun_uflash.c | 2 +-
drivers/mtd/nand/ecc-mtk.c | 2 +-
drivers/mtd/nand/ecc-mxic.c | 2 +-
drivers/mtd/nand/ecc-realtek.c | 2 +-
drivers/mtd/nand/onenand/onenand_omap2.c | 2 +-
drivers/mtd/nand/onenand/onenand_samsung.c | 3 +-
drivers/mtd/nand/raw/ams-delta.c | 7 +-
drivers/mtd/nand/raw/arasan-nand-controller.c | 2 +-
drivers/mtd/nand/raw/atmel/nand-controller.c | 4 +-
drivers/mtd/nand/raw/atmel/pmecc.c | 4 +-
drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c | 2 +-
drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c | 2 +-
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 2 +-
drivers/mtd/nand/raw/brcmnand/brcmstb_nand.c | 2 +-
drivers/mtd/nand/raw/brcmnand/iproc_nand.c | 2 +-
drivers/mtd/nand/raw/cadence-nand-controller.c | 3 +-
drivers/mtd/nand/raw/davinci_nand.c | 2 +-
drivers/mtd/nand/raw/denali_dt.c | 2 +-
drivers/mtd/nand/raw/fsl_elbc_nand.c | 2 +-
drivers/mtd/nand/raw/fsl_ifc_nand.c | 2 +-
drivers/mtd/nand/raw/fsl_upm.c | 2 +-
drivers/mtd/nand/raw/fsmc_nand.c | 2 +-
drivers/mtd/nand/raw/gpio.c | 2 +-
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 2 +-
drivers/mtd/nand/raw/hisi504_nand.c | 2 +-
drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c | 2 +-
drivers/mtd/nand/raw/ingenic/jz4725b_bch.c | 2 +-
drivers/mtd/nand/raw/ingenic/jz4740_ecc.c | 2 +-
drivers/mtd/nand/raw/ingenic/jz4780_bch.c | 2 +-
drivers/mtd/nand/raw/intel-nand-controller.c | 2 +-
drivers/mtd/nand/raw/loongson-nand-controller.c | 2 +-
drivers/mtd/nand/raw/lpc32xx_mlc.c | 2 +-
drivers/mtd/nand/raw/lpc32xx_slc.c | 2 +-
drivers/mtd/nand/raw/marvell_nand.c | 4 +-
drivers/mtd/nand/raw/meson_nand.c | 2 +-
drivers/mtd/nand/raw/mpc5121_nfc.c | 2 +-
drivers/mtd/nand/raw/mtk_nand.c | 2 +-
drivers/mtd/nand/raw/mxc_nand.c | 2 +-
drivers/mtd/nand/raw/mxic_nand.c | 2 +-
drivers/mtd/nand/raw/ndfc.c | 2 +-
.../mtd/nand/raw/nuvoton-ma35d1-nand-controller.c | 2 +-
drivers/mtd/nand/raw/omap_elm.c | 2 +-
drivers/mtd/nand/raw/orion_nand.c | 2 +-
drivers/mtd/nand/raw/pasemi_nand.c | 2 +-
drivers/mtd/nand/raw/pl35x-nand-controller.c | 2 +-
drivers/mtd/nand/raw/plat_nand.c | 2 +-
drivers/mtd/nand/raw/qcom_nandc.c | 2 +-
drivers/mtd/nand/raw/rockchip-nand-controller.c | 2 +-
drivers/mtd/nand/raw/sh_flctl.c | 2 +-
drivers/mtd/nand/raw/socrates_nand.c | 2 +-
drivers/mtd/nand/raw/stm32_fmc2_nand.c | 2 +-
drivers/mtd/nand/raw/sunxi_nand.c | 2 +-
drivers/mtd/nand/raw/technologic-nand-controller.c | 2 +-
drivers/mtd/nand/raw/tegra_nand.c | 2 +-
drivers/mtd/nand/raw/vf610_nfc.c | 2 +-
drivers/mtd/nand/raw/xway_nand.c | 2 +-
drivers/mtd/nand/spi/core.c | 4 +-
drivers/mtd/parsers/afs.c | 2 +-
drivers/mtd/parsers/bcm47xxpart.c | 2 +-
drivers/mtd/parsers/bcm63xxpart.c | 2 +-
drivers/mtd/parsers/brcm_u-boot.c | 2 +-
drivers/mtd/parsers/parser_imagetag.c | 2 +-
drivers/mtd/parsers/parser_trx.c | 2 +-
drivers/mtd/parsers/qcomsmempart.c | 2 +-
drivers/mtd/parsers/redboot.c | 2 +-
drivers/mtd/parsers/scpart.c | 2 +-
drivers/mtd/parsers/tplink_safeloader.c | 2 +-
drivers/mtd/spi-nor/controllers/hisi-sfc.c | 4 +-
drivers/mtd/spi-nor/controllers/nxp-spifi.c | 4 +-
drivers/mtd/spi-nor/core.c | 77 +++++++++++++++-------
85 files changed, 155 insertions(+), 125 deletions(-)
---
base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
change-id: 20261123-acpi-mtd-0ef6a50d049d
Best regards,
--
Pawel Zalewski <[email protected]>