Skip to contentSkip to conversation

Staging: octeon: Fix line ending with '('

PATCH In review Sumitra Sharma 2 participants 4 messages Mar 17, 2023 Staging

lore
Share & tools
lore
#0 lore raw

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

Since the coding style limited the code to 80 columns per line which caused splitting the function header into two lines resulted in the first line ending with a '('. This caused the checkpatch error.

Place the function parameters immediately after '(' in a single line to align the function header.

---
v2: Change patch subject and description

v3: Change patch description, noted by Deepak R Varma <[email protected]>

v4: Correct grammartical mistakes, noted by Julia Lawall <[email protected]>

 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
Quoted 3 lines · Sumitra Sharma

Since the coding style limited the code to 80 columns per line which caused splitting the function header into two lines resulted in the first line ending with a '('. This caused the checkpatch error.

The first sentence is still not really grammatical. Something like:

The coding style used to limit lines to 80 characters, which led to splitting this function header into multiple lines, and ending thie first line with a (.

For checkpatch, is it an error or a warning?

julia

Quoted 39 lines

Place the function parameters immediately after '(' in a single line to align the function header.

---
v2: Change patch subject and description

v3: Change patch description, noted by Deepak R Varma <[email protected]>

v4: Correct grammartical mistakes, noted by Julia Lawall <[email protected]>

 drivers/staging/octeon/octeon-stubs.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/octeon/octeon-stubs.h +1 -4
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;
 
--

2.25.1

#2 lore raw
Quoted 8 lines · Julia Lawall
Quoted 3 lines · Sumitra Sharma

Since the coding style limited the code to 80 columns per line which caused splitting the function header into two lines resulted in the first line ending with a '('. This caused the checkpatch error.

Quoted 8 lines

The first sentence is still not really grammatical. Something like:

The coding style used to limit lines to 80 characters, which led to splitting this function header into multiple lines, and ending thie first line with a (.

For checkpatch, is it an error or a warning?

HI julia,

Yes, you are correct, I did the mistake its not the error but a check.

How about this...

###
The coding style used to limit lines to 80 characters, which led to splitting this function header into multiple lines and ending the first line with a '('. This split causes a check reported by the checkpatch.

Place the function parameters immediately after '(' in a single line to align the function header.
###

Thank you for your reviews.

Regards,
Sumitra

Quoted 41 lines

julia

Quoted 39 lines

Place the function parameters immediately after '(' in a single line to align the function header.

---
v2: Change patch subject and description

v3: Change patch description, noted by Deepak R Varma <[email protected]>

v4: Correct grammartical mistakes, noted by Julia Lawall <[email protected]>

 drivers/staging/octeon/octeon-stubs.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/octeon/octeon-stubs.h +1 -4
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;
 
--

2.25.1

#3 lore raw
Quoted 24 lines · Sumitra Sharma
Quoted 8 lines · Julia Lawall
Quoted 3 lines · Sumitra Sharma

Since the coding style limited the code to 80 columns per line which caused splitting the function header into two lines resulted in the first line ending with a '('. This caused the checkpatch error.

Quoted 8 lines

The first sentence is still not really grammatical. Something like:

The coding style used to limit lines to 80 characters, which led to splitting this function header into multiple lines, and ending thie first line with a (.

For checkpatch, is it an error or a warning?

HI julia,

Yes, you are correct, I did the mistake its not the error but a check.

How about this...

Quoted 8 lines

###
The coding style used to limit lines to 80 characters, which led to splitting this function header into multiple lines and ending the first line with a '('. This split causes a check reported by the checkpatch.

Place the function parameters immediately after '(' in a single line to align the function header.
###

Looks better.

thanks,
julia

Quoted 49 lines

Thank you for your reviews.

Regards,
Sumitra

Quoted 41 lines

julia

Quoted 39 lines

Place the function parameters immediately after '(' in a single line to align the function header.

---
v2: Change patch subject and description

v3: Change patch description, noted by Deepak R Varma <[email protected]>

v4: Correct grammartical mistakes, noted by Julia Lawall <[email protected]>

 drivers/staging/octeon/octeon-stubs.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/octeon/octeon-stubs.h +1 -4
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;
 
--

2.25.1