staging: ralink-gdma: Move blank line to fix warning
Subsystems (2)
PATCH 1/1 staging: ralink-gdma: Move blank line to fix warning
Move a blank line within a struct to fix/silence a style warning.
Reported by checkpatch.
---
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(-)
drivers/staging/ralink-gdma/ralink-gdma.c +1 -1
@@ -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[]; };
Signature · 1 line
2.25.1
Quoted 18 lines · 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 <[email protected]>---
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(-)drivers/staging/ralink-gdma/ralink-gdma.c +0
-0
drivers/staging/ralink-gdma/ralink-gdma.c struct gdma_dma_dev { · line 125
Quoted 4 lines
drivers/staging/ralink-gdma/ralink-gdma.c +1
-0@@ -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
Quoted 14 lines
drivers/staging/ralink-gdma/ralink-gdma.c +0
-2volatile 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200402082309.839063-1-jbwyatt4%40gmail.com.
Quoted 16 lines · Julia Lawall
Quoted 13 lines · 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 <[email protected]>---
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(-)
Quoted 12 lines
drivers/staging/ralink-gdma/ralink-gdma.c struct gdma_dma_dev { · line 125
Quoted 10 lines
drivers/staging/ralink-gdma/ralink-gdma.c +1
-0@@ -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.
Quoted 2 lines
Perhaps
it lacks a pattern considering wolatile to indicate a type.
I have CC'ed Joe Perches on this.
Joe Perches
maintainercheckpatch doesn't recognize register or volatile declarations (was Re: [Outreachy kernel] [PATCH] staging: ralink-gdma: Move blank line to fix warning)
Quoted 32 lines · John B. Wyatt IV
Quoted 15 lines · Julia Lawall
Quoted 13 lines · 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 <[email protected]>---
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(-)Quoted 12 lines
drivers/staging/ralink-gdma/ralink-gdma.c struct gdma_dma_dev { · line 125
Quoted 10 lines
drivers/staging/ralink-gdma/ralink-gdma.c +1
-0@@ -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.
Quoted 7 lines
The second version of the patch removes the blank line.
Quoted 2 lines
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(+)
scripts/checkpatch.pl +2 -0
@@ -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|
Joe Perches
maintainercheckpatch doesn't recognize register or volatile declarations (was Re: [Outreachy kernel] [PATCH] staging: ralink-gdma: Move blank line to fix warning)
In reply to John B. Wyatt IV(adding lkml)
Quoted 32 lines · John B. Wyatt IV
Quoted 15 lines · Julia Lawall
Quoted 13 lines · 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 <[email protected]>---
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(-)Quoted 12 lines
drivers/staging/ralink-gdma/ralink-gdma.c struct gdma_dma_dev { · line 125
Quoted 10 lines
drivers/staging/ralink-gdma/ralink-gdma.c +1
-0@@ -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.
Quoted 7 lines
The second version of the patch removes the blank line.
Quoted 2 lines
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(+)
scripts/checkpatch.pl +2 -0
@@ -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|
Greg Kroah-Hartman
maintainerQuoted 18 lines · 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 <[email protected]>---
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(-)drivers/staging/ralink-gdma/ralink-gdma.c +0
-0
drivers/staging/ralink-gdma/ralink-gdma.c struct gdma_dma_dev { · line 129
Quoted 9 lines
drivers/staging/ralink-gdma/ralink-gdma.c +1
-1@@ -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
Quoted 32 lines · Greg Kroah-Hartman
Quoted 19 lines · 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 <[email protected]>---
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(-)drivers/staging/ralink-gdma/ralink-gdma.c +0
-0drivers/staging/ralink-gdma/ralink-gdma.c struct gdma_dma_dev { · line 129
Quoted 9 lines
drivers/staging/ralink-gdma/ralink-gdma.c +1
-1@@ -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.
Quoted 5 lines
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.
Quoted 4 lines
thanks,
greg k-h