Skip to contentSkip to conversation

lib/test_printf.c: space required after that ','

PATCH In review [email protected] 6 participants 7 messages Jun 14, 2023 – Jun 19, 2023 1 message not in the archive Library code

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 lib/test_printf.c: space required after that ','

Add missing spaces to clear checkpatch errors:

lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV).

---
 lib/test_printf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/test_printf.c +1 -1
index 7677ebccf3c3..9d17c564fdf6 100644
@@ -559,7 +559,7 @@ static void __init
 bitmap(void)
 {
     DECLARE_BITMAP(bits, 20);
-    const int primes[] = {2,3,5,7,11,13,17,19};
+    const int primes[] = {2, 3, 5, 7, 11, 13, 17, 19};
     int i;
 
     bitmap_zero(bits, 20);
Reviewed-by on v1 1/1
#2 lore raw
Quoted 8 lines · On Wed, Jun 14, 2023 at 04:30:55PM +0800, [email protected] wrote:

Add missing spaces to clear checkpatch errors:

lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV).

Doesn't make any difference to the code, so let do this (unneeded) churn to calm checkpatch down.

Quoted 18 lines
---
 lib/test_printf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/test_printf.c +1 -1
index 7677ebccf3c3..9d17c564fdf6 100644
@@ -559,7 +559,7 @@ static void __init
 bitmap(void)
 {
     DECLARE_BITMAP(bits, 20);
-    const int primes[] = {2,3,5,7,11,13,17,19};
+    const int primes[] = {2, 3, 5, 7, 11, 13, 17, 19};
     int i;
 
     bitmap_zero(bits, 20);
Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw
Quoted 10 lines · On Wed, 14 Jun 2023 15:32:30 +0300 Andy Shevchenko…
Quoted 8 lines · On Wed, Jun 14, 2023 at 04:30:55PM +0800, [email protected] wrote:

Add missing spaces to clear checkpatch errors:

lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV).

Quoted 4 lines

Doesn't make any difference to the code, so let do this (unneeded) churn to calm checkpatch down.

checkpatch is for patches (new code) and should not be run on existing code.

-- Steve

#4 lore raw
Quoted 12 lines · Steven Rostedt
Quoted 10 lines · On Wed, 14 Jun 2023 15:32:30 +0300 Andy Shevchenko…
Quoted 8 lines · On Wed, Jun 14, 2023 at 04:30:55PM +0800, [email protected] wrote:

Add missing spaces to clear checkpatch errors:

lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV).

Quoted 6 lines
Quoted 4 lines

Doesn't make any difference to the code, so let do this (unneeded) churn to calm checkpatch down.

checkpatch is for patches (new code) and should not be run on existing code.

Why does it have -f option? What do you propose to prevent people from using it?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#5 lore raw
Quoted 4 lines · Andy Shevchenko
Quoted 2 lines

checkpatch is for patches (new code) and should not be run on existing code.

What do you propose to prevent people from using it?

Yes. It should not be used on the existing code because it breaks backport of important fixes to stable trees.

#6 lore raw
In reply to Andy Shevchenko
Quoted 13 lines · Andy Shevchenko
Quoted 12 lines · Steven Rostedt
Quoted 10 lines · On Wed, 14 Jun 2023 15:32:30 +0300 Andy Shevchenko…
Quoted 8 lines · On Wed, Jun 14, 2023 at 04:30:55PM +0800, [email protected] wrote:

Add missing spaces to clear checkpatch errors:

lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV).

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Doesn't make any difference to the code, so let do this (unneeded) churn to calm checkpatch down.

checkpatch is for patches (new code) and should not be run on existing code.

Why does it have -f option? What do you propose to prevent people from using it?

Brain needs to be used while using checkpatch.

Plus, autosel is "great" trying to backport anything that mentions "error", so better don't do this.

Best regards,
Pavel

Signature · 1 line
People of Russia, stop Putin before his war on Ukraine escalates.
#7 lore raw
Quoted 17 lines · Pavel Machek
Quoted 16 lines · Andy Shevchenko
Quoted 15 lines · Steven Rostedt
Quoted 13 lines · On Wed, 14 Jun 2023 15:32:30 +0300 Andy Shevchenko…
Quoted 8 lines · On Wed, Jun 14, 2023 at 04:30:55PM +0800, [email protected] wrote:

Add missing spaces to clear checkpatch errors:

lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV). lib/test_printf.c:562: ERROR: space required after that ',' (ctx:VxV).

Doesn't make any difference to the code, so let do this (unneeded) churn to calm checkpatch down.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

checkpatch is for patches (new code) and should not be run on existing code.

Why does it have -f option? What do you propose to prevent people from using it?

Brain needs to be used while using checkpatch.

I agree.

Also I agree with Sergey that these changes just complicate backport.

I would prefer if people did not send these cosmetic "fixes".

Quoted 2 lines

Plus, autosel is "great" trying to backport anything that mentions "error", so better don't do this.

Autosel is another tool which would deserve a human filter. Well, we have it because of lack of resources...

I am surprised that checkpatch.po reports the missing space as an "ERROR" in the first place.

Best Regards,
Petr