Re: static key arrays?
From: Johannes Berg
Date: Fri Sep 11 2015 - 10:55:50 EST
On Fri, 2015-09-11 at 16:41 +0200, Rasmus Villemoes wrote:
>
> That's inconvenient for large arrays. I think the 'or something' would
> be the range initialization supported by gcc (and I think also clang):
>
> struct static_key_false array[N] = { [0 ... N-1] = STATIC_KEY_FALSE_INIT };
>
Ah, I wasn't aware of that extension. That's indeed much more
convenient than the CPP trick I was thinking of :)
johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/