Thread (24 messages) flat view 24 messages, 6 authors, 2026-02-27

Re: [PATCH v3 1/5] mm: introduce zone lock wrappers

From: SeongJae Park <sj@kernel.org>
Date: 2026-02-27 01:01:04
Also in: linux-cxl, linux-mm, lkml

On Thu, 26 Feb 2026 19:53:55 -0500 Steven Rostedt [off-list ref] wrote:
On Thu, 26 Feb 2026 16:38:55 -0800
SeongJae Park [off-list ref] wrote:
quoted
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?
quoted
    #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

[...]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help