public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] random: Include <linux/once.h> in the right header
@ 2022-12-02 21:13 Christophe JAILLET
  2022-12-02 21:17 ` Kees Cook
  2022-12-03  1:03 ` Jason A. Donenfeld
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2022-12-02 21:13 UTC (permalink / raw)
  To: Jason, kuba, tytso, elver, yury.norov, linux, gregkh, pmladek,
	keescook
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET

<linux/prandom.h> uses DO_ONCE(). So it should include <linux/once.h>
directly.

On the contrary, <linux/random.h> doesn't use functionalities from
<linux/once.h>, so it should be removed.

All this is true since commit c0842fbc1b18 ("random32: move the
pseudo-random 32-bit definitions to prandom.h")

Move the #include <linux/once.h> in the right file.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Let see if build-bots agree with me!
---
 include/linux/prandom.h | 1 +
 include/linux/random.h  | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/prandom.h b/include/linux/prandom.h
index 1f4a0de7b019..c94c02ba065c 100644
--- a/include/linux/prandom.h
+++ b/include/linux/prandom.h
@@ -9,6 +9,7 @@
 #define _LINUX_PRANDOM_H
 
 #include <linux/types.h>
+#include <linux/once.h>
 #include <linux/percpu.h>
 #include <linux/random.h>
 
diff --git a/include/linux/random.h b/include/linux/random.h
index b1a34181eed6..4a2a1de423cd 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -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>
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-03  1:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-02 21:13 [PATCH] random: Include <linux/once.h> in the right header Christophe JAILLET
2022-12-02 21:17 ` Kees Cook
2022-12-03  1:03 ` Jason A. Donenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox