Re: [PATCH 1/4] sched/wakeup: Strengthen current_save_and_set_rtlock_wait_state()

From: Peter Zijlstra
Date: Fri Sep 10 2021 - 13:11:35 EST


On Fri, Sep 10, 2021 at 12:07:40PM -0400, Waiman Long wrote:
> > #define set_special_state(state_value) \
> > do { \
> > - unsigned long flags; /* may shadow */ \
> > + unsigned long __flags; /* may shadow */ \
>
> Do you still need the "may shadow" comment?

Strictly speaking yes, there _could_ be a local variable called __flags,
however unlikely.

At some point someone was going around and doing dodgy patches based on
compiler warnings about variables being shadowed, this it to preempt
anybody trying to 'fix' this (again).