]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drivers/char/random.c: make primary_crng static
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Fri, 2 Nov 2018 11:04:47 +0000 (12:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Jun 2022 09:46:25 +0000 (11:46 +0200)
commit 764ed189c82090c1d85f0e30636156736d8f09a8 upstream.

Since the definition of struct crng_state is private to random.c, and
primary_crng is neither declared or used elsewhere, there's no reason
for that symbol to have external linkage.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/random.c

index 2b9ef31d359b5aa7c419859581f8b44b20f2e206..9d41210277ee503d38b8e8f0670596dd5c975fd8 100644 (file)
@@ -415,7 +415,7 @@ struct crng_state {
        spinlock_t      lock;
 };
 
-struct crng_state primary_crng = {
+static struct crng_state primary_crng = {
        .lock = __SPIN_LOCK_UNLOCKED(primary_crng.lock),
 };