public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Chuck Ebbert <cebbert.lkml@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] static-keys: Better error checking for static_key_enable/disable
Date: Fri, 28 Aug 2015 00:23:20 +0200	[thread overview]
Message-ID: <20150827222320.GA16853@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20150827165713.7fc9ff4c@as>

On Thu, Aug 27, 2015 at 04:57:13PM -0400, Chuck Ebbert wrote:
> The  warnings for static_key_enable/disable don't catch common
> errors. For example, starting with a default enabled key and
> calling enable doesn't cause a warning until the next enable
> or disable. Check explicitly for zero or one instead of allowing
> both values in every case. Generated code should be smaller too.

I explicitly intended to allow multiple consecutive static_key_enable()
calls (same for disable).

If its already enabled, calling enable should be a no-op.

      reply	other threads:[~2015-08-27 22:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-27 20:57 [PATCH -next] static-keys: Better error checking for static_key_enable/disable Chuck Ebbert
2015-08-27 22:23 ` Peter Zijlstra [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=20150827222320.GA16853@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=cebbert.lkml@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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