All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: ralink-gdma: Move blank line to fix warning
@ 2020-04-02  8:23 John B. Wyatt IV
  2020-04-02  9:31 ` [Outreachy kernel] " Julia Lawall
  2020-04-02 17:32 ` [PATCH] staging: ralink-gdma: Move blank line to fix warning Greg Kroah-Hartman
  0 siblings, 2 replies; 7+ messages in thread
From: John B. Wyatt IV @ 2020-04-02  8:23 UTC (permalink / raw)
  To: outreachy-kernel, Greg Kroah-Hartman, Harold André,
	YueHaibing, Gustavo A. R. Silva, Nishka Dasgupta, Stephen Boyd
  Cc: John B. Wyatt IV

Move a blank line within a struct to fix/silence a style warning.

Reported by checkpatch.

Signed-off-by: John B. Wyatt IV <jbwyatt4@gmail.com>
---
Note:
ralink-gdma does not build; even with make allyesconfig.
I did not find a menu option with make menuconfig.

 drivers/staging/ralink-gdma/ralink-gdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ralink-gdma/ralink-gdma.c b/drivers/staging/ralink-gdma/ralink-gdma.c
index eabf1093328e..9c398048daac 100644
--- a/drivers/staging/ralink-gdma/ralink-gdma.c
+++ b/drivers/staging/ralink-gdma/ralink-gdma.c
@@ -122,9 +122,9 @@ struct gdma_dma_dev {
 	struct gdma_data *data;
 	void __iomem *base;
 	struct tasklet_struct task;
+
 	volatile unsigned long chan_issued;
 	atomic_t cnt;
-
 	struct gdma_dmaengine_chan chan[];
 };
 
-- 
2.25.1



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

* Re: [Outreachy kernel] [PATCH] staging: ralink-gdma: Move blank line to fix warning
  2020-04-02  8:23 [PATCH] staging: ralink-gdma: Move blank line to fix warning John B. Wyatt IV
@ 2020-04-02  9:31 ` Julia Lawall
  2020-04-03  1:21   ` John B. Wyatt IV
  2020-04-02 17:32 ` [PATCH] staging: ralink-gdma: Move blank line to fix warning Greg Kroah-Hartman
  1 sibling, 1 reply; 7+ messages in thread
From: Julia Lawall @ 2020-04-02  9:31 UTC (permalink / raw)
  To: John B. Wyatt IV
  Cc: outreachy-kernel, Greg Kroah-Hartman, Harold André,
	YueHaibing, Gustavo A. R. Silva, Nishka Dasgupta, Stephen Boyd



On Thu, 2 Apr 2020, John B. Wyatt IV wrote:

> Move a blank line within a struct to fix/silence a style warning.
>
> Reported by checkpatch.
>
> Signed-off-by: John B. Wyatt IV <jbwyatt4@gmail.com>
> ---
> Note:
> ralink-gdma does not build; even with make allyesconfig.
> I did not find a menu option with make menuconfig.
>
>  drivers/staging/ralink-gdma/ralink-gdma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/ralink-gdma/ralink-gdma.c b/drivers/staging/ralink-gdma/ralink-gdma.c
> index eabf1093328e..9c398048daac 100644
> --- a/drivers/staging/ralink-gdma/ralink-gdma.c
> +++ b/drivers/staging/ralink-gdma/ralink-gdma.c
> @@ -122,9 +122,9 @@ struct gdma_dma_dev {
>  	struct gdma_data *data;
>  	void __iomem *base;
>  	struct tasklet_struct task;
> +

Adding a blank line here is not correct. checkpatch is confused.  Perhaps
it lacks a pattern considering wolatile to indicate a type.

julia

>  	volatile unsigned long chan_issued;
>  	atomic_t cnt;
> -
>  	struct gdma_dmaengine_chan chan[];
>  };
>
> --
> 2.25.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200402082309.839063-1-jbwyatt4%40gmail.com.
>


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

* Re: [PATCH] staging: ralink-gdma: Move blank line to fix warning
  2020-04-02  8:23 [PATCH] staging: ralink-gdma: Move blank line to fix warning John B. Wyatt IV
  2020-04-02  9:31 ` [Outreachy kernel] " Julia Lawall
@ 2020-04-02 17:32 ` Greg Kroah-Hartman
  2020-04-03  5:22   ` John Wyatt
  1 sibling, 1 reply; 7+ messages in thread
From: Greg Kroah-Hartman @ 2020-04-02 17:32 UTC (permalink / raw)
  To: John B. Wyatt IV
  Cc: outreachy-kernel, Harold André,
	YueHaibing, Gustavo A. R. Silva, Nishka Dasgupta, Stephen Boyd

On Thu, Apr 02, 2020 at 01:23:09AM -0700, John B. Wyatt IV wrote:
> Move a blank line within a struct to fix/silence a style warning.
> 
> Reported by checkpatch.
> 
> Signed-off-by: John B. Wyatt IV <jbwyatt4@gmail.com>
> ---
> Note:
> ralink-gdma does not build; even with make allyesconfig.
> I did not find a menu option with make menuconfig.
> 
>  drivers/staging/ralink-gdma/ralink-gdma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/ralink-gdma/ralink-gdma.c b/drivers/staging/ralink-gdma/ralink-gdma.c
> index eabf1093328e..9c398048daac 100644
> --- a/drivers/staging/ralink-gdma/ralink-gdma.c
> +++ b/drivers/staging/ralink-gdma/ralink-gdma.c
> @@ -122,9 +122,9 @@ struct gdma_dma_dev {
>  	struct gdma_data *data;
>  	void __iomem *base;
>  	struct tasklet_struct task;
> +
>  	volatile unsigned long chan_issued;
>  	atomic_t cnt;
> -
>  	struct gdma_dmaengine_chan chan[];
>  };

That's a funny style warning, and this patch isn't correct, sorry.

Please see the archives for the many times this has come up.

Remember, checkpatch is just a guide, it's not always right, you always
have to use your brain in considering what it is telling you.

thanks,

greg k-h


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

* Re: [Outreachy kernel] [PATCH] staging: ralink-gdma: Move blank line to fix warning
  2020-04-02  9:31 ` [Outreachy kernel] " Julia Lawall
@ 2020-04-03  1:21   ` John B. Wyatt IV
  2020-04-03  2:37     ` checkpatch doesn't recognize register or volatile declarations (was Re: [Outreachy kernel] [PATCH] staging: ralink-gdma: Move blank line to fix warning) Joe Perches
  2020-04-03  3:10     ` Joe Perches
  0 siblings, 2 replies; 7+ messages in thread
From: John B. Wyatt IV @ 2020-04-03  1:21 UTC (permalink / raw)
  To: Julia Lawall
  Cc: outreachy-kernel, Greg Kroah-Hartman, Harold André,
	YueHaibing, Gustavo A. R. Silva, Nishka Dasgupta, Stephen Boyd,
	Joe Perches, Julia Lawall

On Thu, 2020-04-02 at 11:31 +0200, Julia Lawall wrote:
> 
> On Thu, 2 Apr 2020, John B. Wyatt IV wrote:
> 
> > Move a blank line within a struct to fix/silence a style warning.
> > 
> > Reported by checkpatch.
> > 
> > Signed-off-by: John B. Wyatt IV <jbwyatt4@gmail.com>
> > ---
> > Note:
> > ralink-gdma does not build; even with make allyesconfig.
> > I did not find a menu option with make menuconfig.
> > 
> >  drivers/staging/ralink-gdma/ralink-gdma.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/ralink-gdma/ralink-gdma.c
> > b/drivers/staging/ralink-gdma/ralink-gdma.c
> > index eabf1093328e..9c398048daac 100644
> > --- a/drivers/staging/ralink-gdma/ralink-gdma.c
> > +++ b/drivers/staging/ralink-gdma/ralink-gdma.c
> > @@ -122,9 +122,9 @@ struct gdma_dma_dev {
> >  	struct gdma_data *data;
> >  	void __iomem *base;
> >  	struct tasklet_struct task;
> > +
> 
> Adding a blank line here is not correct. checkpatch is confused. 

It is not, but I was unsure of how this should be addressed. Thank you
for letting me know.

The second version of the patch removes the blank line.

> Perhaps
> it lacks a pattern considering wolatile to indicate a type.

I have CC'ed Joe Perches on this.




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

* checkpatch doesn't recognize register or volatile declarations (was Re: [Outreachy kernel] [PATCH] staging: ralink-gdma: Move blank line to fix warning)
  2020-04-03  1:21   ` John B. Wyatt IV
@ 2020-04-03  2:37     ` Joe Perches
  2020-04-03  3:10     ` Joe Perches
  1 sibling, 0 replies; 7+ messages in thread
From: Joe Perches @ 2020-04-03  2:37 UTC (permalink / raw)
  To: John B. Wyatt IV, Julia Lawall, Andy Whitcroft, Dan Carpenter,
	Andrew Morton
  Cc: outreachy-kernel, Greg Kroah-Hartman, Harold André,
	YueHaibing, Gustavo A. R. Silva, Nishka Dasgupta, Stephen Boyd

On Thu, 2020-04-02 at 18:21 -0700, John B. Wyatt IV wrote:
> On Thu, 2020-04-02 at 11:31 +0200, Julia Lawall wrote:
> > On Thu, 2 Apr 2020, John B. Wyatt IV wrote:
> > 
> > > Move a blank line within a struct to fix/silence a style warning.
> > > 
> > > Reported by checkpatch.
> > > 
> > > Signed-off-by: John B. Wyatt IV <jbwyatt4@gmail.com>
> > > ---
> > > Note:
> > > ralink-gdma does not build; even with make allyesconfig.
> > > I did not find a menu option with make menuconfig.
> > > 
> > >  drivers/staging/ralink-gdma/ralink-gdma.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/staging/ralink-gdma/ralink-gdma.c
> > > b/drivers/staging/ralink-gdma/ralink-gdma.c
> > > index eabf1093328e..9c398048daac 100644
> > > --- a/drivers/staging/ralink-gdma/ralink-gdma.c
> > > +++ b/drivers/staging/ralink-gdma/ralink-gdma.c
> > > @@ -122,9 +122,9 @@ struct gdma_dma_dev {
> > >  	struct gdma_data *data;
> > >  	void __iomem *base;
> > >  	struct tasklet_struct task;
> > > +
> > 
> > Adding a blank line here is not correct. checkpatch is confused. 
> 
> It is not, but I was unsure of how this should be addressed. Thank you
> for letting me know.
> 
> The second version of the patch removes the blank line.
> 
> > Perhaps
> > it lacks a pattern considering wolatile to indicate a type.
> 
> I have CC'ed Joe Perches on this.
> 

Well, perhaps this, but it might cause other undesired change.
I haven't tested it much.

Maybe for older c, this list should even include "auto" too.

btw: the linux kernel sources do not have a single instance of
     auto as far as I can tell with a trivial search.

---
 scripts/checkpatch.pl | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d64c67..e906a8 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -372,6 +372,8 @@ our $InitAttribute = qr{$InitAttributeData|$InitAttributeConst|$InitAttributeIni
 # We need \b after 'init' otherwise 'initconst' will cause a false positive in a check
 our $Attribute	= qr{
 			const|
+			volatile|
+			register|
 			__percpu|
 			__nocast|
 			__safe|




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

* checkpatch doesn't recognize register or volatile declarations (was Re: [Outreachy kernel] [PATCH] staging: ralink-gdma: Move blank line to fix warning)
  2020-04-03  1:21   ` John B. Wyatt IV
  2020-04-03  2:37     ` checkpatch doesn't recognize register or volatile declarations (was Re: [Outreachy kernel] [PATCH] staging: ralink-gdma: Move blank line to fix warning) Joe Perches
@ 2020-04-03  3:10     ` Joe Perches
  1 sibling, 0 replies; 7+ messages in thread
From: Joe Perches @ 2020-04-03  3:10 UTC (permalink / raw)
  To: LKML

(adding lkml)

On Thu, 2020-04-02 at 18:21 -0700, John B. Wyatt IV wrote:
> On Thu, 2020-04-02 at 11:31 +0200, Julia Lawall wrote:
> > On Thu, 2 Apr 2020, John B. Wyatt IV wrote:
> > 
> > > Move a blank line within a struct to fix/silence a style warning.
> > > 
> > > Reported by checkpatch.
> > > 
> > > Signed-off-by: John B. Wyatt IV <jbwyatt4@gmail.com>
> > > ---
> > > Note:
> > > ralink-gdma does not build; even with make allyesconfig.
> > > I did not find a menu option with make menuconfig.
> > > 
> > >  drivers/staging/ralink-gdma/ralink-gdma.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/staging/ralink-gdma/ralink-gdma.c
> > > b/drivers/staging/ralink-gdma/ralink-gdma.c
> > > index eabf1093328e..9c398048daac 100644
> > > --- a/drivers/staging/ralink-gdma/ralink-gdma.c
> > > +++ b/drivers/staging/ralink-gdma/ralink-gdma.c
> > > @@ -122,9 +122,9 @@ struct gdma_dma_dev {
> > >  	struct gdma_data *data;
> > >  	void __iomem *base;
> > >  	struct tasklet_struct task;
> > > +
> > 
> > Adding a blank line here is not correct. checkpatch is confused. 
> 
> It is not, but I was unsure of how this should be addressed. Thank you
> for letting me know.
> 
> The second version of the patch removes the blank line.
> 
> > Perhaps
> > it lacks a pattern considering wolatile to indicate a type.
> 
> I have CC'ed Joe Perches on this.
> 

Well, perhaps this, but it might cause other undesired change.
I haven't tested it much.

Maybe for older c, this list should even include "auto" too.

btw: the linux kernel sources do not have a single instance of
     auto as far as I can tell with a trivial search.

---
 scripts/checkpatch.pl | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d64c67..e906a8 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -372,6 +372,8 @@ our $InitAttribute = qr{$InitAttributeData|$InitAttributeConst|$InitAttributeIni
 # We need \b after 'init' otherwise 'initconst' will cause a false positive in a check
 our $Attribute	= qr{
 			const|
+			volatile|
+			register|
 			__percpu|
 			__nocast|
 			__safe|



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

* Re: [PATCH] staging: ralink-gdma: Move blank line to fix warning
  2020-04-02 17:32 ` [PATCH] staging: ralink-gdma: Move blank line to fix warning Greg Kroah-Hartman
@ 2020-04-03  5:22   ` John Wyatt
  0 siblings, 0 replies; 7+ messages in thread
From: John Wyatt @ 2020-04-03  5:22 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: outreachy-kernel, Harold André,
	YueHaibing, Gustavo A. R. Silva, Nishka Dasgupta, Stephen Boyd

On Thu, 2020-04-02 at 19:32 +0200, Greg Kroah-Hartman wrote:
> On Thu, Apr 02, 2020 at 01:23:09AM -0700, John B. Wyatt IV wrote:
> > Move a blank line within a struct to fix/silence a style warning.
> > 
> > Reported by checkpatch.
> > 
> > Signed-off-by: John B. Wyatt IV <jbwyatt4@gmail.com>
> > ---
> > Note:
> > ralink-gdma does not build; even with make allyesconfig.
> > I did not find a menu option with make menuconfig.
> > 
> >  drivers/staging/ralink-gdma/ralink-gdma.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/ralink-gdma/ralink-gdma.c
> > b/drivers/staging/ralink-gdma/ralink-gdma.c
> > index eabf1093328e..9c398048daac 100644
> > --- a/drivers/staging/ralink-gdma/ralink-gdma.c
> > +++ b/drivers/staging/ralink-gdma/ralink-gdma.c
> > @@ -122,9 +122,9 @@ struct gdma_dma_dev {
> >  	struct gdma_data *data;
> >  	void __iomem *base;
> >  	struct tasklet_struct task;
> > +
> >  	volatile unsigned long chan_issued;
> >  	atomic_t cnt;
> > -
> >  	struct gdma_dmaengine_chan chan[];
> >  };
> 
> That's a funny style warning, and this patch isn't correct, sorry.
> 
> Please see the archives for the many times this has come up.
> 
> Remember, checkpatch is just a guide, it's not always right, you
> always
> have to use your brain in considering what it is telling you.

Understood.

I saw one of the messages in the archives, but I wasn't sure on how to
address this.

I have submitted a v2 that just removes the blank line.

> 
> thanks,
> 
> greg k-h



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

end of thread, other threads:[~2020-04-03  5:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-02  8:23 [PATCH] staging: ralink-gdma: Move blank line to fix warning John B. Wyatt IV
2020-04-02  9:31 ` [Outreachy kernel] " Julia Lawall
2020-04-03  1:21   ` John B. Wyatt IV
2020-04-03  2:37     ` checkpatch doesn't recognize register or volatile declarations (was Re: [Outreachy kernel] [PATCH] staging: ralink-gdma: Move blank line to fix warning) Joe Perches
2020-04-03  3:10     ` Joe Perches
2020-04-02 17:32 ` [PATCH] staging: ralink-gdma: Move blank line to fix warning Greg Kroah-Hartman
2020-04-03  5:22   ` John Wyatt

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.