Skip to content

Commit

Permalink
random: do not include <asm/archrandom.h> from random.h
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
zx2c4 committed Dec 20, 2022
1 parent 6feb57c commit 6bb20c1
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions arch/powerpc/kernel/setup-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
#include <asm/xmon.h>
#include <asm/cputhreads.h>
#include <mm/mmu_decl.h>
#include <asm/archrandom.h>
#include <asm/fadump.h>
#include <asm/udbg.h>
#include <asm/hugetlb.h>
Expand Down
1 change: 1 addition & 0 deletions arch/s390/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include <linux/hugetlb.h>
#include <linux/kmemleak.h>

#include <asm/archrandom.h>
#include <asm/boot_data.h>
#include <asm/ipl.h>
#include <asm/facility.h>
Expand Down
1 change: 1 addition & 0 deletions drivers/char/hw_random/powernv-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/platform_device.h>
#include <linux/random.h>
#include <linux/hw_random.h>
#include <asm/archrandom.h>

static int powernv_rng_read(struct hwrng *rng, void *data, size_t max, bool wait)
{
Expand Down
1 change: 1 addition & 0 deletions drivers/char/hw_random/s390-trng.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/sched/signal.h>
#include <asm/debug.h>
#include <asm/cpacf.h>
#include <asm/archrandom.h>

MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("IBM Corporation");
Expand Down
1 change: 1 addition & 0 deletions drivers/char/random.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#include <linux/sched/isolation.h>
#include <crypto/chacha.h>
#include <crypto/blake2s.h>
#include <asm/archrandom.h>
#include <asm/processor.h>
#include <asm/irq.h>
#include <asm/irq_regs.h>
Expand Down
2 changes: 0 additions & 2 deletions include/linux/random.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ declare_get_random_var_wait(long, unsigned long)
*/
#include <linux/prandom.h>

#include <asm/archrandom.h>

#ifdef CONFIG_SMP
int random_prepare_cpu(unsigned int cpu);
int random_online_cpu(unsigned int cpu);
Expand Down

0 comments on commit 6bb20c1

Please sign in to comment.