Re: [PATCH v3 1/5] mm: introduce zone lock wrappers
From: SeongJae Park
Date: Thu Feb 26 2026 - 20:01:17 EST
On Thu, 26 Feb 2026 19:53:55 -0500 Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> On Thu, 26 Feb 2026 16:38:55 -0800
> SeongJae Park <sj@xxxxxxxxxx> wrote:
>
> > checkpatch.pl complains as below. Should be ok to ignore, but, may better to
> > kindly make it silence?
> >
> > WARNING: Single statement macros should not use a do {} while (0) loop
>
> Hmm, why is this an issue?
>
> > #116: FILE: include/linux/zone_lock.h:13:
> > +#define zone_lock_irqsave(zone, flags) \
> > +do { \
> > + spin_lock_irqsave(&(zone)->lock, flags); \
> > +} while (0)
> >
>
> I know this is checkpatch and not you complaining about it, but I really
> think it's a useless complaint. I can see it better as a do { } while (0)
> because it is creating a "function" like feature but can't be inline due to
> flags.
>
> This is one of the reasons I still never use checkpatch.pl :-(
Makes sense to me, thank you Steve :)
Thanks,
SJ
[...]