Skip to contentSkip to conversation

Staging: octeon: Fix line ending with '('

PATCH Superseded Sumitra Sharma 3 participants 5 messages Mar 16, 2023 1 message not in the archive Staging

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Staging: octeon: Fix line ending with '('

Adhere to coding-style.

Checkpatch has reported code style warning:
CHECK: Lines should not end with a '('.

Enhance the design of a function header:
Align the function parameters immediately after '(' in a single line.

---

v2: Change patch subject and description.

 drivers/staging/octeon/octeon-stubs.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/octeon/octeon-stubs.h +1 -3
index 7a02e59e283f..3e7b92cd2e35 100644
@@ -1372,9 +1372,7 @@ static inline void cvmx_fau_async_fetch_and_add32(uint64_t scraddr,
 						  int32_t value)
 { }
 
-static inline union cvmx_gmxx_rxx_rx_inbnd cvmx_spi4000_check_speed(
-	int interface,
-	int port)
+static inline union cvmx_gmxx_rxx_rx_inbnd cvmx_spi4000_check_speed(int interface, int port)
 {
 	union cvmx_gmxx_rxx_rx_inbnd r;
 
Signature · 1 line
2.25.1
#1 lore raw

Hi--

Quoted 5 lines · Sumitra Sharma

Adhere to coding-style.

Checkpatch has reported code style warning:
CHECK: Lines should not end with a '('.

Not to complain about the patch, but where is this documented in coding-style? I searched for it and cannot find it.

Thanks.

Quoted 26 lines

Enhance the design of a function header:
Align the function parameters immediately after '(' in a single line.

---

v2: Change patch subject and description.

 drivers/staging/octeon/octeon-stubs.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/octeon/octeon-stubs.h +1 -3
index 7a02e59e283f..3e7b92cd2e35 100644
@@ -1372,9 +1372,7 @@ static inline void cvmx_fau_async_fetch_and_add32(uint64_t scraddr,
 						  int32_t value)
 { }
 
-static inline union cvmx_gmxx_rxx_rx_inbnd cvmx_spi4000_check_speed(
-	int interface,
-	int port)
+static inline union cvmx_gmxx_rxx_rx_inbnd cvmx_spi4000_check_speed(int interface, int port)
 {
 	union cvmx_gmxx_rxx_rx_inbnd r;
 
Signature · 1 line
~Randy
#2 lore raw
In reply to Sumitra Sharma
Quoted 1 line · Sumitra Sharma

Adhere to coding-style.

Hi Sumitra,
Quick background: Linux Kernel coding style required developers to limit the code within 80 columns per line. This resulted in splitting the long lines into more than one lines. Some splits were unwillingly poor causing checkpatch error [e.g. this one that you are attempting to address].
Recently, the 80 column limit was relaxed to 100 columns. This now will allow to merge some poorly split lines resulting in improved readability and avoid checkpath complaints.

Now, can you use this information to convert your live above a little more descriptive. Remember a well written "why" explanation is almost always necessary.

Quoted 6 lines

Checkpatch has reported code style warning:
CHECK: Lines should not end with a '('.

Enhance the design of a function header:
Align the function parameters immediately after '(' in a single line.

This is the "what" part and not so useful for such a simple change. You need not write this. However for complex changes or tricky code optimization, the "what" part will be very useful as well.

Hope this helps.

Deepak.

Quoted 28 lines

---

v2: Change patch subject and description.

 drivers/staging/octeon/octeon-stubs.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/octeon/octeon-stubs.h +1 -3
index 7a02e59e283f..3e7b92cd2e35 100644
@@ -1372,9 +1372,7 @@ static inline void cvmx_fau_async_fetch_and_add32(uint64_t scraddr,
 						  int32_t value)
 { }
 
-static inline union cvmx_gmxx_rxx_rx_inbnd cvmx_spi4000_check_speed(
-	int interface,
-	int port)
+static inline union cvmx_gmxx_rxx_rx_inbnd cvmx_spi4000_check_speed(int interface, int port)
 {
 	union cvmx_gmxx_rxx_rx_inbnd r;
 
Signature · 1 line
2.25.1
#4 lore raw
In reply to a message not in the archive
Quoted 13 lines · Sumitra Sharma
Quoted 12 lines · Deepak R Varma
Quoted 1 line · Sumitra Sharma

Adhere to coding-style.

Hi Sumitra,
Quick background: Linux Kernel coding style required developers to limit the code within 80 columns per line. This resulted in splitting the long lines into more than one lines. Some splits were unwillingly poor causing checkpatch error [e.g. this one that you are attempting to address].
Recently, the 80 column limit was relaxed to 100 columns. This now will allow to merge some poorly split lines resulting in improved readability and avoid checkpath complaints.

Quoted 4 lines

Hi Deepak

Since, you mentioned that the 80 column limit has been relaxed to 100 columns. So will then this patch be useful??

Yes, that change from 80 to 100 makes way for your patch.

Also always do a "reply-all". You can add more recipients to the email if necessary, but you should not remove anyone.

Quoted 60 lines
Quoted 4 lines

Now, can you use this information to convert your live above a little more descriptive. Remember a well written "why" explanation is almost always necessary.

Okay!

Quoted 5 lines
Quoted 5 lines

Checkpatch has reported code style warning:
CHECK: Lines should not end with a '('.

Quoted 7 lines
Quoted 2 lines

Enhance the design of a function header:
Align the function parameters immediately after '(' in a single line.

This is the "what" part and not so useful for such a simple change. You need not write this. However for complex changes or tricky code optimization, the "what" part will be very useful as well.

I will keep this in mind.

Quoted 5 lines

Hope this helps.

Deepak.

Quoted 1 line

Regards

SUmitra

Quoted 29 lines
Quoted 27 lines

---

v2: Change patch subject and description.

 drivers/staging/octeon/octeon-stubs.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/octeon/octeon-stubs.h +1 -3
index 7a02e59e283f..3e7b92cd2e35 100644
@@ -1372,9 +1372,7 @@ static inline void cvmx_fau_async_fetch_and_add32(uint64_t scraddr,
 						  int32_t value)
 { }
 
-static inline union cvmx_gmxx_rxx_rx_inbnd cvmx_spi4000_check_speed(
-	int interface,
-	int port)
+static inline union cvmx_gmxx_rxx_rx_inbnd cvmx_spi4000_check_speed(int interface, int port)
 {
 	union cvmx_gmxx_rxx_rx_inbnd r;
 
Signature · 1 line
2.25.1
#5 lore raw
Quoted 16 lines · Deepak R Varma
Quoted 15 lines · Sumitra Sharma
Quoted 12 lines · Deepak R Varma
Quoted 1 line · Sumitra Sharma

Adhere to coding-style.

Hi Sumitra,
Quick background: Linux Kernel coding style required developers to limit the code within 80 columns per line. This resulted in splitting the long lines into more than one lines. Some splits were unwillingly poor causing checkpatch error [e.g. this one that you are attempting to address].
Recently, the 80 column limit was relaxed to 100 columns. This now will allow to merge some poorly split lines resulting in improved readability and avoid checkpath complaints.

Hi Deepak

Quoted 8 lines
Quoted 2 lines

Since, you mentioned that the 80 column limit has been relaxed to 100 columns. So will then this patch be useful??

Yes, that change from 80 to 100 makes way for your patch.

Also always do a "reply-all". You can add more recipients to the email if necessary, but you should not remove anyone.

Okay! Thank you deepak

Regards,

Sumitra

Quoted 62 lines
Quoted 60 lines
Quoted 4 lines

Now, can you use this information to convert your live above a little more descriptive. Remember a well written "why" explanation is almost always necessary.

Okay!

Quoted 5 lines
Quoted 5 lines

Checkpatch has reported code style warning:
CHECK: Lines should not end with a '('.

Quoted 7 lines
Quoted 2 lines

Enhance the design of a function header:
Align the function parameters immediately after '(' in a single line.

This is the "what" part and not so useful for such a simple change. You need not write this. However for complex changes or tricky code optimization, the "what" part will be very useful as well.

I will keep this in mind.

Quoted 5 lines

Hope this helps.

Deepak.

Quoted 1 line

Regards

SUmitra

Quoted 29 lines
Quoted 27 lines

---

v2: Change patch subject and description.

 drivers/staging/octeon/octeon-stubs.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/octeon/octeon-stubs.h +1 -3
index 7a02e59e283f..3e7b92cd2e35 100644
@@ -1372,9 +1372,7 @@ static inline void cvmx_fau_async_fetch_and_add32(uint64_t scraddr,
 						  int32_t value)
 { }
 
-static inline union cvmx_gmxx_rxx_rx_inbnd cvmx_spi4000_check_speed(
-	int interface,
-	int port)
+static inline union cvmx_gmxx_rxx_rx_inbnd cvmx_spi4000_check_speed(int interface, int port)
 {
 	union cvmx_gmxx_rxx_rx_inbnd r;
 
Signature · 1 line
2.25.1