public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* static key arrays?
@ 2015-09-11  9:45 Johannes Berg
  2015-09-11 11:10 ` Peter Zijlstra
  2015-09-11 11:17 ` Baron, Jason
  0 siblings, 2 replies; 6+ messages in thread
From: Johannes Berg @ 2015-09-11  9:45 UTC (permalink / raw)
  To: Peter Zijlstra, Jason Baron; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-09-11 14:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-11  9:45 static key arrays? Johannes Berg
2015-09-11 11:10 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox