2023-06-14 08:48:43

by hexingwei001

[permalink] [raw]
Subject: [PATCH] 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).

Signed-off-by: Xingwei He <[email protected]>
---
lib/test_printf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/test_printf.c b/lib/test_printf.c
index 7677ebccf3c3..9d17c564fdf6 100644
--- a/lib/test_printf.c
+++ b/lib/test_printf.c
@@ -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);


2023-06-14 13:07:52

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH] lib/test_printf.c: space required after that ','

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.

Reviewed-by: Andy Shevchenko <[email protected]>


> Signed-off-by: Xingwei He <[email protected]>
> ---
> lib/test_printf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/test_printf.c b/lib/test_printf.c
> index 7677ebccf3c3..9d17c564fdf6 100644
> --- a/lib/test_printf.c
> +++ b/lib/test_printf.c
> @@ -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);

--
With Best Regards,
Andy Shevchenko



2023-06-14 15:28:04

by Steven Rostedt

[permalink] [raw]
Subject: Re: [PATCH] lib/test_printf.c: space required after that ','

On Wed, 14 Jun 2023 15:32:30 +0300
Andy Shevchenko <[email protected]> wrote:

> 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.
>
> Reviewed-by: Andy Shevchenko <[email protected]>

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

-- Steve

2023-06-14 15:34:47

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH] lib/test_printf.c: space required after that ','

On Wed, Jun 14, 2023 at 11:06:40AM -0400, Steven Rostedt wrote:
> On Wed, 14 Jun 2023 15:32:30 +0300
> Andy Shevchenko <[email protected]> wrote:
> > 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.
> >
> > Reviewed-by: Andy Shevchenko <[email protected]>
>
> 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?

--
With Best Regards,
Andy Shevchenko



2023-06-18 04:34:33

by Sergey Senozhatsky

[permalink] [raw]
Subject: Re: [PATCH] lib/test_printf.c: space required after that ','

On (23/06/14 18:16), Andy Shevchenko wrote:
> >
> > 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.

2023-06-19 06:57:23

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH] lib/test_printf.c: space required after that ','

On Wed 2023-06-14 18:16:36, Andy Shevchenko wrote:
> On Wed, Jun 14, 2023 at 11:06:40AM -0400, Steven Rostedt wrote:
> > On Wed, 14 Jun 2023 15:32:30 +0300
> > Andy Shevchenko <[email protected]> wrote:
> > > 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.
> > >
> > > Reviewed-by: Andy Shevchenko <[email protected]>
> >
> > 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
--
People of Russia, stop Putin before his war on Ukraine escalates.


Attachments:
(No filename) (1.45 kB)
signature.asc (201.00 B)
Download all attachments

2023-06-19 14:03:44

by Petr Mladek

[permalink] [raw]
Subject: Re: [PATCH] lib/test_printf.c: space required after that ','

On Mon 2023-06-19 08:45:22, Pavel Machek wrote:
> On Wed 2023-06-14 18:16:36, Andy Shevchenko wrote:
> > On Wed, Jun 14, 2023 at 11:06:40AM -0400, Steven Rostedt wrote:
> > > On Wed, 14 Jun 2023 15:32:30 +0300
> > > Andy Shevchenko <[email protected]> wrote:
> > > > 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.
> > > >
> > > > Reviewed-by: Andy Shevchenko <[email protected]>
> > >
> > > 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".


> 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