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

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

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2026-02-27 00:53:47
Also in: linux-cxl, linux-mm, lkml

On Thu, 26 Feb 2026 16:38:55 -0800
SeongJae Park [off-list ref] 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 :-(

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