random: use IS_ENABLED(CONFIG_NUMA) instead of ifdefs
authorJason A. Donenfeld <Jason@zx2c4.com>
Thu, 30 Dec 2021 14:59:26 +0000 (15:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Jun 2022 09:46:30 +0000 (11:46 +0200)
commit048cc34c4cdf82ff5aeebf474de4f23f5def8313
tree6548527256e0a717242afb34b0569025437efc21
parent5d3c00a79b3e762e355037c3b286310d345dc346
random: use IS_ENABLED(CONFIG_NUMA) instead of ifdefs

commit 7b87324112df2e1f9b395217361626362dcfb9fb upstream.

Rather than an awkward combination of ifdefs and __maybe_unused, we can
ensure more source gets parsed, regardless of the configuration, by
using IS_ENABLED for the CONFIG_NUMA conditional code. This makes things
cleaner and easier to follow.

I've confirmed that on !CONFIG_NUMA, we don't wind up with excess code
by accident; the generated object file is the same.

Reviewed-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/random.c