* [PATCH] checkpatch: add judgment condition for Kconfig help test
@ 2023-11-16 15:39 Cixi Geng
2023-11-16 23:52 ` Bagas Sanjaya
2023-11-18 2:26 ` Randy Dunlap
0 siblings, 2 replies; 6+ messages in thread
From: Cixi Geng @ 2023-11-16 15:39 UTC (permalink / raw)
To: apw, joe, dwaipayanray1, lukas.bulwahn, akpm, rdunlap; +Cc: linux-kernel
From: Cixi Geng <cixi.geng1@unisoc.com>
The has_help only counted the situation which the patch file add
a help line, when the config was renamed and modify description,
the has_help is zero for the "help" line not added.
here is one case:
the modify file: drivers/iio/adc/Kconfig line(1047)
-config SC27XX_ADC
+config SPRD_ADC
tristate "Spreadtrum SC27xx series PMICs ADC"
depends on MFD_SC27XX_PMIC || COMPILE_TEST
+ depends on ARCH_SPRD
help
- Say yes here to build support for the integrated ADC inside the
- Spreadtrum SC27xx series PMICs.
+ Say yes here to build support for the integrated ADC inside of the
+ Spreadtrum SC27xx and UMPxx series PMICs.
This driver can also be built as a module. If so, the module
will be called sc27xx_adc.
the checkpatch result:
WARNING: please write a help paragraph that fully describes the config symbol
#23: FILE: drivers/iio/adc/Kconfig:1050:
+config SPRD_ADC
+ tristate "Spreadtrum's ADC PMICs driver"
depends on MFD_SC27XX_PMIC || COMPILE_TEST
+ depends on ARCH_SPRD
help
+ Say yes here to build support for the integrated ADC inside of the
+ Say yes here to build support for the integrated ADC inside of the
+ Say yes here to build support for the integrated ADC inside of the
+ Spreadtrum SC27xx and UMPxx series PMICs.
This driver can also be built as a module. If so, the module
will be called sc27xx_adc.
total: 0 errors, 1 warnings, 17 lines checked
Fixes: b8709bce9089 ("checkpatch: improve Kconfig help test")
Signed-off-by: Cixi Geng <cixi.geng1@unisoc.com>
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 25fdb7fda112..402009d08505 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3616,7 +3616,7 @@ sub process {
$needs_help = 1;
next;
}
- if ($f =~ /^\+\s*help\s*$/) {
+ if ($f =~ /^\+\s*help\s*$/ || $f =~ /^\s*help\s*$/) {
$has_help = 1;
next;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] checkpatch: add judgment condition for Kconfig help test 2023-11-16 15:39 [PATCH] checkpatch: add judgment condition for Kconfig help test Cixi Geng @ 2023-11-16 23:52 ` Bagas Sanjaya 2023-11-17 21:14 ` Andy Shevchenko 2023-11-18 2:26 ` Randy Dunlap 1 sibling, 1 reply; 6+ messages in thread From: Bagas Sanjaya @ 2023-11-16 23:52 UTC (permalink / raw) To: Cixi Geng, apw, joe, dwaipayanray1, lukas.bulwahn, akpm, rdunlap, Jonathan Cameron, Lars-Peter Clausen, Andy Shevchenko, Cosmin Tanislav, Arnd Bergmann, Maksim Kiselev, Liam Beguin, Marcus Folkesson, Ibrahim Tilki, Marius Cristea, ChiaEn Wu, Niklas Schnelle Cc: Linux Kernel Mailing List, Linux Industrial I/O [-- Attachment #1: Type: text/plain, Size: 1882 bytes --] On Thu, Nov 16, 2023 at 11:39:04PM +0800, Cixi Geng wrote: > From: Cixi Geng <cixi.geng1@unisoc.com> > > The has_help only counted the situation which the patch file add > a help line, when the config was renamed and modify description, > the has_help is zero for the "help" line not added. > > here is one case: > the modify file: drivers/iio/adc/Kconfig line(1047) > > -config SC27XX_ADC > +config SPRD_ADC > tristate "Spreadtrum SC27xx series PMICs ADC" > depends on MFD_SC27XX_PMIC || COMPILE_TEST > + depends on ARCH_SPRD > help > - Say yes here to build support for the integrated ADC inside the > - Spreadtrum SC27xx series PMICs. > + Say yes here to build support for the integrated ADC inside of the > + Spreadtrum SC27xx and UMPxx series PMICs. > > This driver can also be built as a module. If so, the module > will be called sc27xx_adc. > > the checkpatch result: > WARNING: please write a help paragraph that fully describes the config symbol > #23: FILE: drivers/iio/adc/Kconfig:1050: > +config SPRD_ADC > + tristate "Spreadtrum's ADC PMICs driver" > depends on MFD_SC27XX_PMIC || COMPILE_TEST > + depends on ARCH_SPRD > help > + Say yes here to build support for the integrated ADC inside of the > + Say yes here to build support for the integrated ADC inside of the > + Say yes here to build support for the integrated ADC inside of the > + Spreadtrum SC27xx and UMPxx series PMICs. > > This driver can also be built as a module. If so, the module > will be called sc27xx_adc. > > total: 0 errors, 1 warnings, 17 lines checked This confuses me. What are you trying to achieve there? Confused... -- An old man doll... just what I always wanted! - Clara [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] checkpatch: add judgment condition for Kconfig help test 2023-11-16 23:52 ` Bagas Sanjaya @ 2023-11-17 21:14 ` Andy Shevchenko 2023-11-17 23:19 ` Bagas Sanjaya 0 siblings, 1 reply; 6+ messages in thread From: Andy Shevchenko @ 2023-11-17 21:14 UTC (permalink / raw) To: Bagas Sanjaya Cc: Cixi Geng, apw, joe, dwaipayanray1, lukas.bulwahn, akpm, rdunlap, Jonathan Cameron, Lars-Peter Clausen, Cosmin Tanislav, Arnd Bergmann, Maksim Kiselev, Liam Beguin, Marcus Folkesson, Ibrahim Tilki, Marius Cristea, ChiaEn Wu, Niklas Schnelle, Linux Kernel Mailing List, Linux Industrial I/O On Fri, Nov 17, 2023 at 06:52:44AM +0700, Bagas Sanjaya wrote: > On Thu, Nov 16, 2023 at 11:39:04PM +0800, Cixi Geng wrote: ... > > the checkpatch result: > > WARNING: please write a help paragraph that fully describes the config symbol > > #23: FILE: drivers/iio/adc/Kconfig:1050: > > help > > + Say yes here to build support for the integrated ADC inside of the > > + Say yes here to build support for the integrated ADC inside of the > > + Say yes here to build support for the integrated ADC inside of the > > + Spreadtrum SC27xx and UMPxx series PMICs. > > > > This driver can also be built as a module. If so, the module > > will be called sc27xx_adc. > > > > total: 0 errors, 1 warnings, 17 lines checked > > This confuses me. What are you trying to achieve there? Is the indentation correct in each line? No TABs/spaces mix? -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] checkpatch: add judgment condition for Kconfig help test 2023-11-17 21:14 ` Andy Shevchenko @ 2023-11-17 23:19 ` Bagas Sanjaya 0 siblings, 0 replies; 6+ messages in thread From: Bagas Sanjaya @ 2023-11-17 23:19 UTC (permalink / raw) To: Andy Shevchenko Cc: Cixi Geng, apw, Joe Perches, dwaipayanray1, lukas.bulwahn, akpm, rdunlap, Jonathan Cameron, Lars-Peter Clausen, Cosmin Tanislav, Arnd Bergmann, Maksim Kiselev, Liam Beguin, Marcus Folkesson, Ibrahim Tilki, Marius Cristea, ChiaEn Wu, Niklas Schnelle, Linux Kernel Mailing List, Linux Industrial I/O On 11/18/23 04:14, Andy Shevchenko wrote: > On Fri, Nov 17, 2023 at 06:52:44AM +0700, Bagas Sanjaya wrote: >> On Thu, Nov 16, 2023 at 11:39:04PM +0800, Cixi Geng wrote: > > ... > >>> the checkpatch result: >>> WARNING: please write a help paragraph that fully describes the config symbol >>> #23: FILE: drivers/iio/adc/Kconfig:1050: > >>> help >>> + Say yes here to build support for the integrated ADC inside of the >>> + Say yes here to build support for the integrated ADC inside of the >>> + Say yes here to build support for the integrated ADC inside of the >>> + Spreadtrum SC27xx and UMPxx series PMICs. >>> >>> This driver can also be built as a module. If so, the module >>> will be called sc27xx_adc. >>> >>> total: 0 errors, 1 warnings, 17 lines checked >> >> This confuses me. What are you trying to achieve there? > > Is the indentation correct in each line? No TABs/spaces mix? > IDK as I'm not the patch author... -- An old man doll... just what I always wanted! - Clara ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] checkpatch: add judgment condition for Kconfig help test 2023-11-16 15:39 [PATCH] checkpatch: add judgment condition for Kconfig help test Cixi Geng 2023-11-16 23:52 ` Bagas Sanjaya @ 2023-11-18 2:26 ` Randy Dunlap 2023-11-18 14:37 ` Cixi Geng 1 sibling, 1 reply; 6+ messages in thread From: Randy Dunlap @ 2023-11-18 2:26 UTC (permalink / raw) To: Cixi Geng, apw, joe, dwaipayanray1, lukas.bulwahn, akpm; +Cc: linux-kernel Hi-- On 11/16/23 07:39, Cixi Geng wrote: > From: Cixi Geng <cixi.geng1@unisoc.com> > > The has_help only counted the situation which the patch file add > a help line, when the config was renamed and modify description, > the has_help is zero for the "help" line not added. > > here is one case: > the modify file: drivers/iio/adc/Kconfig line(1047) > > -config SC27XX_ADC > +config SPRD_ADC > tristate "Spreadtrum SC27xx series PMICs ADC" > depends on MFD_SC27XX_PMIC || COMPILE_TEST > + depends on ARCH_SPRD > help > - Say yes here to build support for the integrated ADC inside the > - Spreadtrum SC27xx series PMICs. > + Say yes here to build support for the integrated ADC inside of the > + Spreadtrum SC27xx and UMPxx series PMICs. > > This driver can also be built as a module. If so, the module > will be called sc27xx_adc. OK, I made those changes to that Kconfig file and ran checkpatch. I didn't get any of the following checkpatch results. Are you using a current version of checkpatch? > the checkpatch result: > WARNING: please write a help paragraph that fully describes the config symbol > #23: FILE: drivers/iio/adc/Kconfig:1050: > +config SPRD_ADC > + tristate "Spreadtrum's ADC PMICs driver" > depends on MFD_SC27XX_PMIC || COMPILE_TEST > + depends on ARCH_SPRD > help > + Say yes here to build support for the integrated ADC inside of the > + Say yes here to build support for the integrated ADC inside of the > + Say yes here to build support for the integrated ADC inside of the > + Spreadtrum SC27xx and UMPxx series PMICs. > > This driver can also be built as a module. If so, the module > will be called sc27xx_adc. > > total: 0 errors, 1 warnings, 17 lines checked > > Fixes: b8709bce9089 ("checkpatch: improve Kconfig help test") > Signed-off-by: Cixi Geng <cixi.geng1@unisoc.com> > --- > scripts/checkpatch.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 25fdb7fda112..402009d08505 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -3616,7 +3616,7 @@ sub process { > $needs_help = 1; > next; > } > - if ($f =~ /^\+\s*help\s*$/) { > + if ($f =~ /^\+\s*help\s*$/ || $f =~ /^\s*help\s*$/) { > $has_help = 1; > next; > } -- ~Randy ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] checkpatch: add judgment condition for Kconfig help test 2023-11-18 2:26 ` Randy Dunlap @ 2023-11-18 14:37 ` Cixi Geng 0 siblings, 0 replies; 6+ messages in thread From: Cixi Geng @ 2023-11-18 14:37 UTC (permalink / raw) To: Randy Dunlap, apw, joe, dwaipayanray1, lukas.bulwahn, akpm; +Cc: linux-kernel On Fri, 2023-11-17 at 18:26 -0800, Randy Dunlap wrote: > Hi-- > > On 11/16/23 07:39, Cixi Geng wrote: > > From: Cixi Geng <cixi.geng1@unisoc.com> > > > > The has_help only counted the situation which the patch file add > > a help line, when the config was renamed and modify description, > > the has_help is zero for the "help" line not added. > > > > here is one case: > > the modify file: drivers/iio/adc/Kconfig line(1047) > > > > -config SC27XX_ADC > > +config SPRD_ADC > > tristate "Spreadtrum SC27xx series PMICs ADC" > > depends on MFD_SC27XX_PMIC || COMPILE_TEST > > + depends on ARCH_SPRD > > help > > - Say yes here to build support for the integrated ADC > > inside the > > - Spreadtrum SC27xx series PMICs. > > + Say yes here to build support for the integrated ADC > > inside of the > > + Spreadtrum SC27xx and UMPxx series PMICs. > > > > This driver can also be built as a module. If so, the > > module > > will be called sc27xx_adc. > > OK, I made those changes to that Kconfig file and ran checkpatch. > I didn't get any of the following checkpatch results. > > Are you using a current version of checkpatch? yes, I'am sure there is some wrong result about the patch, My local verion is based on (7475e51b8796 (HEAD -> local, origin/master, origin/HEAD) Merge tag 'net-6.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net) my steps is modify the Kconfig, generate a test commit. and git format this commit, then run ./scripts/checkpatch.pl 0001-test.patch. > > > the checkpatch result: > > WARNING: please write a help paragraph that fully describes the > > config symbol > > #23: FILE: drivers/iio/adc/Kconfig:1050: > > +config SPRD_ADC > > + tristate "Spreadtrum's ADC PMICs driver" > > depends on MFD_SC27XX_PMIC || COMPILE_TEST > > + depends on ARCH_SPRD > > help > > + Say yes here to build support for the integrated ADC > > inside of the > > + Say yes here to build support for the integrated ADC > > inside of the > > + Say yes here to build support for the integrated ADC > > inside of the > > + Spreadtrum SC27xx and UMPxx series PMICs. > > > > This driver can also be built as a module. If so, the > > module > > will be called sc27xx_adc. > > > > total: 0 errors, 1 warnings, 17 lines checked > > > > Fixes: b8709bce9089 ("checkpatch: improve Kconfig help test") > > Signed-off-by: Cixi Geng <cixi.geng1@unisoc.com> > > --- > > scripts/checkpatch.pl | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > > index 25fdb7fda112..402009d08505 100755 > > --- a/scripts/checkpatch.pl > > +++ b/scripts/checkpatch.pl > > @@ -3616,7 +3616,7 @@ sub process { > > $needs_help = 1; > > next; > > } > > - if ($f =~ /^\+\s*help\s*$/) { > > + if ($f =~ /^\+\s*help\s*$/ || $f =~ > > /^\s*help\s*$/) { > > $has_help = 1; > > next; > > } > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-11-18 14:44 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-11-16 15:39 [PATCH] checkpatch: add judgment condition for Kconfig help test Cixi Geng 2023-11-16 23:52 ` Bagas Sanjaya 2023-11-17 21:14 ` Andy Shevchenko 2023-11-17 23:19 ` Bagas Sanjaya 2023-11-18 2:26 ` Randy Dunlap 2023-11-18 14:37 ` Cixi Geng
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox