[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGsJ_4wb+koAGiK0FnW-ChO3E7iuzvjKXiF_6V_tkopaZ5D_qA@mail.gmail.com>
Date: Fri, 29 Mar 2024 10:24:03 +1300
From: Barry Song <21cnbao@...il.com>
To: Jeff Johnson <quic_jjohnson@...cinc.com>
Cc: akpm@...ux-foundation.org, linux-doc@...r.kernel.org, apw@...onical.com,
broonie@...nel.org, chenhuacai@...ngson.cn, chris@...kel.net, corbet@....net,
dwaipayanray1@...il.com, herbert@...dor.apana.org.au, joe@...ches.com,
linux-kernel@...r.kernel.org, linux@...ck-us.net, lukas.bulwahn@...il.com,
mac.xxn@...look.com, sfr@...b.auug.org.au, v-songbaohua@...o.com,
workflows@...r.kernel.org, Max Filippov <jcmvbkbc@...il.com>
Subject: Re: [PATCH v4 2/2] scripts: checkpatch: check unused parameters for
function-like macro
On Fri, Mar 29, 2024 at 5:01 AM Jeff Johnson <quic_jjohnson@...cinccom> wrote:
>
> On 3/27/2024 7:21 PM, Barry Song wrote:
> > From: Xining Xu <mac.xxn@...look.com>
> >
> > If function-like macros do not utilize a parameter, it might result in a
> > build warning. In our coding style guidelines, we advocate for utilizing
> > static inline functions to replace such macros. This patch verifies
> > compliance with the new rule.
> >
> > For a macro such as the one below,
> >
> > #define test(a) do { } while (0)
> >
> > The test result is as follows.
> >
> > ERROR: Parameter 'a' is not used in function-like macro, please use static
> > inline instead
> > #21: FILE: mm/init-mm.c:20:
> > +#define test(a) do { } while (0)
> >
> > total: 1 errors, 0 warnings, 8 lines checked
> >
> > Signed-off-by: Xining Xu <mac.xxn@...look.com>
>
> if you are re-posting somebody else's work you need to add your own Signed-off-by
Ok. Jeff, I will do it in the new version and obviously Joe still has
some remaining
comments to be addressed by Xining.
>
> > Tested-by: Barry Song <v-songbaohua@...o.com>
> > Cc: Chris Zankel <chris@...kel.net>
> > Cc: Huacai Chen <chenhuacai@...ngson.cn>
> > Cc: Herbert Xu <herbert@...dor.apana.org.au>
> > Cc: Guenter Roeck <linux@...ck-us.net>
> > Cc: Stephen Rothwell <sfr@...b.auug.org.au>
> > Cc: Mark Brown <broonie@...nel.org>
> > Cc: Andy Whitcroft <apw@...onical.com>
> > Cc: Dwaipayan Ray <dwaipayanray1@...il.com>
> > Cc: Joe Perches <joe@...ches.com>
> > Cc: Jonathan Corbet <corbet@....net>
> > Cc: Lukas Bulwahn <lukas.bulwahn@...il.com>
> > Cc: Max Filippov <jcmvbkbc@...il.com>
>
Powered by blists - more mailing lists