linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* report: scripts: checkpatch: Spell Checker Does Not Run with '-f'
@ 2019-02-14 12:48 Federico Vaga
  2019-02-14 14:44 ` Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Federico Vaga @ 2019-02-14 12:48 UTC (permalink / raw)
  To: Andy Whitcroft, Joe Perches, linux-kernel

Hello,

Recently I have produce a couple of patches but I get different warnings if I 
run checkpatch on the file (-f) or if I run it of a patch file. In particular, 
the problem I found is with the spell checker which seems to run only when the 
option '-f' is not used. I am wandering if there are other similar cases.

I do not know Perl, so I cannot investigate more, but I have a practical 
example. I have this simple patch applied on my tree that introduces a spell 
error:


From: Federico Vaga <federico.vaga@cern.ch>
Date: Thu, 14 Feb 2019 13:29:39 +0100
Subject: [PATCH] script: checkpatch: buggy(?) output with -f option

Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
---
 drivers/i2c/busses/i2c-ocores.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
index b32d67c..f4deb90 100644
--- a/drivers/i2c/busses/i2c-ocores.c
+++ b/drivers/i2c/busses/i2c-ocores.c
@@ -301,7 +301,7 @@ static int ocores_poll_wait(struct ocores_i2c *i2c)
 		/* on going transfer */
 		mask = OCI2C_STAT_TIP;
 		/*
-		 * We wait for the data to be transferred (8bit),
+		 * We wait for the data to be transfered (8bit),
 		 * then we start polling on the ACK/NACK bit
 		 */
 		udelay((8 * 1000) / i2c->bus_clock_khz);
-- 
2.15.0


And here the outputs from checkpatch

--------- ON FILE ----------------
./script/checkpatch.pl -f drivers/i2c/busses/i2c-ocores.c

total: 0 errors, 0 warnings, 765 lines checked

drivers/i2c/busses/i2c-ocores.c has no obvious style problems and is ready for 
submission.
---------- ON PATCH ---------------
./script/checkpatch.pl 0001-script-checkpatch-buggy-output-with-f-option.patch

WARNING: Missing commit description - Add an appropriate one

WARNING: 'transfered' may be misspelled - perhaps 'transferred'?
#20: FILE: drivers/i2c/busses/i2c-ocores.c:304:
+		 * We wait for the data to be transfered (8bit),

total: 0 errors, 2 warnings, 8 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

0001-script-checkpatch-buggy-output-with-f-option.patch has style problems, 
please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

-------------------------







^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: report: scripts: checkpatch: Spell Checker Does Not Run with '-f'
  2019-02-14 12:48 report: scripts: checkpatch: Spell Checker Does Not Run with '-f' Federico Vaga
@ 2019-02-14 14:44 ` Joe Perches
  2019-02-14 15:03   ` Federico Vaga
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2019-02-14 14:44 UTC (permalink / raw)
  To: federico.vaga, Andy Whitcroft, linux-kernel

On Thu, 2019-02-14 at 13:48 +0100, Federico Vaga wrote:
> Hello,
> 
> Recently I have produce a couple of patches but I get different warnings if I 
> run checkpatch on the file (-f) or if I run it of a patch file. In particular, 
> the problem I found is with the spell checker which seems to run only when the 
> option '-f' is not used. I am wandering if there are other similar cases.
> 
> I do not know Perl, so I cannot investigate more, but I have a practical 
> example. I have this simple patch applied on my tree that introduces a spell 
> error:

If you want spelling fixes on files you have to use --strict

> 
> From: Federico Vaga <federico.vaga@cern.ch>
> Date: Thu, 14 Feb 2019 13:29:39 +0100
> Subject: [PATCH] script: checkpatch: buggy(?) output with -f option
> 
> Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
> ---
>  drivers/i2c/busses/i2c-ocores.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
> index b32d67c..f4deb90 100644
> --- a/drivers/i2c/busses/i2c-ocores.c
> +++ b/drivers/i2c/busses/i2c-ocores.c
> @@ -301,7 +301,7 @@ static int ocores_poll_wait(struct ocores_i2c *i2c)
>  		/* on going transfer */
>  		mask = OCI2C_STAT_TIP;
>  		/*
> -		 * We wait for the data to be transferred (8bit),
> +		 * We wait for the data to be transfered (8bit),
>  		 * then we start polling on the ACK/NACK bit
>  		 */
>  		udelay((8 * 1000) / i2c->bus_clock_khz);


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: report: scripts: checkpatch: Spell Checker Does Not Run with '-f'
  2019-02-14 14:44 ` Joe Perches
@ 2019-02-14 15:03   ` Federico Vaga
  2019-02-14 15:19     ` Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Federico Vaga @ 2019-02-14 15:03 UTC (permalink / raw)
  To: Joe Perches; +Cc: Andy Whitcroft, linux-kernel

On Thursday, February 14, 2019 3:44:55 PM CET Joe Perches wrote:
> On Thu, 2019-02-14 at 13:48 +0100, Federico Vaga wrote:
> > Hello,
> > 
> > Recently I have produce a couple of patches but I get different warnings
> > if I run checkpatch on the file (-f) or if I run it of a patch file. In
> > particular, the problem I found is with the spell checker which seems to
> > run only when the option '-f' is not used. I am wandering if there are
> > other similar cases.
> > 
> > I do not know Perl, so I cannot investigate more, but I have a practical
> > example. I have this simple patch applied on my tree that introduces a
> > spell
> > error:
> If you want spelling fixes on files you have to use --strict

Thanks

Is it a design choice to have different checks enabled with '-f'? 
 
> > From: Federico Vaga <federico.vaga@cern.ch>
> > Date: Thu, 14 Feb 2019 13:29:39 +0100
> > Subject: [PATCH] script: checkpatch: buggy(?) output with -f option
> > 
> > Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
> > ---
> > 
> >  drivers/i2c/busses/i2c-ocores.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/i2c/busses/i2c-ocores.c
> > b/drivers/i2c/busses/i2c-ocores.c index b32d67c..f4deb90 100644
> > --- a/drivers/i2c/busses/i2c-ocores.c
> > +++ b/drivers/i2c/busses/i2c-ocores.c
> > @@ -301,7 +301,7 @@ static int ocores_poll_wait(struct ocores_i2c *i2c)
> > 
> >  		/* on going transfer */
> >  		mask = OCI2C_STAT_TIP;
> >  		/*
> > 
> > -		 * We wait for the data to be transferred (8bit),
> > +		 * We wait for the data to be transfered (8bit),
> > 
> >  		 * then we start polling on the ACK/NACK bit
> >  		 */
> >  		
> >  		udelay((8 * 1000) / i2c->bus_clock_khz);





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: report: scripts: checkpatch: Spell Checker Does Not Run with '-f'
  2019-02-14 15:03   ` Federico Vaga
@ 2019-02-14 15:19     ` Joe Perches
  2019-02-14 15:22       ` Federico Vaga
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2019-02-14 15:19 UTC (permalink / raw)
  To: federico.vaga; +Cc: Andy Whitcroft, linux-kernel

On Thu, 2019-02-14 at 16:03 +0100, Federico Vaga wrote:
> On Thursday, February 14, 2019 3:44:55 PM CET Joe Perches wrote:
> > On Thu, 2019-02-14 at 13:48 +0100, Federico Vaga wrote:
> > > Hello,
> > > 
> > > Recently I have produce a couple of patches but I get different warnings
> > > if I run checkpatch on the file (-f) or if I run it of a patch file. In
> > > particular, the problem I found is with the spell checker which seems to
> > > run only when the option '-f' is not used. I am wandering if there are
> > > other similar cases.
> > > 
> > > I do not know Perl, so I cannot investigate more, but I have a practical
> > > example. I have this simple patch applied on my tree that introduces a
> > > spell
> > > error:
> > If you want spelling fixes on files you have to use --strict
> 
> Thanks
> 
> Is it a design choice to have different checks enabled with '-f'? 

Yes.

It was for a minimization of churn.

commit 66b47b4a9dad00e45c049d79966de9a3a1f4d337
Author: Kees Cook <keescook@chromium.org>
Date:   Mon Oct 13 15:51:57 2014 -0700

    checkpatch: look for common misspellings
    
    Check for misspellings, based on Debian's lintian list.  Several false
    positives were removed, and several additional words added that were
    common in the kernel:
    
            backword backwords
            invalide valide
            recieves
            singed unsinged
    
    While going back and fixing existing spelling mistakes isn't a high
    priority, it'd be nice to try to catch them before they hit the tree.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: report: scripts: checkpatch: Spell Checker Does Not Run with '-f'
  2019-02-14 15:19     ` Joe Perches
@ 2019-02-14 15:22       ` Federico Vaga
  0 siblings, 0 replies; 5+ messages in thread
From: Federico Vaga @ 2019-02-14 15:22 UTC (permalink / raw)
  To: Joe Perches; +Cc: Andy Whitcroft, linux-kernel

On Thursday, February 14, 2019 4:19:36 PM CET Joe Perches wrote:
> On Thu, 2019-02-14 at 16:03 +0100, Federico Vaga wrote:
> > On Thursday, February 14, 2019 3:44:55 PM CET Joe Perches wrote:
> > > On Thu, 2019-02-14 at 13:48 +0100, Federico Vaga wrote:
> > > > Hello,
> > > > 
> > > > Recently I have produce a couple of patches but I get different
> > > > warnings
> > > > if I run checkpatch on the file (-f) or if I run it of a patch file.
> > > > In
> > > > particular, the problem I found is with the spell checker which seems
> > > > to
> > > > run only when the option '-f' is not used. I am wandering if there are
> > > > other similar cases.
> > > > 
> > > > I do not know Perl, so I cannot investigate more, but I have a
> > > > practical
> > > > example. I have this simple patch applied on my tree that introduces a
> > > > spell
> > > 
> > > > error:
> > > If you want spelling fixes on files you have to use --strict
> > 
> > Thanks
> > 
> > Is it a design choice to have different checks enabled with '-f'?
> 
> Yes.
> 
> It was for a minimization of churn.

Thank you for the information.

> commit 66b47b4a9dad00e45c049d79966de9a3a1f4d337
> Author: Kees Cook <keescook@chromium.org>
> Date:   Mon Oct 13 15:51:57 2014 -0700
> 
>     checkpatch: look for common misspellings
> 
>     Check for misspellings, based on Debian's lintian list.  Several false
>     positives were removed, and several additional words added that were
>     common in the kernel:
> 
>             backword backwords
>             invalide valide
>             recieves
>             singed unsinged
> 
>     While going back and fixing existing spelling mistakes isn't a high
>     priority, it'd be nice to try to catch them before they hit the tree.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-02-14 15:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-14 12:48 report: scripts: checkpatch: Spell Checker Does Not Run with '-f' Federico Vaga
2019-02-14 14:44 ` Joe Perches
2019-02-14 15:03   ` Federico Vaga
2019-02-14 15:19     ` Joe Perches
2019-02-14 15:22       ` Federico Vaga

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).