checkpatch: add judgment condition for Kconfig help test
Subsystems (2)
PATCH 1/1 checkpatch: add judgment condition for Kconfig help test
From: Cixi Geng <[email protected]>
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
--- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/checkpatch.pl +1 -1
@@ -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; }
Signature · 1 line
2.34.1
Quoted 36 lines · Cixi Geng
From: Cixi Geng <[email protected]>
The
has_helponly counted the situation which the patch file add a help line, when the config was renamed and modify description, thehas_helpis zero for the "help" line not added.here is one case:
the modify file:drivers/iio/adc/Kconfigline(1047)-config
SC27XX_ADC
+configSPRD_ADC
tristate "Spreadtrum SC27xx series PMICs ADC" depends onMFD_SC27XX_PMIC||COMPILE_TEST
+ depends onARCH_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:
+configSPRD_ADC
+ tristate "Spreadtrum's ADC PMICs driver"
depends onMFD_SC27XX_PMIC||COMPILE_TEST
+ depends onARCH_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.
Quoted 4 lines
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...
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Quoted 1 line · Bagas Sanjaya
On Thu, Nov 16, 2023 at 11:39:04PM +0800, Cixi Geng wrote:
...
Quoted 10 lines
Quoted 10 lines
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.
Quoted 6 lines
Quoted 4 lines
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?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 15 lines · Andy Shevchenko
Quoted 1 line · Bagas Sanjaya
On Thu, Nov 16, 2023 at 11:39:04PM +0800, Cixi Geng wrote:
...
Quoted 10 lines
Quoted 10 lines
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.
Quoted 9 lines
Quoted 6 lines
Quoted 4 lines
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...
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Hi--
Quoted 20 lines · Cixi Geng
From: Cixi Geng <[email protected]>
The
has_helponly counted the situation which the patch file add a help line, when the config was renamed and modify description, thehas_helpis zero for the "help" line not added.here is one case:
the modify file:drivers/iio/adc/Kconfigline(1047)-config
SC27XX_ADC
+configSPRD_ADC
tristate "Spreadtrum SC27xx series PMICs ADC" depends onMFD_SC27XX_PMIC||COMPILE_TEST
+ depends onARCH_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.
Quoted 2 lines
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?
Quoted 37 lines
the checkpatch result:
WARNING: please write a help paragraph that fully describes the config symbol #23: FILE:drivers/iio/adc/Kconfig:1050:
+configSPRD_ADC
+ tristate "Spreadtrum's ADC PMICs driver"
depends onMFD_SC27XX_PMIC||COMPILE_TEST
+ depends onARCH_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 <[email protected]>--- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/checkpatch.pl +1
-1@@ -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; }
Signature · 1 line
~Randy
Quoted 25 lines · Randy Dunlap
Hi--
Quoted 22 lines · Cixi Geng
From: Cixi Geng <[email protected]>
The
has_helponly counted the situation which the patch file add a help line, when the config was renamed and modify description, thehas_helpis zero for the "help" line not added.here is one case:
the modify file: drivers/iio/adc/Kconfig line(1047)-config
SC27XX_ADC
+configSPRD_ADC
tristate "Spreadtrum SC27xx series PMICs ADC" depends onMFD_SC27XX_PMIC||COMPILE_TEST
+ depends onARCH_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.
Quoted 8 lines
Quoted 3 lines
This driver can also be built as a module. If so, the module
will be calledsc27xx_adc.OK, I made those changes to that
Kconfigfile 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' ofgit://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.
Quoted 45 lines
Quoted 44 lines
the checkpatch result:
WARNING: please write a help paragraph that fully describes the config symbol
#23: FILE:drivers/iio/adc/Kconfig:1050:
+configSPRD_ADC
+ tristate "Spreadtrum's ADC PMICs driver"
depends onMFD_SC27XX_PMIC||COMPILE_TEST
+ depends onARCH_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 calledsc27xx_adc.total: 0 errors, 1 warnings, 17 lines checked
Fixes b8709bce9089 ("checkpatch: improve Kconfig help test")Signed-off-by Cixi Geng <[email protected]>---
scripts/checkpatch.pl | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)scripts/checkpatch.pl +1
-1@@ -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;}