mtd: dataflash: remove duplicate SPI ID table
PATCH 1/1 mtd: dataflash: remove duplicate SPI ID table
From: Arnd Bergmann <[email protected]>
Building with -Werror=override-init revealds that two patches added the same device ID table to this driver:
drivers/mtd/devices/mtd_dataflash.c:946:27: error: initialized field overwritten [-Werror=override-init]
946 | .id_table = dataflash_spi_ids,
| ^~~~~~~~~~~~~~~~~
drivers/mtd/devices/mtd_dataflash.c:946:27: note: (near initialization for 'dataflash_driver.id_table')
Remove one of the copies.
--- drivers/mtd/devices/mtd_dataflash.c | 9 --------- 1 file changed, 9 deletions(-)
drivers/mtd/devices/mtd_dataflash.c +0 -9
@@ -96,13 +96,6 @@ struct dataflash {struct mtd_info mtd; }; -static const struct spi_device_id dataflash_dev_ids[] = { - {"at45" }, - {"dataflash" }, - { }, -}; -MODULE_DEVICE_TABLE (spi, dataflash_dev_ids); -#ifdef CONFIG_OF static const struct of_device_id dataflash_dt_ids[] = { { .compatible = "atmel,at45", },
@@ -939,8 +932,6 @@ static struct spi_driver dataflash_driver = { .name = "mtd_dataflash", .of_match_table = of_match_ptr(dataflash_dt_ids), }, - .id_table = dataflash_dev_ids, - .probe = dataflash_probe, .remove = dataflash_remove, .id_table = dataflash_spi_ids,
Signature · 1 line
2.35.1
Quoted 3 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Building with -Werror=override-init revealds that two patches added
s/revealds/reveals/
Quoted 4 lines
the same device ID table to this driver:
drivers/mtd/devices/mtd_dataflash.c:946:27: error: initialized field overwritten [-Werror=override-init]
946 | .id_table =dataflash_spi_ids,
Quoted 8 lines
| ^~~~~~~~~~~~~~~~~
drivers/mtd/devices/mtd_dataflash.c:946:27: note: (near initialization for 'dataflash_driver.id_table')Remove one of the copies.
Fixes 27a030e87292 ("mtd: dataflash: Add device-tree SPI IDs")Fixes ac4f83482afb ("mtd: dataflash: Add SPI ID table")Signed-off-by Arnd Bergmann <[email protected]>
I seem to recall this was addressed already before. I found
https://lore.kernel.org/r/[email protected]
but it seems Colin (added to Cc:) never followed up on the build problems reported by the build bots.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ |
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 8 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Building with -Werror=override-init revealds that two patches added the same device ID table to this driver:
drivers/mtd/devices/mtd_dataflash.c:946:27: error: initialized field overwritten [-Werror=override-init]
946 | .id_table =dataflash_spi_ids,| ^~~~~~~~~~~~~~~~~
Quoted 8 lines
drivers/mtd/devices/mtd_dataflash.c:946:27: note: (near initialization for 'dataflash_driver.id_table')Remove one of the copies.
Fixes 27a030e87292 ("mtd: dataflash: Add device-tree SPI IDs")Fixes ac4f83482afb ("mtd: dataflash: Add SPI ID table")Signed-off-by Arnd Bergmann <[email protected]>Acked-by Uwe Kleine-König <[email protected]>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel