Skip to content

Commit 6bb20c1

Browse files
committed
random: do not include <asm/archrandom.h> from random.h
The <asm/archrandom.h> header is a random.c private detail, not something to be called by other code. As such, don't make it automatically available by way of random.h. Cc: Michael Ellerman <[email protected]> Acked-by: Heiko Carstens <[email protected]> Reviewed-by: Christophe Leroy <[email protected]> Signed-off-by: Jason A. Donenfeld <[email protected]>
1 parent 6feb57c commit 6bb20c1

File tree

6 files changed

+5
-2
lines changed

6 files changed

+5
-2
lines changed

arch/powerpc/kernel/setup-common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
#include <asm/xmon.h>
6060
#include <asm/cputhreads.h>
6161
#include <mm/mmu_decl.h>
62+
#include <asm/archrandom.h>
6263
#include <asm/fadump.h>
6364
#include <asm/udbg.h>
6465
#include <asm/hugetlb.h>

arch/s390/kernel/setup.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
#include <linux/hugetlb.h>
5353
#include <linux/kmemleak.h>
5454

55+
#include <asm/archrandom.h>
5556
#include <asm/boot_data.h>
5657
#include <asm/ipl.h>
5758
#include <asm/facility.h>

drivers/char/hw_random/powernv-rng.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/platform_device.h>
1212
#include <linux/random.h>
1313
#include <linux/hw_random.h>
14+
#include <asm/archrandom.h>
1415

1516
static int powernv_rng_read(struct hwrng *rng, void *data, size_t max, bool wait)
1617
{

drivers/char/hw_random/s390-trng.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <linux/sched/signal.h>
2424
#include <asm/debug.h>
2525
#include <asm/cpacf.h>
26+
#include <asm/archrandom.h>
2627

2728
MODULE_LICENSE("GPL v2");
2829
MODULE_AUTHOR("IBM Corporation");

drivers/char/random.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
#include <linux/sched/isolation.h>
5757
#include <crypto/chacha.h>
5858
#include <crypto/blake2s.h>
59+
#include <asm/archrandom.h>
5960
#include <asm/processor.h>
6061
#include <asm/irq.h>
6162
#include <asm/irq_regs.h>

include/linux/random.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,6 @@ declare_get_random_var_wait(long, unsigned long)
152152
*/
153153
#include <linux/prandom.h>
154154

155-
#include <asm/archrandom.h>
156-
157155
#ifdef CONFIG_SMP
158156
int random_prepare_cpu(unsigned int cpu);
159157
int random_online_cpu(unsigned int cpu);

0 commit comments

Comments
 (0)