random: include <linux/once.h> in the right header
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 2 Dec 2022 21:13:36 +0000 (22:13 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Sun, 4 Dec 2022 13:37:08 +0000 (14:37 +0100)
<linux/prandom.h> uses DO_ONCE(), so it should include <linux/once.h>
directly. In contrast, <linux/random.h> does not use code from
<linux/once.h>, so it should be removed.

Move the `#include <linux/once.h>` line into the right file.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Fixes: c0842fbc1b18 ("random32: move the pseudo-random 32-bit definitions to prandom.h")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
include/linux/prandom.h
include/linux/random.h

index 1f4a0de7b019eaf55d5d0b5fb327169585158df2..c94c02ba065cd615a11bf885f86ee2c83c843b17 100644 (file)
@@ -9,6 +9,7 @@
 #define _LINUX_PRANDOM_H
 
 #include <linux/types.h>
+#include <linux/once.h>
 #include <linux/percpu.h>
 #include <linux/random.h>
 
index b1a34181eed6992a6dbedc8313f261baabf06818..4a2a1de423cd900d4ca12cf1d363ecf078ee5966 100644 (file)
@@ -6,7 +6,6 @@
 #include <linux/bug.h>
 #include <linux/kernel.h>
 #include <linux/list.h>
-#include <linux/once.h>
 
 #include <uapi/linux/random.h>