From: Mark Rutland <mark.rutland@arm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Uros Bizjak <ubizjak@gmail.com>,
linux-kernel@vger.kernel.org,
Josh Poimboeuf <jpoimboe@kernel.org>,
Jason Baron <jbaron@akamai.com>, Ard Biesheuvel <ardb@kernel.org>
Subject: Re: [PATCH] jump_label: use atomic_try_cmpxchg in static_key_slow_inc_cpuslocked
Date: Wed, 23 Nov 2022 11:28:56 +0000 [thread overview]
Message-ID: <Y34D+CnkhVRcneet@FVFF77S0Q05N> (raw)
In-Reply-To: <Y33jK7p2Xc6KD1ax@hirez.programming.kicks-ass.net>
On Wed, Nov 23, 2022 at 10:08:59AM +0100, Peter Zijlstra wrote:
> 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.
That was one reason, yes. Marco and I wanted to be able to use C99-style
declarations in for loops to make it easier/possible to build macros with
locally-scoped control variables.
I personally prefer using C99-style declarations in for loops, but I don't have
a strong feeling that we *must* do so.
Thanks,
Mark.
next prev parent reply other threads:[~2022-11-23 11:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 14:08 [PATCH] jump_label: use atomic_try_cmpxchg in static_key_slow_inc_cpuslocked Uros Bizjak
2022-10-28 6:41 ` [tip: locking/core] jump_label: Use atomic_try_cmpxchg() in static_key_slow_inc_cpuslocked() tip-bot2 for Uros Bizjak
2022-11-22 21:14 ` [PATCH] jump_label: use atomic_try_cmpxchg in static_key_slow_inc_cpuslocked Steven Rostedt
2022-11-23 9:08 ` Peter Zijlstra
2022-11-23 11:28 ` Mark Rutland [this message]
2022-11-23 13:26 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y34D+CnkhVRcneet@FVFF77S0Q05N \
--to=mark.rutland@arm.com \
--cc=ardb@kernel.org \
--cc=jbaron@akamai.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=ubizjak@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox