public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Peter Zijlstra <peterz@infradead.org>, Jason Baron <jbaron@akamai.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: static key arrays?
Date: Fri, 11 Sep 2015 11:45:35 +0200	[thread overview]
Message-ID: <1441964735.2083.4.camel@sipsolutions.net> (raw)

Hi Peter, Jason, all,

Per the recent type-safe API changes, it's no longer easy to generate
an array of static keys. I was planning to do that for a set of very
unlikely debug options.

It sounds like you're planning to remove the previous API entirely at
some point, so I'm wondering if you've given any thought to this
possibility.

I briefly played with the idea of adding a macro for that, but the
necessary "REPEAT(n, d)" macro for the initialisation becomes ugly
pretty quickly and, afaict, needs to have enough macros for the maximum
expected numbers.

For the case I was looking at it's static_key_false so a zero
-initialized array would be sufficient, but that can't be done easily
with a static_key_true.

johannes

             reply	other threads:[~2015-09-11  9:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-11  9:45 Johannes Berg [this message]
2015-09-11 11:10 ` static key arrays? Peter Zijlstra
2015-09-11 12:14   ` Johannes Berg
2015-09-11 14:41     ` Rasmus Villemoes
2015-09-11 14:55       ` Johannes Berg
2015-09-11 11:17 ` Baron, Jason

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=1441964735.2083.4.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=jbaron@akamai.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.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