On Thu, 26 Feb 2026 16:38:55 -0800
SeongJae Park <[email protected]> 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

Reply via email to