* [PATCH] mtd: dataflash: remove duplicate SPI ID table
@ 2022-12-15 16:47 ` Arnd Bergmann
0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2022-12-15 16:47 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Jon Hunter, Mark Brown
Cc: Arnd Bergmann, Claudius Heine, Uwe Kleine-König, linux-mtd,
linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
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.
Fixes: 27a030e87292 ("mtd: dataflash: Add device-tree SPI IDs")
Fixes: ac4f83482afb ("mtd: dataflash: Add SPI ID table")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/mtd/devices/mtd_dataflash.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index 25bad4318305..3bbaa590c768 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -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,
--
2.35.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH] mtd: dataflash: remove duplicate SPI ID table
@ 2022-12-15 16:47 ` Arnd Bergmann
0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2022-12-15 16:47 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Jon Hunter, Mark Brown
Cc: Arnd Bergmann, Claudius Heine, Uwe Kleine-König, linux-mtd,
linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
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.
Fixes: 27a030e87292 ("mtd: dataflash: Add device-tree SPI IDs")
Fixes: ac4f83482afb ("mtd: dataflash: Add SPI ID table")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/mtd/devices/mtd_dataflash.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index 25bad4318305..3bbaa590c768 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -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,
--
2.35.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] mtd: dataflash: remove duplicate SPI ID table
2022-12-15 16:47 ` Arnd Bergmann
@ 2022-12-15 17:10 ` Uwe Kleine-König
-1 siblings, 0 replies; 6+ messages in thread
From: Uwe Kleine-König @ 2022-12-15 17:10 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Jon Hunter, Mark Brown, Arnd Bergmann, Claudius Heine, linux-mtd,
linux-kernel, Colin Ian King
[-- Attachment #1.1: Type: text/plain, Size: 1273 bytes --]
On Thu, Dec 15, 2022 at 05:47:30PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Building with -Werror=override-init revealds that two patches added
s/revealds/reveals/
> 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.
>
> Fixes: 27a030e87292 ("mtd: dataflash: Add device-tree SPI IDs")
> Fixes: ac4f83482afb ("mtd: dataflash: Add SPI ID table")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
I seem to recall this was addressed already before. I found
https://lore.kernel.org/r/20221004211412.182940-1-colin.i.king@gmail.com
but it seems Colin (added to Cc:) never followed up on the build
problems reported by the build bots.
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 144 bytes --]
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] mtd: dataflash: remove duplicate SPI ID table
@ 2022-12-15 17:10 ` Uwe Kleine-König
0 siblings, 0 replies; 6+ messages in thread
From: Uwe Kleine-König @ 2022-12-15 17:10 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Jon Hunter, Mark Brown, Arnd Bergmann, Claudius Heine, linux-mtd,
linux-kernel, Colin Ian King
[-- Attachment #1: Type: text/plain, Size: 1273 bytes --]
On Thu, Dec 15, 2022 at 05:47:30PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Building with -Werror=override-init revealds that two patches added
s/revealds/reveals/
> 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.
>
> Fixes: 27a030e87292 ("mtd: dataflash: Add device-tree SPI IDs")
> Fixes: ac4f83482afb ("mtd: dataflash: Add SPI ID table")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
I seem to recall this was addressed already before. I found
https://lore.kernel.org/r/20221004211412.182940-1-colin.i.king@gmail.com
but it seems Colin (added to Cc:) never followed up on the build
problems reported by the build bots.
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mtd: dataflash: remove duplicate SPI ID table
2022-12-15 16:47 ` Arnd Bergmann
@ 2023-01-02 11:18 ` Miquel Raynal
-1 siblings, 0 replies; 6+ messages in thread
From: Miquel Raynal @ 2023-01-02 11:18 UTC (permalink / raw)
To: Arnd Bergmann, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra, Jon Hunter, Mark Brown
Cc: Arnd Bergmann, Claudius Heine, Uwe Kleine-König, linux-mtd,
linux-kernel
On Thu, 2022-12-15 at 16:47:30 UTC, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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.
>
> Fixes: 27a030e87292 ("mtd: dataflash: Add device-tree SPI IDs")
> Fixes: ac4f83482afb ("mtd: dataflash: Add SPI ID table")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] mtd: dataflash: remove duplicate SPI ID table
@ 2023-01-02 11:18 ` Miquel Raynal
0 siblings, 0 replies; 6+ messages in thread
From: Miquel Raynal @ 2023-01-02 11:18 UTC (permalink / raw)
To: Arnd Bergmann, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra, Jon Hunter, Mark Brown
Cc: Arnd Bergmann, Claudius Heine, Uwe Kleine-König, linux-mtd,
linux-kernel
On Thu, 2022-12-15 at 16:47:30 UTC, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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.
>
> Fixes: 27a030e87292 ("mtd: dataflash: Add device-tree SPI IDs")
> Fixes: ac4f83482afb ("mtd: dataflash: Add SPI ID table")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-01-02 11:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-15 16:47 [PATCH] mtd: dataflash: remove duplicate SPI ID table Arnd Bergmann
2022-12-15 16:47 ` Arnd Bergmann
2022-12-15 17:10 ` Uwe Kleine-König
2022-12-15 17:10 ` Uwe Kleine-König
2023-01-02 11:18 ` Miquel Raynal
2023-01-02 11:18 ` Miquel Raynal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.