All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cixi Geng <cixi.geng@linux.dev>
To: Randy Dunlap <rdunlap@infradead.org>,
	apw@canonical.com, joe@perches.co, dwaipayanray1@gmail.com,
	lukas.bulwahn@gmail.com, akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] checkpatch: add judgment condition for Kconfig help test
Date: Sat, 18 Nov 2023 22:37:37 +0800	[thread overview]
Message-ID: <6c4e59de57c4e38fbe36235a264973d6f8d3e881.camel@linux.dev> (raw)
In-Reply-To: <c40ddfd4-5781-4382-a3f1-c18cbfb22b34@infradead.org>

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;
> >                                 }
> 


      reply	other threads:[~2023-11-18 14:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c4e59de57c4e38fbe36235a264973d6f8d3e881.camel@linux.dev \
    --to=cixi.geng@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=dwaipayanray1@gmail.com \
    --cc=joe@perches.co \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=rdunlap@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.