Message ID | f8ac6b32a29b9a05b58a7e58ffe8b780642abbf1.camel@perches.com (mailing list archive) |
---|---|
State | Accepted |
Commit | e14572c52546c16e159c4c1814984843a119e823 |
Headers | show |
Series | spi: Remove CONFIG_ prefix from Kconfig select | expand |
On 05/03/2020 15:15, Joe Perches wrote: > commit a2ca53b52e00 ("spi: Add HiSilicon v3xx SPI NOR flash > controller driver") likely inadvertently used a select statement > with a CONFIG_ prefix, remove the prefix. > > Signed-off-by: Joe Perches <joe@perches.com> It's a pity checkpatch can't pick this stuff up... The select is just for enabling the driver of a slave driver, so should not cause any build issues when not enabled. thanks FWIW, Acked-by: John Garry <john.garry@huawei.com> > --- > drivers/spi/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig > index 82177d..2dc7bd 100644 > --- a/drivers/spi/Kconfig > +++ b/drivers/spi/Kconfig > @@ -292,7 +292,7 @@ config SPI_HISI_SFC_V3XX > tristate "HiSilicon SPI-NOR Flash Controller for Hi16XX chipsets" > depends on (ARM64 && ACPI) || COMPILE_TEST > depends on HAS_IOMEM > - select CONFIG_MTD_SPI_NOR > + select MTD_SPI_NOR > help > This enables support for HiSilicon v3xx SPI-NOR flash controller > found in hi16xx chipsets. > > > . >
On Thu, 2020-03-05 at 15:53 +0000, John Garry wrote: > On 05/03/2020 15:15, Joe Perches wrote: > > commit a2ca53b52e00 ("spi: Add HiSilicon v3xx SPI NOR flash > > controller driver") likely inadvertently used a select statement > > with a CONFIG_ prefix, remove the prefix. > > > > Signed-off-by: Joe Perches <joe@perches.com> > > It's a pity checkpatch can't pick this stuff up... You are free to write a rule and submit a patch. The grammar is pretty hard to verify from a patch fragment though. There are 2 existing nominal false positives. $ git grep 'select\b.*\bCONFIG_' -- '*/Kconfig*' drivers/edac/Kconfig: select CONFIG_ACPI_NFIT. drivers/edac/Kconfig: select CONFIG_ACPI_NFIT.
On 05/03/2020 16:01, Joe Perches wrote: > On Thu, 2020-03-05 at 15:53 +0000, John Garry wrote: >> On 05/03/2020 15:15, Joe Perches wrote: >>> commit a2ca53b52e00 ("spi: Add HiSilicon v3xx SPI NOR flash >>> controller driver") likely inadvertently used a select statement >>> with a CONFIG_ prefix, remove the prefix. >>> >>> Signed-off-by: Joe Perches <joe@perches.com> >> >> It's a pity checkpatch can't pick this stuff up... > > You are free to write a rule and submit a patch. > I'm not opposed to the idea... > The grammar is pretty hard to verify from a patch > fragment though. > > There are 2 existing nominal false positives. > > $ git grep 'select\b.*\bCONFIG_' -- '*/Kconfig*' > drivers/edac/Kconfig: select CONFIG_ACPI_NFIT. > drivers/edac/Kconfig: select CONFIG_ACPI_NFIT. Ah, that's in the help text. I guess that those can be ignored simply based on the indentation. I also see these: drivers/i2c/busses/Kconfig: to also select CONFIG_TYPEC_FUSB302=m. drivers/platform/chrome/Kconfig: select CONFIG_MFD_CROS_EC_DEV The 2nd looks like it's incorrect. And then also: $ git grep 'depends on\b.*\bCONFIG_' -- '*/Kconfig*' samples/Kconfig: depends on CONFIG_ANDROID_BINDERFS Thanks, John
On 3/5/20 8:20 AM, John Garry wrote: > On 05/03/2020 16:01, Joe Perches wrote: >> On Thu, 2020-03-05 at 15:53 +0000, John Garry wrote: >>> On 05/03/2020 15:15, Joe Perches wrote: >>>> commit a2ca53b52e00 ("spi: Add HiSilicon v3xx SPI NOR flash >>>> controller driver") likely inadvertently used a select statement >>>> with a CONFIG_ prefix, remove the prefix. >>>> >>>> Signed-off-by: Joe Perches <joe@perches.com> >>> >>> It's a pity checkpatch can't pick this stuff up... >> >> You are free to write a rule and submit a patch. >> > > I'm not opposed to the idea... > >> The grammar is pretty hard to verify from a patch >> fragment though. >> >> There are 2 existing nominal false positives. >> >> $ git grep 'select\b.*\bCONFIG_' -- '*/Kconfig*' >> drivers/edac/Kconfig: select CONFIG_ACPI_NFIT. >> drivers/edac/Kconfig: select CONFIG_ACPI_NFIT. > > Ah, that's in the help text. I guess that those can be ignored simply based on the indentation. > > I also see these: > > drivers/i2c/busses/Kconfig: to also select CONFIG_TYPEC_FUSB302=m. > drivers/platform/chrome/Kconfig: select CONFIG_MFD_CROS_EC_DEV > > The 2nd looks like it's incorrect. Yes, we just got a patch for that one today. > > And then also: > $ git grep 'depends on\b.*\bCONFIG_' -- '*/Kconfig*' > samples/Kconfig: depends on CONFIG_ANDROID_BINDERFS > > Thanks, > John
On Thu, 2020-03-05 at 08:21 -0800, Randy Dunlap wrote: > On 3/5/20 8:20 AM, John Garry wrote: > > On 05/03/2020 16:01, Joe Perches wrote: > > > On Thu, 2020-03-05 at 15:53 +0000, John Garry wrote: > > > > On 05/03/2020 15:15, Joe Perches wrote: > > > > > commit a2ca53b52e00 ("spi: Add HiSilicon v3xx SPI NOR flash > > > > > controller driver") likely inadvertently used a select statement > > > > > with a CONFIG_ prefix, remove the prefix. > > > > > > > > > > Signed-off-by: Joe Perches <joe@perches.com> > > > > > > > > It's a pity checkpatch can't pick this stuff up... > > > > > > You are free to write a rule and submit a patch. > > > > > > > I'm not opposed to the idea... It'd be better I think to update the grammar verification in the tool that parses these files. see: scripts/kconfig/... > > > The grammar is pretty hard to verify from a patch > > > fragment though. > > > > > > There are 2 existing nominal false positives. > > > > > > $ git grep 'select\b.*\bCONFIG_' -- '*/Kconfig*' > > > drivers/edac/Kconfig: select CONFIG_ACPI_NFIT. > > > drivers/edac/Kconfig: select CONFIG_ACPI_NFIT. > > > > Ah, that's in the help text. I guess that those can be ignored simply based on the indentation. The grammar is per line whitespace independent, so not necessarily. > > drivers/platform/chrome/Kconfig: select CONFIG_MFD_CROS_EC_DEV > > > > The 2nd looks like it's incorrect. > > Yes, we just got a patch for that one today. That's the reason I submitted this one.
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 82177d..2dc7bd 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -292,7 +292,7 @@ config SPI_HISI_SFC_V3XX tristate "HiSilicon SPI-NOR Flash Controller for Hi16XX chipsets" depends on (ARM64 && ACPI) || COMPILE_TEST depends on HAS_IOMEM - select CONFIG_MTD_SPI_NOR + select MTD_SPI_NOR help This enables support for HiSilicon v3xx SPI-NOR flash controller found in hi16xx chipsets.
commit a2ca53b52e00 ("spi: Add HiSilicon v3xx SPI NOR flash controller driver") likely inadvertently used a select statement with a CONFIG_ prefix, remove the prefix. Signed-off-by: Joe Perches <joe@perches.com> --- drivers/spi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)