[PATCH] staging: Fix spacing between function name and parentheses

Subsystems: staging subsystem, the rest

STALE4338d

15 messages, 8 authors, 2014-10-11 · open the first message on its own page

[PATCH] staging: Fix spacing between function name and parentheses

From: Nicholas Krause <hidden>
Date: 2014-10-11 01:55:48

Fixes checkpatch coding style warning about unneeded space
between function name an parentheses.

Signed-off-by: Nicholas Krause <redacted>
---
Untested
 drivers/staging/octeon-usb/octeon-hcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index 5f9db4c..bbeb0cc 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -412,7 +412,7 @@ struct octeon_hcd {
 		type c;							    \
 		while (1) {						    \
 			c.u32 = __cvmx_usb_read_csr32(usb, address);	    \
-			if (c.s.field op (value)) {			    \
+			if (c.s.field op(value)) {			    \
 				result = 0;				    \
 				break;					    \
 			} else if (cvmx_get_cycle() > done) {		    \
-- 
1.9.1

[PATCH] staging: Fix spacing between function name and parentheses

From: sudipm.mukherjee@gmail.com (Sudip Mukherjee)
Date: 2014-10-11 04:58:03

On Fri, Oct 10, 2014 at 09:55:48PM -0400, Nicholas Krause wrote:
quoted hunk
Fixes checkpatch coding style warning about unneeded space
between function name an parentheses.

Signed-off-by: Nicholas Krause <redacted>
---
Untested
 drivers/staging/octeon-usb/octeon-hcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index 5f9db4c..bbeb0cc 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -412,7 +412,7 @@ struct octeon_hcd {
 		type c;							    \
 		while (1) {						    \
 			c.u32 = __cvmx_usb_read_csr32(usb, address);	    \
-			if (c.s.field op (value)) {			    \
+			if (c.s.field op(value)) {			    \
have you read the code before modifying it?
this is not a function.
have you seen how CVMX_WAIT_FOR_FIELD32 is being called?
on every call of CVMX_WAIT_FOR_FIELD32 op is the operator "=="
so when called the macro will be c.s.field == (value).
if your patch is applied then it will become c.s.field ==(value) .. will that be correct ?

thanks
sudip	
 				result = 0;				    \
 				break;					    \
 			} else if (cvmx_get_cycle() > done) {		    \
-- 
1.9.1


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[PATCH] staging: Fix spacing between function name and parentheses

From: Dave Tian <hidden>
Date: 2014-10-11 05:23:55

It also works as value is surrounded by (), though I do not think the patch itself is right or useful.

Dave Tian
dave.jing.tian at gmail.com



On Oct 11, 2014, at 12:58 PM, Sudip Mukherjee [off-list ref] wrote:
On Fri, Oct 10, 2014 at 09:55:48PM -0400, Nicholas Krause wrote:
quoted
Fixes checkpatch coding style warning about unneeded space
between function name an parentheses.

Signed-off-by: Nicholas Krause <redacted>
---
Untested
drivers/staging/octeon-usb/octeon-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index 5f9db4c..bbeb0cc 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -412,7 +412,7 @@ struct octeon_hcd {
		type c;							    \
		while (1) {						    \
			c.u32 = __cvmx_usb_read_csr32(usb, address);	    \
-			if (c.s.field op (value)) {			    \
+			if (c.s.field op(value)) {			    \
have you read the code before modifying it?
this is not a function.
have you seen how CVMX_WAIT_FOR_FIELD32 is being called?
on every call of CVMX_WAIT_FOR_FIELD32 op is the operator "=="
so when called the macro will be c.s.field == (value).
if your patch is applied then it will become c.s.field ==(value) .. will that be correct ?

thanks
sudip	
quoted
				result = 0;				    \
				break;					    \
			} else if (cvmx_get_cycle() > done) {		    \
-- 
1.9.1


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[PATCH] staging: Fix spacing between function name and parentheses

From: sudipm.mukherjee@gmail.com (Sudip Mukherjee)
Date: 2014-10-11 06:08:24

Hi Dave,
It will work. But my point of saying that was  c.s.field ==(value) is
again not according to the style.

thanks
sudip

On Sat, Oct 11, 2014 at 10:53 AM, Dave Tian [off-list ref] wrote:
It also works as value is surrounded by (), though I do not think the patch itself is right or useful.

Dave Tian
dave.jing.tian at gmail.com



On Oct 11, 2014, at 12:58 PM, Sudip Mukherjee [off-list ref] wrote:
quoted
On Fri, Oct 10, 2014 at 09:55:48PM -0400, Nicholas Krause wrote:
quoted
Fixes checkpatch coding style warning about unneeded space
between function name an parentheses.

Signed-off-by: Nicholas Krause <redacted>
---
Untested
drivers/staging/octeon-usb/octeon-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index 5f9db4c..bbeb0cc 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -412,7 +412,7 @@ struct octeon_hcd {
             type c;                                                     \
             while (1) {                                                 \
                     c.u32 = __cvmx_usb_read_csr32(usb, address);        \
-                    if (c.s.field op (value)) {                         \
+                    if (c.s.field op(value)) {                          \
have you read the code before modifying it?
this is not a function.
have you seen how CVMX_WAIT_FOR_FIELD32 is being called?
on every call of CVMX_WAIT_FOR_FIELD32 op is the operator "=="
so when called the macro will be c.s.field == (value).
if your patch is applied then it will become c.s.field ==(value) .. will that be correct ?

thanks
sudip
quoted
                             result = 0;                                 \
                             break;                                      \
                     } else if (cvmx_get_cycle() > done) {               \
--
1.9.1


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[PATCH] staging: Fix spacing between function name and parentheses

From: Dave Tian <hidden>
Date: 2014-10-11 06:11:12

Agreed - that is why I mentioned the patch is neither right nor useful:)

-daveti


On Oct 11, 2014, at 2:08 PM, Sudip Mukherjee [off-list ref] wrote:
Hi Dave,
It will work. But my point of saying that was  c.s.field ==(value) is
again not according to the style.

thanks
sudip

On Sat, Oct 11, 2014 at 10:53 AM, Dave Tian [off-list ref] wrote:
quoted
It also works as value is surrounded by (), though I do not think the patch itself is right or useful.

Dave Tian
dave.jing.tian at gmail.com



On Oct 11, 2014, at 12:58 PM, Sudip Mukherjee [off-list ref] wrote:
quoted
On Fri, Oct 10, 2014 at 09:55:48PM -0400, Nicholas Krause wrote:
quoted
Fixes checkpatch coding style warning about unneeded space
between function name an parentheses.

Signed-off-by: Nicholas Krause <redacted>
---
Untested
drivers/staging/octeon-usb/octeon-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index 5f9db4c..bbeb0cc 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -412,7 +412,7 @@ struct octeon_hcd {
            type c;                                                     \
            while (1) {                                                 \
                    c.u32 = __cvmx_usb_read_csr32(usb, address);        \
-                    if (c.s.field op (value)) {                         \
+                    if (c.s.field op(value)) {                          \
have you read the code before modifying it?
this is not a function.
have you seen how CVMX_WAIT_FOR_FIELD32 is being called?
on every call of CVMX_WAIT_FOR_FIELD32 op is the operator "=="
so when called the macro will be c.s.field == (value).
if your patch is applied then it will become c.s.field ==(value) .. will that be correct ?

thanks
sudip
quoted
                            result = 0;                                 \
                            break;                                      \
                    } else if (cvmx_get_cycle() > done) {               \
--
1.9.1


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[PATCH] staging: Fix spacing between function name and parentheses

From: peter.senna@gmail.com (Peter Senna Tschudin)
Date: 2014-10-11 08:27:48

I think that, in this case, checkpatch.pl contributed:

$ ./scripts/checkpatch.pl -f drivers/staging/octeon-usb/octeon-hcd.c
WARNING: space prohibited between function name and open parenthesis '('
#415: FILE: drivers/staging/octeon-usb/octeon-hcd.c:415:
+                       if (c.s.field op (value)) {                         \


On Sat, Oct 11, 2014 at 8:11 AM, Dave Tian [off-list ref] wrote:
Agreed - that is why I mentioned the patch is neither right nor useful:)

-daveti


On Oct 11, 2014, at 2:08 PM, Sudip Mukherjee [off-list ref] wrote:
quoted
Hi Dave,
It will work. But my point of saying that was  c.s.field ==(value) is
again not according to the style.

thanks
sudip

On Sat, Oct 11, 2014 at 10:53 AM, Dave Tian [off-list ref] wrote:
quoted
It also works as value is surrounded by (), though I do not think the patch itself is right or useful.

Dave Tian
dave.jing.tian at gmail.com



On Oct 11, 2014, at 12:58 PM, Sudip Mukherjee [off-list ref] wrote:
quoted
On Fri, Oct 10, 2014 at 09:55:48PM -0400, Nicholas Krause wrote:
quoted
Fixes checkpatch coding style warning about unneeded space
between function name an parentheses.

Signed-off-by: Nicholas Krause <redacted>
---
Untested
drivers/staging/octeon-usb/octeon-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index 5f9db4c..bbeb0cc 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -412,7 +412,7 @@ struct octeon_hcd {
            type c;                                                     \
            while (1) {                                                 \
                    c.u32 = __cvmx_usb_read_csr32(usb, address);        \
-                    if (c.s.field op (value)) {                         \
+                    if (c.s.field op(value)) {                          \
have you read the code before modifying it?
this is not a function.
have you seen how CVMX_WAIT_FOR_FIELD32 is being called?
on every call of CVMX_WAIT_FOR_FIELD32 op is the operator "=="
so when called the macro will be c.s.field == (value).
if your patch is applied then it will become c.s.field ==(value) .. will that be correct ?

thanks
sudip
quoted
                            result = 0;                                 \
                            break;                                      \
                    } else if (cvmx_get_cycle() > done) {               \
--
1.9.1


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


-- 
Peter

[PATCH] staging: Fix spacing between function name and parentheses

From: sudipm.mukherjee@gmail.com (Sudip Mukherjee)
Date: 2014-10-11 09:45:44

I agree. But in my opinion checkpatch is here to help us fix style
problems , but we should not blindly act on checkpatch warnings.

thanks
sudip

On Sat, Oct 11, 2014 at 1:57 PM, Peter Senna Tschudin
[off-list ref] wrote:
I think that, in this case, checkpatch.pl contributed:

$ ./scripts/checkpatch.pl -f drivers/staging/octeon-usb/octeon-hcd.c
WARNING: space prohibited between function name and open parenthesis '('
#415: FILE: drivers/staging/octeon-usb/octeon-hcd.c:415:
+                       if (c.s.field op (value)) {                         \


On Sat, Oct 11, 2014 at 8:11 AM, Dave Tian [off-list ref] wrote:
quoted
Agreed - that is why I mentioned the patch is neither right nor useful:)

-daveti


On Oct 11, 2014, at 2:08 PM, Sudip Mukherjee [off-list ref] wrote:
quoted
Hi Dave,
It will work. But my point of saying that was  c.s.field ==(value) is
again not according to the style.

thanks
sudip

On Sat, Oct 11, 2014 at 10:53 AM, Dave Tian [off-list ref] wrote:
quoted
It also works as value is surrounded by (), though I do not think the patch itself is right or useful.

Dave Tian
dave.jing.tian at gmail.com



On Oct 11, 2014, at 12:58 PM, Sudip Mukherjee [off-list ref] wrote:
quoted
On Fri, Oct 10, 2014 at 09:55:48PM -0400, Nicholas Krause wrote:
quoted
Fixes checkpatch coding style warning about unneeded space
between function name an parentheses.

Signed-off-by: Nicholas Krause <redacted>
---
Untested
drivers/staging/octeon-usb/octeon-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index 5f9db4c..bbeb0cc 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -412,7 +412,7 @@ struct octeon_hcd {
            type c;                                                     \
            while (1) {                                                 \
                    c.u32 = __cvmx_usb_read_csr32(usb, address);        \
-                    if (c.s.field op (value)) {                         \
+                    if (c.s.field op(value)) {                          \
have you read the code before modifying it?
this is not a function.
have you seen how CVMX_WAIT_FOR_FIELD32 is being called?
on every call of CVMX_WAIT_FOR_FIELD32 op is the operator "=="
so when called the macro will be c.s.field == (value).
if your patch is applied then it will become c.s.field ==(value) .. will that be correct ?

thanks
sudip
quoted
                            result = 0;                                 \
                            break;                                      \
                    } else if (cvmx_get_cycle() > done) {               \
--
1.9.1


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


--
Peter

[PATCH] staging: Fix spacing between function name and parentheses

From: Kristofer Hallin <hidden>
Date: 2014-10-11 09:53:34

Even if you use checkpath you _should_ understand what you are changing.
The output of checkpatch merely there to help.

In this case you can see that this is a macro just a few lines up in the
code.
On 11 Oct 2014 11:46, "Sudip Mukherjee" [off-list ref] wrote:
I agree. But in my opinion checkpatch is here to help us fix style
problems , but we should not blindly act on checkpatch warnings.

thanks
sudip

On Sat, Oct 11, 2014 at 1:57 PM, Peter Senna Tschudin
[off-list ref] wrote:
quoted
I think that, in this case, checkpatch.pl contributed:

$ ./scripts/checkpatch.pl -f drivers/staging/octeon-usb/octeon-hcd.c
WARNING: space prohibited between function name and open parenthesis '('
#415: FILE: drivers/staging/octeon-usb/octeon-hcd.c:415:
+                       if (c.s.field op (value)) {
   \
quoted

On Sat, Oct 11, 2014 at 8:11 AM, Dave Tian [off-list ref]
wrote:
quoted
quoted
Agreed - that is why I mentioned the patch is neither right nor useful:)

-daveti


On Oct 11, 2014, at 2:08 PM, Sudip Mukherjee <
sudipm.mukherjee at gmail.com> wrote:
quoted
quoted
quoted
Hi Dave,
It will work. But my point of saying that was  c.s.field ==(value) is
again not according to the style.

thanks
sudip

On Sat, Oct 11, 2014 at 10:53 AM, Dave Tian [off-list ref]
wrote:
quoted
quoted
quoted
quoted
It also works as value is surrounded by (), though I do not think the
patch itself is right or useful.
quoted
quoted
quoted
quoted
Dave Tian
dave.jing.tian at gmail.com



On Oct 11, 2014, at 12:58 PM, Sudip Mukherjee <
sudipm.mukherjee at gmail.com> wrote:
quoted
quoted
quoted
quoted
quoted
On Fri, Oct 10, 2014 at 09:55:48PM -0400, Nicholas Krause wrote:
quoted
Fixes checkpatch coding style warning about unneeded space
between function name an parentheses.

Signed-off-by: Nicholas Krause <redacted>
---
Untested
drivers/staging/octeon-usb/octeon-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c
b/drivers/staging/octeon-usb/octeon-hcd.c
quoted
quoted
quoted
quoted
quoted
quoted
index 5f9db4c..bbeb0cc 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -412,7 +412,7 @@ struct octeon_hcd {
            type c;
     \
quoted
quoted
quoted
quoted
quoted
quoted
            while (1) {
     \
quoted
quoted
quoted
quoted
quoted
quoted
                    c.u32 = __cvmx_usb_read_csr32(usb, address);
    \
quoted
quoted
quoted
quoted
quoted
quoted
-                    if (c.s.field op (value)) {
     \
quoted
quoted
quoted
quoted
quoted
quoted
+                    if (c.s.field op(value)) {
      \
quoted
quoted
quoted
quoted
quoted
have you read the code before modifying it?
this is not a function.
have you seen how CVMX_WAIT_FOR_FIELD32 is being called?
on every call of CVMX_WAIT_FOR_FIELD32 op is the operator "=="
so when called the macro will be c.s.field == (value).
if your patch is applied then it will become c.s.field ==(value) ..
will that be correct ?
quoted
quoted
quoted
quoted
quoted
thanks
sudip
quoted
                            result = 0;
     \
quoted
quoted
quoted
quoted
quoted
quoted
                            break;
    \
quoted
quoted
quoted
quoted
quoted
quoted
                    } else if (cvmx_get_cycle() > done) {
     \
quoted
quoted
quoted
quoted
quoted
quoted
--
1.9.1


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


--
Peter
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20141011/0dccbd94/attachment.html 

[PATCH] staging: Fix spacing between function name and parentheses

From: nick <hidden>
Date: 2014-10-11 13:44:05

Thank you for your help, I'll study the code and see what I can do
about it. Do you have any suggestions of how to fix this checkpatch
warning?
Nick

On 14-10-11 05:53 AM, Kristofer Hallin wrote:
Even if you use checkpath you _should_ understand what you are changing.
The output of checkpatch merely there to help.

In this case you can see that this is a macro just a few lines up in the
code.
On 11 Oct 2014 11:46, "Sudip Mukherjee" [off-list ref] wrote:
quoted
I agree. But in my opinion checkpatch is here to help us fix style
problems , but we should not blindly act on checkpatch warnings.

thanks
sudip

On Sat, Oct 11, 2014 at 1:57 PM, Peter Senna Tschudin
[off-list ref] wrote:
quoted
I think that, in this case, checkpatch.pl contributed:

$ ./scripts/checkpatch.pl -f drivers/staging/octeon-usb/octeon-hcd.c
WARNING: space prohibited between function name and open parenthesis '('
#415: FILE: drivers/staging/octeon-usb/octeon-hcd.c:415:
+                       if (c.s.field op (value)) {
   \
quoted

On Sat, Oct 11, 2014 at 8:11 AM, Dave Tian [off-list ref]
wrote:
quoted
quoted
Agreed - that is why I mentioned the patch is neither right nor useful:)

-daveti


On Oct 11, 2014, at 2:08 PM, Sudip Mukherjee <
sudipm.mukherjee at gmail.com> wrote:
quoted
quoted
quoted
Hi Dave,
It will work. But my point of saying that was  c.s.field ==(value) is
again not according to the style.

thanks
sudip

On Sat, Oct 11, 2014 at 10:53 AM, Dave Tian [off-list ref]
wrote:
quoted
quoted
quoted
quoted
It also works as value is surrounded by (), though I do not think the
patch itself is right or useful.
quoted
quoted
quoted
quoted
Dave Tian
dave.jing.tian at gmail.com



On Oct 11, 2014, at 12:58 PM, Sudip Mukherjee <
sudipm.mukherjee at gmail.com> wrote:
quoted
quoted
quoted
quoted
quoted
On Fri, Oct 10, 2014 at 09:55:48PM -0400, Nicholas Krause wrote:
quoted
Fixes checkpatch coding style warning about unneeded space
between function name an parentheses.

Signed-off-by: Nicholas Krause <redacted>
---
Untested
drivers/staging/octeon-usb/octeon-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c
b/drivers/staging/octeon-usb/octeon-hcd.c
quoted
quoted
quoted
quoted
quoted
quoted
index 5f9db4c..bbeb0cc 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -412,7 +412,7 @@ struct octeon_hcd {
            type c;
     \
quoted
quoted
quoted
quoted
quoted
quoted
            while (1) {
     \
quoted
quoted
quoted
quoted
quoted
quoted
                    c.u32 = __cvmx_usb_read_csr32(usb, address);
    \
quoted
quoted
quoted
quoted
quoted
quoted
-                    if (c.s.field op (value)) {
     \
quoted
quoted
quoted
quoted
quoted
quoted
+                    if (c.s.field op(value)) {
      \
quoted
quoted
quoted
quoted
quoted
have you read the code before modifying it?
this is not a function.
have you seen how CVMX_WAIT_FOR_FIELD32 is being called?
on every call of CVMX_WAIT_FOR_FIELD32 op is the operator "=="
so when called the macro will be c.s.field == (value).
if your patch is applied then it will become c.s.field ==(value) ..
will that be correct ?
quoted
quoted
quoted
quoted
quoted
thanks
sudip
quoted
                            result = 0;
     \
quoted
quoted
quoted
quoted
quoted
quoted
                            break;
    \
quoted
quoted
quoted
quoted
quoted
quoted
                    } else if (cvmx_get_cycle() > done) {
     \
quoted
quoted
quoted
quoted
quoted
quoted
--
1.9.1


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


--
Peter
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[PATCH] staging: Fix spacing between function name and parentheses

From: Kristofer Hallin <hidden>
Date: 2014-10-11 13:46:47

Don't. Haven't you learnt anything from your previous attempts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20141011/e90ef16e/attachment.html 

[PATCH] staging: Fix spacing between function name and parentheses

From: Hugo Mills <hidden>
Date: 2014-10-11 13:52:40

On Sat, Oct 11, 2014 at 09:44:05AM -0400, nick wrote:
Thank you for your help, I'll study the code and see what I can do
about it. Do you have any suggestions of how to fix this checkpatch
warning?
   Ignore it. The checker has clearly triggered on a false positive --
this is not a function call, and should not be held to that standard.
(Take a look at where the macro is actually used, to see what's going
on here). Move on to find something more interesting to fix.

   Hugo.
Nick

On 14-10-11 05:53 AM, Kristofer Hallin wrote:
quoted
Even if you use checkpath you _should_ understand what you are changing.
The output of checkpatch merely there to help.

In this case you can see that this is a macro just a few lines up in the
code.
On 11 Oct 2014 11:46, "Sudip Mukherjee" [off-list ref] wrote:
quoted
I agree. But in my opinion checkpatch is here to help us fix style
problems , but we should not blindly act on checkpatch warnings.

thanks
sudip

On Sat, Oct 11, 2014 at 1:57 PM, Peter Senna Tschudin
[off-list ref] wrote:
quoted
I think that, in this case, checkpatch.pl contributed:

$ ./scripts/checkpatch.pl -f drivers/staging/octeon-usb/octeon-hcd.c
WARNING: space prohibited between function name and open parenthesis '('
#415: FILE: drivers/staging/octeon-usb/octeon-hcd.c:415:
+                       if (c.s.field op (value)) {
   \
quoted

On Sat, Oct 11, 2014 at 8:11 AM, Dave Tian [off-list ref]
wrote:
quoted
quoted
Agreed - that is why I mentioned the patch is neither right nor useful:)

-daveti


On Oct 11, 2014, at 2:08 PM, Sudip Mukherjee <
sudipm.mukherjee at gmail.com> wrote:
quoted
quoted
quoted
Hi Dave,
It will work. But my point of saying that was  c.s.field ==(value) is
again not according to the style.

thanks
sudip

On Sat, Oct 11, 2014 at 10:53 AM, Dave Tian [off-list ref]
wrote:
quoted
quoted
quoted
quoted
It also works as value is surrounded by (), though I do not think the
patch itself is right or useful.
quoted
quoted
quoted
quoted
Dave Tian
dave.jing.tian at gmail.com



On Oct 11, 2014, at 12:58 PM, Sudip Mukherjee <
sudipm.mukherjee at gmail.com> wrote:
quoted
quoted
quoted
quoted
quoted
On Fri, Oct 10, 2014 at 09:55:48PM -0400, Nicholas Krause wrote:
quoted
Fixes checkpatch coding style warning about unneeded space
between function name an parentheses.

Signed-off-by: Nicholas Krause <redacted>
---
Untested
drivers/staging/octeon-usb/octeon-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c
b/drivers/staging/octeon-usb/octeon-hcd.c
quoted
quoted
quoted
quoted
quoted
quoted
index 5f9db4c..bbeb0cc 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -412,7 +412,7 @@ struct octeon_hcd {
            type c;
     \
quoted
quoted
quoted
quoted
quoted
quoted
            while (1) {
     \
quoted
quoted
quoted
quoted
quoted
quoted
                    c.u32 = __cvmx_usb_read_csr32(usb, address);
    \
quoted
quoted
quoted
quoted
quoted
quoted
-                    if (c.s.field op (value)) {
     \
quoted
quoted
quoted
quoted
quoted
quoted
+                    if (c.s.field op(value)) {
      \
quoted
quoted
quoted
quoted
quoted
have you read the code before modifying it?
this is not a function.
have you seen how CVMX_WAIT_FOR_FIELD32 is being called?
on every call of CVMX_WAIT_FOR_FIELD32 op is the operator "=="
so when called the macro will be c.s.field == (value).
if your patch is applied then it will become c.s.field ==(value) ..
will that be correct ?
quoted
quoted
quoted
quoted
quoted
thanks
sudip
quoted
                            result = 0;
     \
quoted
quoted
quoted
quoted
quoted
quoted
                            break;
    \
quoted
quoted
quoted
quoted
quoted
quoted
                    } else if (cvmx_get_cycle() > done) {
     \
-- 
=== Hugo Mills: hugo at ... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
             --- Happiness is mandatory.  Are you happy? ---             
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: Digital signature
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20141011/a7281663/attachment-0001.bin 

[PATCH] staging: Fix spacing between function name and parentheses

From: nick <hidden>
Date: 2014-10-11 14:17:23

Thanks Hugo,
Sorry about that. On the other hand was the patch good in terms of format?
Cheers Nick 

On 14-10-11 09:52 AM, Hugo Mills wrote:
On Sat, Oct 11, 2014 at 09:44:05AM -0400, nick wrote:
quoted
Thank you for your help, I'll study the code and see what I can do
about it. Do you have any suggestions of how to fix this checkpatch
warning?
   Ignore it. The checker has clearly triggered on a false positive --
this is not a function call, and should not be held to that standard.
(Take a look at where the macro is actually used, to see what's going
on here). Move on to find something more interesting to fix.

   Hugo.
quoted
Nick

On 14-10-11 05:53 AM, Kristofer Hallin wrote:
quoted
Even if you use checkpath you _should_ understand what you are changing.
The output of checkpatch merely there to help.

In this case you can see that this is a macro just a few lines up in the
code.
On 11 Oct 2014 11:46, "Sudip Mukherjee" [off-list ref] wrote:
quoted
I agree. But in my opinion checkpatch is here to help us fix style
problems , but we should not blindly act on checkpatch warnings.

thanks
sudip

On Sat, Oct 11, 2014 at 1:57 PM, Peter Senna Tschudin
[off-list ref] wrote:
quoted
I think that, in this case, checkpatch.pl contributed:

$ ./scripts/checkpatch.pl -f drivers/staging/octeon-usb/octeon-hcd.c
WARNING: space prohibited between function name and open parenthesis '('
#415: FILE: drivers/staging/octeon-usb/octeon-hcd.c:415:
+                       if (c.s.field op (value)) {
   \
quoted

On Sat, Oct 11, 2014 at 8:11 AM, Dave Tian [off-list ref]
wrote:
quoted
quoted
Agreed - that is why I mentioned the patch is neither right nor useful:)

-daveti


On Oct 11, 2014, at 2:08 PM, Sudip Mukherjee <
sudipm.mukherjee at gmail.com> wrote:
quoted
quoted
quoted
Hi Dave,
It will work. But my point of saying that was  c.s.field ==(value) is
again not according to the style.

thanks
sudip

On Sat, Oct 11, 2014 at 10:53 AM, Dave Tian [off-list ref]
wrote:
quoted
quoted
quoted
quoted
It also works as value is surrounded by (), though I do not think the
patch itself is right or useful.
quoted
quoted
quoted
quoted
Dave Tian
dave.jing.tian at gmail.com



On Oct 11, 2014, at 12:58 PM, Sudip Mukherjee <
sudipm.mukherjee at gmail.com> wrote:
quoted
quoted
quoted
quoted
quoted
On Fri, Oct 10, 2014 at 09:55:48PM -0400, Nicholas Krause wrote:
quoted
Fixes checkpatch coding style warning about unneeded space
between function name an parentheses.

Signed-off-by: Nicholas Krause <redacted>
---
Untested
drivers/staging/octeon-usb/octeon-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c
b/drivers/staging/octeon-usb/octeon-hcd.c
quoted
quoted
quoted
quoted
quoted
quoted
index 5f9db4c..bbeb0cc 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -412,7 +412,7 @@ struct octeon_hcd {
            type c;
     \
quoted
quoted
quoted
quoted
quoted
quoted
            while (1) {
     \
quoted
quoted
quoted
quoted
quoted
quoted
                    c.u32 = __cvmx_usb_read_csr32(usb, address);
    \
quoted
quoted
quoted
quoted
quoted
quoted
-                    if (c.s.field op (value)) {
     \
quoted
quoted
quoted
quoted
quoted
quoted
+                    if (c.s.field op(value)) {
      \
quoted
quoted
quoted
quoted
quoted
have you read the code before modifying it?
this is not a function.
have you seen how CVMX_WAIT_FOR_FIELD32 is being called?
on every call of CVMX_WAIT_FOR_FIELD32 op is the operator "=="
so when called the macro will be c.s.field == (value).
if your patch is applied then it will become c.s.field ==(value) ..
will that be correct ?
quoted
quoted
quoted
quoted
quoted
thanks
sudip
quoted
                            result = 0;
     \
quoted
quoted
quoted
quoted
quoted
quoted
                            break;
    \
quoted
quoted
quoted
quoted
quoted
quoted
                    } else if (cvmx_get_cycle() > done) {
     \

[PATCH] staging: Fix spacing between function name and parentheses

From: Robert P. J. Day <hidden>
Date: 2014-10-11 14:24:27

On Sat, 11 Oct 2014, nick wrote:
Thank you for your help, I'll study the code and see what I can do
about it. Do you have any suggestions of how to fix this checkpatch
warning?
  there is absolutely nothing wrong with that code -- the problem is
your utter lack of understanding.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

[PATCH] staging: Fix spacing between function name and parentheses

From: karthik nayak <hidden>
Date: 2014-10-11 15:25:21

Hey Nick,
Nice try to fix a checkpatch warning. But do read what you're changing.
Yes your format is right. If you haven't already, take a look at "git
send-email" .
Have fun hacking :D
Regards,
Karthik Nayak


On Sat, Oct 11, 2014 at 7:47 PM, nick [off-list ref] wrote:
Thanks Hugo,
Sorry about that. On the other hand was the patch good in terms of format?
Cheers Nick

On 14-10-11 09:52 AM, Hugo Mills wrote:
quoted
On Sat, Oct 11, 2014 at 09:44:05AM -0400, nick wrote:
quoted
Thank you for your help, I'll study the code and see what I can do
about it. Do you have any suggestions of how to fix this checkpatch
warning?
   Ignore it. The checker has clearly triggered on a false positive --
this is not a function call, and should not be held to that standard.
(Take a look at where the macro is actually used, to see what's going
on here). Move on to find something more interesting to fix.

   Hugo.
quoted
Nick

On 14-10-11 05:53 AM, Kristofer Hallin wrote:
quoted
Even if you use checkpath you _should_ understand what you are changing.
The output of checkpatch merely there to help.

In this case you can see that this is a macro just a few lines up in the
code.
On 11 Oct 2014 11:46, "Sudip Mukherjee" [off-list ref] wrote:
quoted
I agree. But in my opinion checkpatch is here to help us fix style
problems , but we should not blindly act on checkpatch warnings.

thanks
sudip

On Sat, Oct 11, 2014 at 1:57 PM, Peter Senna Tschudin
[off-list ref] wrote:
quoted
I think that, in this case, checkpatch.pl contributed:

$ ./scripts/checkpatch.pl -f drivers/staging/octeon-usb/octeon-hcd.c
WARNING: space prohibited between function name and open parenthesis '('
#415: FILE: drivers/staging/octeon-usb/octeon-hcd.c:415:
+                       if (c.s.field op (value)) {
   \
quoted

On Sat, Oct 11, 2014 at 8:11 AM, Dave Tian [off-list ref]
wrote:
quoted
quoted
Agreed - that is why I mentioned the patch is neither right nor useful:)

-daveti


On Oct 11, 2014, at 2:08 PM, Sudip Mukherjee <
sudipm.mukherjee at gmail.com> wrote:
quoted
quoted
quoted
Hi Dave,
It will work. But my point of saying that was  c.s.field ==(value) is
again not according to the style.

thanks
sudip

On Sat, Oct 11, 2014 at 10:53 AM, Dave Tian [off-list ref]
wrote:
quoted
quoted
quoted
quoted
It also works as value is surrounded by (), though I do not think the
patch itself is right or useful.
quoted
quoted
quoted
quoted
Dave Tian
dave.jing.tian at gmail.com



On Oct 11, 2014, at 12:58 PM, Sudip Mukherjee <
sudipm.mukherjee at gmail.com> wrote:
quoted
quoted
quoted
quoted
quoted
On Fri, Oct 10, 2014 at 09:55:48PM -0400, Nicholas Krause wrote:
quoted
Fixes checkpatch coding style warning about unneeded space
between function name an parentheses.

Signed-off-by: Nicholas Krause <redacted>
---
Untested
drivers/staging/octeon-usb/octeon-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c
b/drivers/staging/octeon-usb/octeon-hcd.c
quoted
quoted
quoted
quoted
quoted
quoted
index 5f9db4c..bbeb0cc 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -412,7 +412,7 @@ struct octeon_hcd {
            type c;
     \
quoted
quoted
quoted
quoted
quoted
quoted
            while (1) {
     \
quoted
quoted
quoted
quoted
quoted
quoted
                    c.u32 = __cvmx_usb_read_csr32(usb, address);
    \
quoted
quoted
quoted
quoted
quoted
quoted
-                    if (c.s.field op (value)) {
     \
quoted
quoted
quoted
quoted
quoted
quoted
+                    if (c.s.field op(value)) {
      \
quoted
quoted
quoted
quoted
quoted
have you read the code before modifying it?
this is not a function.
have you seen how CVMX_WAIT_FOR_FIELD32 is being called?
on every call of CVMX_WAIT_FOR_FIELD32 op is the operator "=="
so when called the macro will be c.s.field == (value).
if your patch is applied then it will become c.s.field ==(value) ..
will that be correct ?
quoted
quoted
quoted
quoted
quoted
thanks
sudip
quoted
                            result = 0;
     \
quoted
quoted
quoted
quoted
quoted
quoted
                            break;
    \
quoted
quoted
quoted
quoted
quoted
quoted
                    } else if (cvmx_get_cycle() > done) {
     \
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[PATCH] staging: Fix spacing between function name and parentheses

From: nick <hidden>
Date: 2014-10-11 22:18:25

Great to known. Sorry about not reading the code, will check more carefully
before I fix it.
Regards Nick 

On 14-10-11 11:25 AM, karthik nayak wrote:
Hey Nick,
Nice try to fix a checkpatch warning. But do read what you're changing.
Yes your format is right. If you haven't already, take a look at "git
send-email" .
Have fun hacking :D
Regards,
Karthik Nayak


On Sat, Oct 11, 2014 at 7:47 PM, nick [off-list ref] wrote:
quoted
Thanks Hugo,
Sorry about that. On the other hand was the patch good in terms of format?
Cheers Nick

On 14-10-11 09:52 AM, Hugo Mills wrote:
quoted
On Sat, Oct 11, 2014 at 09:44:05AM -0400, nick wrote:
quoted
Thank you for your help, I'll study the code and see what I can do
about it. Do you have any suggestions of how to fix this checkpatch
warning?
   Ignore it. The checker has clearly triggered on a false positive --
this is not a function call, and should not be held to that standard.
(Take a look at where the macro is actually used, to see what's going
on here). Move on to find something more interesting to fix.

   Hugo.
quoted
Nick

On 14-10-11 05:53 AM, Kristofer Hallin wrote:
quoted
Even if you use checkpath you _should_ understand what you are changing.
The output of checkpatch merely there to help.

In this case you can see that this is a macro just a few lines up in the
code.
On 11 Oct 2014 11:46, "Sudip Mukherjee" [off-list ref] wrote:
quoted
I agree. But in my opinion checkpatch is here to help us fix style
problems , but we should not blindly act on checkpatch warnings.

thanks
sudip

On Sat, Oct 11, 2014 at 1:57 PM, Peter Senna Tschudin
[off-list ref] wrote:
quoted
I think that, in this case, checkpatch.pl contributed:

$ ./scripts/checkpatch.pl -f drivers/staging/octeon-usb/octeon-hcd.c
WARNING: space prohibited between function name and open parenthesis '('
#415: FILE: drivers/staging/octeon-usb/octeon-hcd.c:415:
+                       if (c.s.field op (value)) {
   \
quoted

On Sat, Oct 11, 2014 at 8:11 AM, Dave Tian [off-list ref]
wrote:
quoted
quoted
Agreed - that is why I mentioned the patch is neither right nor useful:)

-daveti


On Oct 11, 2014, at 2:08 PM, Sudip Mukherjee <
sudipm.mukherjee at gmail.com> wrote:
quoted
quoted
quoted
Hi Dave,
It will work. But my point of saying that was  c.s.field ==(value) is
again not according to the style.

thanks
sudip

On Sat, Oct 11, 2014 at 10:53 AM, Dave Tian [off-list ref]
wrote:
quoted
quoted
quoted
quoted
It also works as value is surrounded by (), though I do not think the
patch itself is right or useful.
quoted
quoted
quoted
quoted
Dave Tian
dave.jing.tian at gmail.com



On Oct 11, 2014, at 12:58 PM, Sudip Mukherjee <
sudipm.mukherjee at gmail.com> wrote:
quoted
quoted
quoted
quoted
quoted
On Fri, Oct 10, 2014 at 09:55:48PM -0400, Nicholas Krause wrote:
quoted
Fixes checkpatch coding style warning about unneeded space
between function name an parentheses.

Signed-off-by: Nicholas Krause <redacted>
---
Untested
drivers/staging/octeon-usb/octeon-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c
b/drivers/staging/octeon-usb/octeon-hcd.c
quoted
quoted
quoted
quoted
quoted
quoted
index 5f9db4c..bbeb0cc 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -412,7 +412,7 @@ struct octeon_hcd {
            type c;
     \
quoted
quoted
quoted
quoted
quoted
quoted
            while (1) {
     \
quoted
quoted
quoted
quoted
quoted
quoted
                    c.u32 = __cvmx_usb_read_csr32(usb, address);
    \
quoted
quoted
quoted
quoted
quoted
quoted
-                    if (c.s.field op (value)) {
     \
quoted
quoted
quoted
quoted
quoted
quoted
+                    if (c.s.field op(value)) {
      \
quoted
quoted
quoted
quoted
quoted
have you read the code before modifying it?
this is not a function.
have you seen how CVMX_WAIT_FOR_FIELD32 is being called?
on every call of CVMX_WAIT_FOR_FIELD32 op is the operator "=="
so when called the macro will be c.s.field == (value).
if your patch is applied then it will become c.s.field ==(value) ..
will that be correct ?
quoted
quoted
quoted
quoted
quoted
thanks
sudip
quoted
                            result = 0;
     \
quoted
quoted
quoted
quoted
quoted
quoted
                            break;
    \
quoted
quoted
quoted
quoted
quoted
quoted
                    } else if (cvmx_get_cycle() > done) {
     \
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help