Re: [PATCH] jump_label: use atomic_try_cmpxchg in static_key_slow_inc_cpuslocked

From: Peter Zijlstra
Date: Wed Nov 23 2022 - 04:09:33 EST


On Tue, Nov 22, 2022 at 04:14:46PM -0500, Steven Rostedt wrote:

> > + for (int v = atomic_read(&key->enabled); v > 0; )
>
> Although it's permitted by the compiler, the kernel style is to not add
> declarations in conditionals.

I'm thinking the whole motivation for upping to C99 was exactly so that
we could start using this pattern.