All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: 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 08:26:47 -0500	[thread overview]
Message-ID: <20221123082647.4531eabf@gandalf.local.home> (raw)
In-Reply-To: <Y33jK7p2Xc6KD1ax@hirez.programming.kicks-ass.net>

On Wed, 23 Nov 2022 10:08:59 +0100
Peter Zijlstra <peterz@infradead.org> 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.

OK, if you are fine with it then sure. I personally like seeing all
variables declared in one place. Maybe because I've been trained that way,
and I can easily be confused when I see a variable somewhere and don't see
it in the beginning declarations.

-- Steve

      parent reply	other threads:[~2022-11-23 13:40 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
2022-11-23 13:26     ` Steven Rostedt [this message]

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=20221123082647.4531eabf@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=ardb@kernel.org \
    --cc=jbaron@akamai.com \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.