Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <mpe@ellerman.id.au>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

+5 -2
+1
arch/powerpc/kernel/setup-common.c
··· 59 59 #include <asm/xmon.h> 60 60 #include <asm/cputhreads.h> 61 61 #include <mm/mmu_decl.h> 62 + #include <asm/archrandom.h> 62 63 #include <asm/fadump.h> 63 64 #include <asm/udbg.h> 64 65 #include <asm/hugetlb.h>
+1
arch/s390/kernel/setup.c
··· 52 52 #include <linux/hugetlb.h> 53 53 #include <linux/kmemleak.h> 54 54 55 + #include <asm/archrandom.h> 55 56 #include <asm/boot_data.h> 56 57 #include <asm/ipl.h> 57 58 #include <asm/facility.h>
+1
drivers/char/hw_random/powernv-rng.c
··· 11 11 #include <linux/platform_device.h> 12 12 #include <linux/random.h> 13 13 #include <linux/hw_random.h> 14 + #include <asm/archrandom.h> 14 15 15 16 static int powernv_rng_read(struct hwrng *rng, void *data, size_t max, bool wait) 16 17 {
+1
drivers/char/hw_random/s390-trng.c
··· 23 23 #include <linux/sched/signal.h> 24 24 #include <asm/debug.h> 25 25 #include <asm/cpacf.h> 26 + #include <asm/archrandom.h> 26 27 27 28 MODULE_LICENSE("GPL v2"); 28 29 MODULE_AUTHOR("IBM Corporation");
+1
drivers/char/random.c
··· 56 56 #include <linux/sched/isolation.h> 57 57 #include <crypto/chacha.h> 58 58 #include <crypto/blake2s.h> 59 + #include <asm/archrandom.h> 59 60 #include <asm/processor.h> 60 61 #include <asm/irq.h> 61 62 #include <asm/irq_regs.h>
-2
include/linux/random.h
··· 152 152 */ 153 153 #include <linux/prandom.h> 154 154 155 - #include <asm/archrandom.h> 156 - 157 155 #ifdef CONFIG_SMP 158 156 int random_prepare_cpu(unsigned int cpu); 159 157 int random_online_cpu(unsigned int cpu);