OSDN Git Service

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)
committerJason A. Donenfeld <Jason@zx2c4.com>
Thu, 6 Jan 2022 23:25:25 +0000 (00:25 +0100)
commit7b87324112df2e1f9b395217361626362dcfb9fb
treefcf127b7faffe7045d696842eb542554e59ab742
parent161212c7fd1d9069b232785c75492e50941e2ea8
random: use IS_ENABLED(CONFIG_NUMA) instead of ifdefs

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>
drivers/char/random.c