Re: CHECKPATCH: missing a warning soon after include files decl -c

2021-03-24 Thread Fabio Aiuto
On Sat, Mar 20, 2021 at 04:28:51AM -0700, Joe Perches wrote: > > Actually, these would seem to be better as one or multiple functions with > local statics or even as static inlines functions in the .h file > > $ git grep -w RTW_WPA_OUI drivers/staging/rtl8723bs/core > drivers/staging/rtl8723bs/co

Re: CHECKPATCH: missing a warning soon after include files decl -c

2021-03-21 Thread Greg KH
On Sat, Mar 20, 2021 at 03:49:12PM +0100, Fabio Aiuto wrote: > On Sat, Mar 20, 2021 at 11:59:44AM +0100, Greg KH wrote: > > On Sat, Mar 20, 2021 at 11:54:24AM +0100, Fabio Aiuto wrote: > > > Hi, > > > > > > here's an issue in checkpatch.pl > > > > > > $ perl script/checkpatch.pl -f drivers/stagin

Re: CHECKPATCH: missing a warning soon after include files decl -c

2021-03-20 Thread Fabio Aiuto
On Sat, Mar 20, 2021 at 11:59:44AM +0100, Greg KH wrote: > On Sat, Mar 20, 2021 at 11:54:24AM +0100, Fabio Aiuto wrote: > > Hi, > > > > here's an issue in checkpatch.pl > > > > $ perl script/checkpatch.pl -f drivers/staging/rtl8723bs/core/rtw_ap.c > > > > I get three warning related to an extern

Re: CHECKPATCH: missing a warning soon after include files decl -c

2021-03-20 Thread Fabio Aiuto
On Sat, Mar 20, 2021 at 04:28:51AM -0700, Joe Perches wrote: > On Sat, 2021-03-20 at 11:59 +0100, Greg KH wrote: > > On Sat, Mar 20, 2021 at 11:54:24AM +0100, Fabio Aiuto wrote: > > > Hi, > > > > > > here's an issue in checkpatch.pl > > > > > > $ perl script/checkpatch.pl -f drivers/staging/rtl87

Re: CHECKPATCH: missing a warning soon after include files decl -c

2021-03-20 Thread Joe Perches
On Sat, 2021-03-20 at 11:59 +0100, Greg KH wrote: > On Sat, Mar 20, 2021 at 11:54:24AM +0100, Fabio Aiuto wrote: > > Hi, > > > > here's an issue in checkpatch.pl > > > > $ perl script/checkpatch.pl -f drivers/staging/rtl8723bs/core/rtw_ap.c > > > > I get three warning related to an extern declar

Re: CHECKPATCH: missing a warning soon after include files decl -c

2021-03-20 Thread Greg KH
On Sat, Mar 20, 2021 at 11:54:24AM +0100, Fabio Aiuto wrote: > Hi, > > here's an issue in checkpatch.pl > > $ perl script/checkpatch.pl -f drivers/staging/rtl8723bs/core/rtw_ap.c > > I get three warning related to an extern declaration > > WARNING: externs should be avoided in .c files > #14: F

Re: Checkpatch still worries about include/asm/ ?

2021-03-18 Thread Dwaipayan Ray
On Thu, Mar 18, 2021 at 10:33 PM Lukas Bulwahn wrote: > > On Thu, Mar 18, 2021 at 5:47 PM Dwaipayan Ray wrote: > > > > Hello, > > include/asm/ got removed a long time back (probably v1.1.45). > > Checkpatch still worries about that: > > > > if ($realfile =~ m@^include/asm/@) { > > ERROR("MODIFIED

Re: Checkpatch still worries about include/asm/ ?

2021-03-18 Thread Lukas Bulwahn
On Thu, Mar 18, 2021 at 5:47 PM Dwaipayan Ray wrote: > > Hello, > include/asm/ got removed a long time back (probably v1.1.45). > Checkpatch still worries about that: > > if ($realfile =~ m@^include/asm/@) { > ERROR("MODIFIED_INCLUDE_ASM", > "do not modify files in include/asm, change architecture

Re: checkpatch warnings for references to earlier commits

2021-02-22 Thread Joe Perches
On Mon, 2021-02-22 at 13:14 -0800, Luck, Tony wrote: > Would it be possible to teach checkpatch not to warn about > canonical references to earlier commits? E.g. > > WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per > line) > #7: > commit e80634a75aba ("EDAC, skx: Ret

Re: checkpatch

2020-12-10 Thread Joe Perches
On Thu, 2020-12-10 at 09:34 +, David Laight wrote: > From: Joe Perches > > Sent: 10 December 2020 05:26 > > > > On Wed, 2020-12-09 at 19:13 +0100, Thomas Gleixner wrote: > > > Joe, > > > > Hi Thomas. > > > > > the below made it through my filters for some reason so I actually > > > looked an

RE: checkpatch

2020-12-10 Thread David Laight
From: Joe Perches > Sent: 10 December 2020 05:26 > > On Wed, 2020-12-09 at 19:13 +0100, Thomas Gleixner wrote: > > Joe, > > Hi Thomas. > > > the below made it through my filters for some reason so I actually > > looked and immediately wondered why checkpatch.pl did not identify this > > as pure

Re: checkpatch

2020-12-09 Thread Joe Perches
On Wed, 2020-12-09 at 19:13 +0100, Thomas Gleixner wrote: > Joe, Hi Thomas. > the below made it through my filters for some reason so I actually > looked and immediately wondered why checkpatch.pl did not identify this > as pure garbage. > >  Original mail is here: > lore.kernel.org/r/69cb540a-

Re: checkpatch? (was: Re: [PATCH v3] coccinelle: misc: add uninitialized_var.cocci script)

2020-09-01 Thread Denis Efremov
On 9/1/20 5:37 PM, Joe Perches wrote: > On Tue, 2020-09-01 at 12:48 +0300, Denis Efremov wrote: >> uninitialized_var() macro was removed from the sources [1] and >> other warning-silencing tricks were deprecated [2]. The purpose of this >> cocci script is to prevent new occurrences of uninitiali

Re: checkpatch: support deprecated terms checking

2020-07-27 Thread SeongJae Park
On Mon, 27 Jul 2020 13:49:00 -0700 Joe Perches wrote: > On Mon, 2020-07-27 at 13:44 -0700, Andrew Morton wrote: > > On Mon, 27 Jul 2020 08:54:41 +0200 SeongJae Park wrote: > > > > > > > > Unfortunately, the inexperienced _do_ in fact run > > > > > > checkpatch on files and submit inappropriate

Re: checkpatch: support deprecated terms checking

2020-07-27 Thread Joe Perches
On Mon, 2020-07-27 at 13:44 -0700, Andrew Morton wrote: > On Mon, 27 Jul 2020 08:54:41 +0200 SeongJae Park wrote: > > > > > > Unfortunately, the inexperienced _do_ in fact run > > > > > checkpatch on files and submit inappropriate patches. > > I don't think I really agree with the "new code only

Re: checkpatch: support deprecated terms checking

2020-07-27 Thread Andrew Morton
On Mon, 27 Jul 2020 08:54:41 +0200 SeongJae Park wrote: > > > > Unfortunately, the inexperienced _do_ in fact run > > > > checkpatch on files and submit inappropriate patches. I don't think I really agree with the "new code only" guideline (where did this come from, anyway?). 10 years from now

Re: checkpatch: support deprecated terms checking

2020-07-26 Thread SeongJae Park
On Sun, 26 Jul 2020 22:33:28 +0200 "Michał Mirosław" wrote: > On Sun, Jul 26, 2020 at 08:07:48PM +0200, SeongJae Park wrote: > > On Sun, 26 Jul 2020 09:42:06 -0700 Joe Perches wrote: > > > > > On Sun, 2020-07-26 at 17:36 +0200, SeongJae Park wrote: > > > > On Sun, 26 Jul 2020 07:50:54 -0700 Jo

Re: checkpatch: support deprecated terms checking

2020-07-26 Thread Michał Mirosław
On Sun, Jul 26, 2020 at 08:07:48PM +0200, SeongJae Park wrote: > On Sun, 26 Jul 2020 09:42:06 -0700 Joe Perches wrote: > > > On Sun, 2020-07-26 at 17:36 +0200, SeongJae Park wrote: > > > On Sun, 26 Jul 2020 07:50:54 -0700 Joe Perches wrote: > > [] > > > > I do not want to encourage relatively in

Re: Re: Re: Re: Re: checkpatch: support deprecated terms checking

2020-07-26 Thread SeongJae Park
On Sun, 26 Jul 2020 09:42:06 -0700 Joe Perches wrote: > On Sun, 2020-07-26 at 17:36 +0200, SeongJae Park wrote: > > On Sun, 26 Jul 2020 07:50:54 -0700 Joe Perches wrote: > [] > > > I do not want to encourage relatively inexperienced people > > > to run checkpatch and submit inappropriate patches

Re: Re: Re: Re: Re: checkpatch: support deprecated terms checking

2020-07-26 Thread Joe Perches
On Sun, 2020-07-26 at 17:36 +0200, SeongJae Park wrote: > On Sun, 26 Jul 2020 07:50:54 -0700 Joe Perches wrote: [] > > I do not want to encourage relatively inexperienced people > > to run checkpatch and submit inappropriate patches. > > Me, neither. But, I think providing more warnings and refe

Re: Re: Re: Re: Re: checkpatch: support deprecated terms checking

2020-07-26 Thread SeongJae Park
On Sun, 26 Jul 2020 07:50:54 -0700 Joe Perches wrote: > On Sun, 2020-07-26 at 09:45 +0200, SeongJae Park wrote: > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > [] > > @@ -721,6 +721,7 @@ sub read_word_corrections { > > my %deprecated_terms_fix; > > read_word_corrections($deprec

Re: Re: Re: Re: checkpatch: support deprecated terms checking

2020-07-26 Thread Joe Perches
On Sun, 2020-07-26 at 09:45 +0200, SeongJae Park wrote: > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -721,6 +721,7 @@ sub read_word_corrections { > my %deprecated_terms_fix; > read_word_corrections($deprecated_terms_file, \%deprecated_terms_fix); > my $deprecated_terms =

Re: Re: Re: Re: checkpatch: support deprecated terms checking

2020-07-26 Thread SeongJae Park
On Sun, 26 Jul 2020 00:29:05 -0700 Joe Perches wrote: > On Sun, 2020-07-26 at 09:18 +0200, SeongJae Park wrote: > > On Sat, 25 Jul 2020 21:27:07 -0700 Joe Perches wrote: > > > > > On Sun, 2020-07-26 at 01:35 +0200, SeongJae Park wrote: > > > > On Sat, 25 Jul 2020 10:29:23 -0700 Joe Perches wro

Re: Re: Re: checkpatch: support deprecated terms checking

2020-07-26 Thread Joe Perches
On Sun, 2020-07-26 at 09:18 +0200, SeongJae Park wrote: > On Sat, 25 Jul 2020 21:27:07 -0700 Joe Perches wrote: > > > On Sun, 2020-07-26 at 01:35 +0200, SeongJae Park wrote: > > > On Sat, 25 Jul 2020 10:29:23 -0700 Joe Perches wrote: > > > > > > > On Sat, 2020-07-25 at 15:02 +0200, Michał Miros

Re: Re: Re: checkpatch: support deprecated terms checking

2020-07-26 Thread SeongJae Park
On Sat, 25 Jul 2020 21:27:07 -0700 Joe Perches wrote: > On Sun, 2020-07-26 at 01:35 +0200, SeongJae Park wrote: > > On Sat, 25 Jul 2020 10:29:23 -0700 Joe Perches wrote: > > > > > On Sat, 2020-07-25 at 15:02 +0200, Michał Mirosław wrote: > > > > Hello, > > > > > > > > I see that this patch wen

Re: Re: checkpatch: support deprecated terms checking

2020-07-25 Thread Joe Perches
On Sun, 2020-07-26 at 01:35 +0200, SeongJae Park wrote: > On Sat, 25 Jul 2020 10:29:23 -0700 Joe Perches wrote: > > > On Sat, 2020-07-25 at 15:02 +0200, Michał Mirosław wrote: > > > Hello, > > > > > > I see that this patch went into next and is already inciting people to > > > do wrong things [1

Re: Re: checkpatch: support deprecated terms checking

2020-07-25 Thread SeongJae Park
On Sat, 25 Jul 2020 10:29:23 -0700 Joe Perches wrote: > On Sat, 2020-07-25 at 15:02 +0200, Michał Mirosław wrote: > > Hello, > > > > I see that this patch went into next and is already inciting people to > > do wrong things [1]. Can you please fix it to require '--subjective' > > switch or other

Re: checkpatch: support deprecated terms checking

2020-07-25 Thread Joe Perches
On Sat, 2020-07-25 at 15:02 +0200, Michał Mirosław wrote: > Hello, > > I see that this patch went into next and is already inciting people to > do wrong things [1]. Can you please fix it to require '--subjective' > switch or otherwise mark it clearly as suggestion-only? > > The coding-style as in

Re: checkpatch: support deprecated terms checking

2020-07-25 Thread Joe Perches
On Sat, 2020-07-25 at 15:02 +0200, Michał Mirosław wrote: > Hello, > > I see that this patch went into next and is already inciting people to > do wrong things [1]. Can you please fix it to require '--subjective' > switch or otherwise mark it clearly as suggestion-only? > > The coding-style as in

Re: checkpatch: support deprecated terms checking

2020-07-25 Thread Michał Mirosław
Hello, I see that this patch went into next and is already inciting people to do wrong things [1]. Can you please fix it to require '--subjective' switch or otherwise mark it clearly as suggestion-only? The coding-style as in Linus' master says about *NEW* uses of the words listed (those introduc

Re: + checkpatch-use-patch-subject-when-reading-from-stdin.patch added to -mm tree

2020-05-08 Thread Joe Perches
On Tue, 2020-05-05 at 12:18 -0700, a...@linux-foundation.org wrote: > The patch titled > Subject: checkpatch: use patch subject when reading from stdin > has been added to the -mm tree. Its filename is > checkpatch-use-patch-subject-when-reading-from-stdin.patch Hey Andrew: Please appl

Re: checkpatch: Support for alternative quotation characters around commit title?

2020-04-30 Thread Markus Elfring
> No, we don't need to support other quotation character for 'Fixes:' tag > at least now. The submitting-patches.rst tells us the pretty format is: > “... > Fixes: %h (\"%s\") > ...” Can such a data structure still be correctly parsed if the commit title would contain double quotes? How do you th

Re: checkpatch: comparisons with a constant on the left

2019-10-20 Thread Sergey Senozhatsky
On (10/10/19 20:23), Joe Perches wrote: > On Fri, 2019-10-11 at 10:52 +0900, Sergey Senozhatsky wrote: > > Hi Joe, > > Hi Sergey. Hi Joe, For some reason your reply triggered gmail spam filter; took me a while to notice and "recover" it from spam folder. [..] > > Both LINUX_VERSION_CODE and KER

Re: checkpatch: comparisons with a constant on the left

2019-10-10 Thread Joe Perches
On Fri, 2019-10-11 at 10:52 +0900, Sergey Senozhatsky wrote: > Hi Joe, Hi Sergey. > I noticed that this code > > #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0) > > triggers checkpatch's warning: > > "WARNING: Comparisons should place the constant on > the right

Re: checkpatch error

2019-10-08 Thread Joe Perches
On Tue, 2019-10-08 at 12:02 +0800, Zhenzhong Duan wrote: > Hi, > > When I run checkpatch.pl with a patch doing reverting operation, it > reports a false positive error, Should I ignore the error or it's a bug? Ignore it.

Re: checkpatch: false positive "does MAINTAINERS need updating?" warning

2019-10-06 Thread Joe Perches
On Mon, 2019-10-07 at 13:44 +0900, Masahiro Yamada wrote: > Hi Joe, > > > I ran checkpatch.pl against the following: > https://lore.kernel.org/patchwork/patch/1136334/ > > > I did update MAINTAINERS, but I still get > "does MAINTAINERS need updating?" warning. > Why? Because checkpatch is not

Re: checkpatch warnings in sched.h

2019-09-30 Thread Luc Van Oostenryck
On Fri, Sep 20, 2019 at 02:34:46AM -0500, Steve French wrote: > Any hints to get rid of the noisy warnings in sched.h that make it > hard to spot real warnings: > > /include/linux/sched.h:609:43: error: bad integer constant expression > /include/linux/sched.h:609:73: error: invalid named zero-widt

Re: checkpatch warnings in sched.h

2019-09-20 Thread Dan Carpenter
On Fri, Sep 20, 2019 at 02:34:46AM -0500, Steve French wrote: > Any hints to get rid of the noisy warnings in sched.h that make it > hard to spot real warnings: > > /include/linux/sched.h:609:43: error: bad integer constant expression > /include/linux/sched.h:609:73: error: invalid named zero-widt

Re: checkpatch query regarding .c and .h files..

2019-06-02 Thread Joe Perches
On Sun, 2019-06-02 at 13:02 -0400, Valdis Klētnieks wrote: > scripts/checkpatch.pl contains this code near line 3070: > >if ($realfile =~ /\.(h|s|S)$/) { > $comment = '/*'; > } elsif ($realfile

Re: CHECKPATCH: strange warning on alignment modifier

2018-10-08 Thread Joe Perches
On Mon, 2018-10-08 at 10:56 +0300, Igor Stoppa wrote: > Hi, > > I have the following fragment of code: > > +struct my_struct { > + atomic_long_t l __aligned(sizeof(atomic_long_t)); > +} __aligned(sizeof(atomic_long_t)); > > > triggering this warning, when fed to checkpatch.pl: > > WARNIN

Re: checkpatch: SPDX integration breaks --root

2018-07-30 Thread Charlemagne Lasse
> OK. How about: > > though this might not work on a path with spaces > or some such... > > --- > scripts/checkpatch.pl | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index f25f708cd2a7..afb9fb27908c 100755 > --- a/scri

Re: checkpatch: SPDX integration breaks --root

2018-07-30 Thread Joe Perches
On Mon, 2018-07-30 at 17:52 +0200, Charlemagne Lasse wrote: > > Does this work for you: > > --- > > scripts/checkpatch.pl | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > > index f25f708cd2a7..f0e6913c5cc1 100755 > > --

Re: checkpatch: SPDX integration breaks --root

2018-07-30 Thread Charlemagne Lasse
> Does this work for you: > --- > scripts/checkpatch.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index f25f708cd2a7..f0e6913c5cc1 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -852,7 +852,7 @@

Re: checkpatch: SPDX integration breaks --root

2018-07-30 Thread Joe Perches
On Mon, 2018-07-30 at 10:53 +0200, Charlemagne Lasse wrote: > Hi, > > I am now getting python errors when using --root with checkpatch.pl > and not being inside the linux repository. > > $ ./linux-next/scripts/checkpatch.pl --root=/usr/src/linux-next > --strict -f linux-next/Makefile > FAIL: /usr

Re: checkpatch false positive (IMO): typo detected in truncated commit message

2018-06-25 Thread Joe Perches
On Mon, 2018-06-25 at 17:49 +0200, Jann Horn wrote: > On Mon, Jun 25, 2018 at 5:37 PM Joe Perches wrote: > > > > On Mon, 2018-06-25 at 17:32 +0200, Jann Horn wrote: > > > On Mon, Jun 25, 2018 at 5:23 PM Joe Perches wrote: > > > > > > > > On Mon, 2018-06-25 at 17:22 +0200, Jann Horn wrote: > > >

Re: checkpatch false positive (IMO): typo detected in truncated commit message

2018-06-25 Thread Jann Horn
On Mon, Jun 25, 2018 at 5:37 PM Joe Perches wrote: > > On Mon, 2018-06-25 at 17:32 +0200, Jann Horn wrote: > > On Mon, Jun 25, 2018 at 5:23 PM Joe Perches wrote: > > > > > > On Mon, 2018-06-25 at 17:22 +0200, Jann Horn wrote: > > > > Hello! > > > > > > > > I got the following message from checkpa

Re: checkpatch false positive (IMO): typo detected in truncated commit message

2018-06-25 Thread Joe Perches
On Mon, 2018-06-25 at 17:32 +0200, Jann Horn wrote: > On Mon, Jun 25, 2018 at 5:23 PM Joe Perches wrote: > > > > On Mon, 2018-06-25 at 17:22 +0200, Jann Horn wrote: > > > Hello! > > > > > > I got the following message from checkpatch: > > > > > > === > > > $ scripts/checkpatch.pl > > > 0001

Re: checkpatch false positive (IMO): typo detected in truncated commit message

2018-06-25 Thread Jann Horn
On Mon, Jun 25, 2018 at 5:23 PM Joe Perches wrote: > > On Mon, 2018-06-25 at 17:22 +0200, Jann Horn wrote: > > Hello! > > > > I got the following message from checkpatch: > > > > === > > $ scripts/checkpatch.pl > > 0001-netfilter-nf_log-don-t-hold-nf_log_mutex-during-user.patch > > WARNING: 'c

Re: checkpatch false positive (IMO): typo detected in truncated commit message

2018-06-25 Thread Joe Perches
On Mon, 2018-06-25 at 17:22 +0200, Jann Horn wrote: > Hello! > > I got the following message from checkpatch: > > === > $ scripts/checkpatch.pl > 0001-netfilter-nf_log-don-t-hold-nf_log_mutex-during-user.patch > WARNING: 'calle' may be misspelled - perhaps 'called'? > #15: > Fixes: 266d07cb1c

Re: checkpatch changes for 4.16

2018-01-31 Thread Tobin C. Harding
On Wed, Jan 31, 2018 at 03:56:19PM -0800, Joe Perches wrote: > On Thu, 2018-02-01 at 10:23 +1100, Tobin C. Harding wrote: > > On Wed, Jan 31, 2018 at 02:48:56PM -0800, Joe Perches wrote: > > > On Thu, 2018-02-01 at 08:46 +1100, Tobin C. Harding wrote: > > > > Hi Joe, > > > > > > > > Can I please b

Re: checkpatch changes for 4.16

2018-01-31 Thread Joe Perches
On Thu, 2018-02-01 at 10:23 +1100, Tobin C. Harding wrote: > On Wed, Jan 31, 2018 at 02:48:56PM -0800, Joe Perches wrote: > > On Thu, 2018-02-01 at 08:46 +1100, Tobin C. Harding wrote: > > > Hi Joe, > > > > > > Can I please bother you with a maintainer question. I know everyone is > > > super bus

Re: checkpatch changes for 4.16

2018-01-31 Thread Tobin C. Harding
On Wed, Jan 31, 2018 at 02:48:56PM -0800, Joe Perches wrote: > On Thu, 2018-02-01 at 08:46 +1100, Tobin C. Harding wrote: > > Hi Joe, > > > > Can I please bother you with a maintainer question. I know everyone is > > super busy right now, I'm asking for a smidgen of your time instead of > > doing

Re: checkpatch changes for 4.16

2018-01-31 Thread Joe Perches
On Thu, 2018-02-01 at 08:46 +1100, Tobin C. Harding wrote: > Hi Joe, > > Can I please bother you with a maintainer question. I know everyone is > super busy right now, I'm asking for a smidgen of your time instead of > doing it wrong and taking up some of Linus' time since it's merge window > and

Re: checkpatch: exclude drivers/staging from if with unnecessary parentheses test

2018-01-11 Thread Andrew Morton
On Thu, 11 Jan 2018 17:17:53 -0800 Joe Perches wrote: > On Thu, 2018-01-11 at 15:03 -0800, Andrew Morton wrote: > > On Thu, 11 Jan 2018 12:53:54 -0800 Joe Perches wrote: > > > > > Greg KH doesn't like this test so exclude the staging directory > > > from the implied --strict only test unless --

Re: checkpatch: exclude drivers/staging from if with unnecessary parentheses test

2018-01-11 Thread Joe Perches
On Thu, 2018-01-11 at 15:03 -0800, Andrew Morton wrote: > On Thu, 11 Jan 2018 12:53:54 -0800 Joe Perches wrote: > > > Greg KH doesn't like this test so exclude the staging directory > > from the implied --strict only test unless --strict is actually > > used on the command-line. > > > > "doesn'

Re: checkpatch: exclude drivers/staging from if with unnecessary parentheses test

2018-01-11 Thread Andrew Morton
On Thu, 11 Jan 2018 12:53:54 -0800 Joe Perches wrote: > Greg KH doesn't like this test so exclude the staging directory > from the implied --strict only test unless --strict is actually > used on the command-line. > "doesn't like" is rather vague. What is the objection, specifically? Also, an

Re: checkpatch: Add test for keywords not starting on tabstops

2018-01-05 Thread Sven Eckelmann
On Donnerstag, 21. April 2016 12:41:37 CET Joe Perches wrote: > It's somewhat common and in general a defect for c90 keywords to > not start on a tabstop. > > Add a test for this condition and warn when it occurs. This seems to create some new false positives: WARNING: Statements should star

Re: Checkpatch ignores spelling error by using -f

2017-12-06 Thread Rolf Evers-Fischer
On Wed, 6 Dec 2017, Joe Perches wrote: > On Wed, 2017-12-06 at 15:13 +0100, Rolf Evers-Fischer wrote: > > Hello, > > I've just checked the file drivers/tty/serial/8250/8250_omap.c, using > > checkpatch.pl, but I forgot the '-f' option (for file). > > > > Surprisingly the checkpatch script repo

Re: Checkpatch ignores spelling error by using -f

2017-12-06 Thread Joe Perches
On Wed, 2017-12-06 at 15:13 +0100, Rolf Evers-Fischer wrote: > Hello, > I've just checked the file drivers/tty/serial/8250/8250_omap.c, using > checkpatch.pl, but I forgot the '-f' option (for file). > > Surprisingly the checkpatch script reported a misspelling: > > "WARNING: 'additionaly' may b

Re: checkpatch potential false positive

2017-11-06 Thread Tobin C. Harding
On Mon, Nov 06, 2017 at 07:29:18AM -0800, Joe Perches wrote: > On Mon, 2017-11-06 at 08:33 +, Andy Whitcroft wrote: > > On Mon, Nov 06, 2017 at 03:19:14PM +1100, Tobin C. Harding wrote: > > > Hi, > > Hello. > > > > When parsing drivers/staging/unisys/visorbus/visorchipset.c in Greg's > > > st

Re: checkpatch potential false positive

2017-11-06 Thread Joe Perches
On Mon, 2017-11-06 at 08:33 +, Andy Whitcroft wrote: > On Mon, Nov 06, 2017 at 03:19:14PM +1100, Tobin C. Harding wrote: > > Hi, Hello. > > When parsing drivers/staging/unisys/visorbus/visorchipset.c in Greg's > > staging tree checkpatch emits > > > > -- > > visorchipset.c > > --

Re: checkpatch potential false positive

2017-11-06 Thread Andy Whitcroft
On Mon, Nov 06, 2017 at 03:19:14PM +1100, Tobin C. Harding wrote: > Hi, > > When parsing drivers/staging/unisys/visorbus/visorchipset.c in Greg's > staging tree checkpatch emits > > -- > visorchipset.c > -- > WARNING: char * array declaration might be better as static cons

Re: checkpatch: Adjust regular expressions in $logFunctions

2017-05-09 Thread Joe Perches
On Tue, 2017-05-09 at 23:01 +0200, SF Markus Elfring wrote: > > Perl is odd enough already adding more non-capture groups > > when the arguments are clearly specified is harder to read. > > How do you think about to reformat the affected alternations? > Will it become appropriate to give each elem

Re: checkpatch: Adjust regular expressions in $logFunctions

2017-05-09 Thread SF Markus Elfring
> Perl is odd enough already adding more non-capture groups > when the arguments are clearly specified is harder to read. How do you think about to reformat the affected alternations? Will it become appropriate to give each element a separate line there? Regards, Markus

Re: checkpatch: Question regarding asmlinkage and storage class

2017-03-19 Thread Joe Perches
On Sat, 2017-03-18 at 13:15 +0100, Paul Menzel wrote: > Dear checkpatch developers, > > > The coreboot project started using checkpatch.pl, and now some effort > is going into fixing issues pointed out by `checkpatch.pl`. > > The file `src/arch/x86/acpi_s3.c` in coreboot contains the code below.

Re: checkpatch suspected false positive

2017-02-21 Thread Tobin C. Harding
On Tue, Feb 21, 2017 at 03:19:22PM -0800, Joe Perches wrote: > On Wed, 2017-02-22 at 10:01 +1100, Tobin C. Harding wrote: > > Checkpatch may be giving a false positive of type CONST_STRUCT when > > parsing files in drivers/staging/comedi/drivers. > > > > $ pwd > > build/kernel/linux-trees/gregKH/s

Re: checkpatch suspected false positive

2017-02-21 Thread Joe Perches
On Wed, 2017-02-22 at 10:01 +1100, Tobin C. Harding wrote: > Checkpatch may be giving a false positive of type CONST_STRUCT when > parsing files in drivers/staging/comedi/drivers. > > $ pwd > build/kernel/linux-trees/gregKH/staging/ > > $ cd drivers/staging/comedi/drivers > > $ checkpatch --ters

Re: Checkpatch: Add another old address for the FSF

2017-01-28 Thread Joe Perches
On Sat, 2017-01-28 at 09:30 -0800, Matthew Wilcox wrote: > We still have a lot of old addresses for the FSF in the kernel. > willy@harry:~/kernel/idr$ git grep '675 Mass' |wc -l > 1502 > willy@harry:~/kernel/idr$ git grep '59 Temple' |wc -l > 2825 > willy@harry:~/kernel/idr$ git grep '51 Franklin'

Re: checkpatch: See if modified files are marked obsolete in MAINTAINERS

2016-08-23 Thread Julia Lawall
On Tue, 23 Aug 2016, SF Markus Elfring wrote: > > Use get_maintainer to check the status of individual files. > > If "obsolete", suggest leaving the files alone. > > Will another software system like the "kbuild test robot" > need any more fine-tuning for this change? It only works on files in

Re: checkpatch: See if modified files are marked obsolete in MAINTAINERS

2016-08-23 Thread SF Markus Elfring
> Use get_maintainer to check the status of individual files. > If "obsolete", suggest leaving the files alone. Will another software system like the "kbuild test robot" need any more fine-tuning for this change? Regards, Markus

Re: checkpatch: false positives for else after return

2016-07-18 Thread Joe Perches
On Mon, 2016-07-18 at 13:26 +0200, Thierry Reding wrote: > Hi, > > I've run across what I think is a false positive for checkpatch's > UNNECESSARY_ELSE check. The code that triggers it is in the > tegra_sor_probe() function in drivers/gpu/drm/tegra/sor.c. For > reference, here's the code: > >

Re: checkpatch false positon on EXPORT_SYMBOL

2016-04-12 Thread Andy Whitcroft
On Tue, Apr 12, 2016 at 10:49:17AM -0700, Joe Perches wrote: > > On Tue, 2016-04-12 at 13:59 +0100, Andy Whitcroft wrote: > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > [] > > @@ -3000,7 +3000,7 @@ sub process { > > > >   $realline_next = $line_nr_next; > >  

Re: checkpatch false positon on EXPORT_SYMBOL

2016-04-12 Thread Daniel Walker
On 04/12/2016 10:49 AM, Joe Perches wrote: On Tue, 2016-04-12 at 13:59 +0100, Andy Whitcroft wrote: diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] @@ -3000,7 +3000,7 @@ sub process { $realline_next = $line_nr_next; if (defined $rea

Re: checkpatch false positon on EXPORT_SYMBOL

2016-04-12 Thread Joe Perches
> On Tue, 2016-04-12 at 13:59 +0100, Andy Whitcroft wrote: > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -3000,7 +3000,7 @@ sub process { > >   $realline_next = $line_nr_next; >   if (defined $realline_next && >    

Re: checkpatch false positon on EXPORT_SYMBOL

2016-04-12 Thread Daniel Walker
On 04/12/2016 05:59 AM, Andy Whitcroft wrote: On Mon, Apr 11, 2016 at 03:09:42PM -0700, Joe Perches wrote: On Mon, 2016-04-11 at 14:51 -0700, Daniel Walker wrote: On 03/31/2016 12:21 PM, Joe Perches wrote: On Thu, 2016-03-31 at 08:01 -0700, Daniel Walker wrote: The below looks like normal cod

Re: checkpatch false positon on EXPORT_SYMBOL

2016-04-12 Thread Andy Whitcroft
On Mon, Apr 11, 2016 at 03:09:42PM -0700, Joe Perches wrote: > On Mon, 2016-04-11 at 14:51 -0700, Daniel Walker wrote: > > On 03/31/2016 12:21 PM, Joe Perches wrote: > > > > > > On Thu, 2016-03-31 at 08:01 -0700, Daniel Walker wrote: > > > > > > > > The below looks like normal code but the last e

Re: checkpatch false positon on EXPORT_SYMBOL

2016-04-11 Thread Joe Perches
On Mon, 2016-04-11 at 14:51 -0700, Daniel Walker wrote: > On 03/31/2016 12:21 PM, Joe Perches wrote: > > > > On Thu, 2016-03-31 at 08:01 -0700, Daniel Walker wrote: > > > > > > The below looks like normal code but the last export symbol gets the > > > warning, > > > > > > > > > WARNING:EXPORT_S

Re: checkpatch false positon on EXPORT_SYMBOL

2016-04-11 Thread Daniel Walker
On 03/31/2016 12:21 PM, Joe Perches wrote: On Thu, 2016-03-31 at 08:01 -0700, Daniel Walker wrote: The below looks like normal code but the last export symbol gets the warning, WARNING:EXPORT_SYMBOL: EXPORT_SYMBOL(foo); should immediately follw its function/variable #16: FILE: kernel/acct.c:70

Re: checkpatch false positon on EXPORT_SYMBOL

2016-03-31 Thread Joe Perches
On Thu, 2016-03-31 at 08:01 -0700, Daniel Walker wrote: > The below looks like normal code but the last export symbol gets the  > warning, > > > WARNING:EXPORT_SYMBOL: EXPORT_SYMBOL(foo); should immediately follw its  > function/variable > #16: FILE: kernel/acct.c:70: > +EXPORT_SYMBOL(test_export

Re: checkpatch falsepositives in Lustre code

2016-02-15 Thread Oleg Drokin
On Feb 15, 2016, at 10:05 PM, Joe Perches wrote: > On Mon, 2016-02-15 at 21:45 -0500, Oleg Drokin wrote: >> On Feb 15, 2016, at 9:27 PM, Joe Perches wrote: >> >>> On Mon, 2016-02-15 at 20:57 -0500, Oleg Drokin wrote: On Feb 15, 2016, at 7:56 PM, Joe Perches wrote: > [etc...] >

Re: checkpatch falsepositives in Lustre code

2016-02-15 Thread Joe Perches
On Mon, 2016-02-15 at 21:45 -0500, Oleg Drokin wrote: > On Feb 15, 2016, at 9:27 PM, Joe Perches wrote: > > > On Mon, 2016-02-15 at 20:57 -0500, Oleg Drokin wrote: > > > On Feb 15, 2016, at 7:56 PM, Joe Perches wrote: > > > > [etc...] > > > > > > > > Yeah, that's a defect of some type. > > > > >

Re: checkpatch falsepositives in Lustre code

2016-02-15 Thread Oleg Drokin
On Feb 15, 2016, at 9:27 PM, Joe Perches wrote: > On Mon, 2016-02-15 at 20:57 -0500, Oleg Drokin wrote: >> On Feb 15, 2016, at 7:56 PM, Joe Perches wrote: >>> [etc...] >>> >>> Yeah, that's a defect of some type. >> >> Also while I have your attention, here's another one: >> >> struct cfs_percp

Re: checkpatch falsepositives in Lustre code

2016-02-15 Thread Joe Perches
On Mon, 2016-02-15 at 20:57 -0500, Oleg Drokin wrote: > On Feb 15, 2016, at 7:56 PM, Joe Perches wrote: > > [etc...] > > > > Yeah, that's a defect of some type. > > Also while I have your attention, here's another one: > > struct cfs_percpt_lock * > cfs_percpt_lock_alloc(struct cfs_cpt_table *cp

Re: checkpatch falsepositives in Lustre code

2016-02-15 Thread Oleg Drokin
On Feb 15, 2016, at 7:56 PM, Joe Perches wrote: > [etc...] > > Yeah, that's a defect of some type. Also while I have your attention, here's another one: struct cfs_percpt_lock * cfs_percpt_lock_alloc(struct cfs_cpt_table *cptab) { struct cfs_percpt_lock *pcl; spinlock_t

Re: checkpatch falsepositives in Lustre code

2016-02-15 Thread Joe Perches
On Mon, 2016-02-15 at 18:49 -0500, Oleg Drokin wrote: > Hello! > > >    As I am going over Lustre to clean up the code style, I noticed this bunch > below. > >    Those all are function definitions, though I guess it might have been > foiled by >    return type on the previous line? >    Now s

Re: checkpatch: GIT_COMMIT_ID rule catches 'cherry picked from commit ' lines

2015-11-25 Thread Joe Perches
On Wed, 2015-11-25 at 18:15 -0800, Shawn N wrote: > Hello, > > The checkpatch.pl GIT_COMMIT_ID rule appears to be designed to enforce > a minimum description when citing patches: 'commit <12+ chars of sha1> > (\"\")'. One (unintended?) consequence of this rule is > that unmodified 'cherry picked f

Re: checkpatch false warning. was: [PATCH 3/5] mm, page_owner: copy page owner info during migration

2015-11-04 Thread Joe Perches
On Wed, 2015-11-04 at 16:10 +0100, Vlastimil Babka wrote: > On 11/04/2015 04:00 PM, Vlastimil Babka wrote: > > The page_owner mechanism stores gfp_flags of an allocation and stack trace > > that lead to it. During page migration, the original information is > > essentially replaced by the allocatio

Re: Checkpatch: False positive

2015-07-16 Thread Andy Whitcroft
On Thu, Jul 16, 2015 at 08:58:56AM -0700, Joe Perches wrote: > On Thu, 2015-07-16 at 16:43 +0100, Andy Whitcroft wrote: > > On Thu, Jul 16, 2015 at 08:35:58AM -0700, Joe Perches wrote: > > > > #31: > > > > arch/x86/kernel/hpet.c | 198 > > > > ++--- > >

Re: Checkpatch: False positive

2015-07-16 Thread Joe Perches
On Thu, 2015-07-16 at 16:43 +0100, Andy Whitcroft wrote: > On Thu, Jul 16, 2015 at 08:35:58AM -0700, Joe Perches wrote: > > > #31: > > > arch/x86/kernel/hpet.c | 198 > > > ++--- > > I guess those are in the limbo land between the end of message and >

Re: Checkpatch: False positive

2015-07-16 Thread Andy Whitcroft
On Thu, Jul 16, 2015 at 08:35:58AM -0700, Joe Perches wrote: > > #31: > > arch/x86/kernel/hpet.c | 198 > > ++--- I guess those are in the limbo land between the end of message and beginning of the patch itself. Perhaps the test should at least stop a

Re: Checkpatch: False positive

2015-07-16 Thread Joe Perches
On Thu, 2015-07-16 at 16:25 +0530, Viresh Kumar wrote: > Hi Andy/Joe, > > I got a warning today for my cover-letter, and it looked like a false > positive. Please have a look, based of v4.2-rc2. > --- > -cover-letter.patch > --- > WARNING: Possible unwra

Re: checkpatch spell checking (was: Re: [Intel-gfx] [PATCH] drm/i915: Reudce CHV DPLL min vco frequency to 4.8 GHz)

2015-03-05 Thread Joe Perches
On Thu, 2015-03-05 at 09:43 +0200, Jani Nikula wrote: > On Wed, 04 Mar 2015, Ville Syrjälä wrote: > > On Wed, Mar 04, 2015 at 08:11:38PM +0530, Purushothaman, Vijay A wrote: > >> Minor nitpick: typo in patch title > > > > Dang. I already fixed a typo there before sending this out, but turns > > ou

Re: checkpatch: CHECK: No space is necessary after a cast

2015-02-19 Thread Joe Perches
On Thu, 2015-02-19 at 13:35 +0800, Marek Lindner wrote: > Hi Joe, Hi Marek > we have come across a checkpatch false-positive: [] > BUILD_BUG_ON(sizeof(struct batadv_bla_claim_dst) != 6); > CHECK: No space is necessary after a cast > #440: FILE: main.c:440: > + BUILD_BUG_ON(sizeof(stru

Re: checkpatch induced patches...

2015-02-12 Thread Kalle Valo
Joe Perches writes: > On Wed, 2015-02-11 at 21:02 +0100, Richard Weinberger wrote: >> On Wed, Feb 11, 2015 at 7:36 PM, Dan Carpenter >> wrote: >> > On Wed, Feb 11, 2015 at 10:00:29AM -0800, Joe Perches wrote: >> >> I'm half tempted to submit some patch like this to >> >> make it difficult to us

Re: checkpatch induced patches...

2015-02-12 Thread Sudip Mukherjee
On Thu, Feb 12, 2015 at 01:43:00AM +0300, Dan Carpenter wrote: > On Wed, Feb 11, 2015 at 12:43:03PM -0800, Joe Perches wrote: > > Maybe some help/warning text like: > > > > --forceWithout --force, checkpatch will not scan files > > using -f or --f

Re: checkpatch induced patches...

2015-02-11 Thread Joe Perches
On Thu, 2015-02-12 at 01:43 +0300, Dan Carpenter wrote: > On Wed, Feb 11, 2015 at 12:43:03PM -0800, Joe Perches wrote: > > Maybe some help/warning text like: > > > > --forceWithout --force, checkpatch will not scan files > > using -f or --file out

Re: checkpatch induced patches...

2015-02-11 Thread Richard Weinberger
Am 11.02.2015 um 23:43 schrieb Dan Carpenter: > On Wed, Feb 11, 2015 at 12:43:03PM -0800, Joe Perches wrote: >> Maybe some help/warning text like: >> >> --forceWithout --force, checkpatch will not scan files >> using -f or --file outside of >> dri

Re: checkpatch induced patches...

2015-02-11 Thread Dan Carpenter
On Wed, Feb 11, 2015 at 12:43:03PM -0800, Joe Perches wrote: > Maybe some help/warning text like: > > --forceWithout --force, checkpatch will not scan files > using -f or --file outside of drivers/staging/... > Do not

Re: checkpatch induced patches...

2015-02-11 Thread Joe Perches
On Wed, 2015-02-11 at 21:24 +0100, Pavel Machek wrote: > On Wed 2015-02-11 12:20:25, Joe Perches wrote: > > On Wed, 2015-02-11 at 21:02 +0100, Richard Weinberger wrote: > > > On Wed, Feb 11, 2015 at 7:36 PM, Dan Carpenter > > > wrote: > > > > On Wed, Feb 11, 2015 at 10:00:29AM -0800, Joe Perches

Re: checkpatch induced patches...

2015-02-11 Thread Pavel Machek
On Wed 2015-02-11 12:20:25, Joe Perches wrote: > On Wed, 2015-02-11 at 21:02 +0100, Richard Weinberger wrote: > > On Wed, Feb 11, 2015 at 7:36 PM, Dan Carpenter > > wrote: > > > On Wed, Feb 11, 2015 at 10:00:29AM -0800, Joe Perches wrote: > > >> I'm half tempted to submit some patch like this to

  1   2   3   >