diff mbox series

[12/50] prandom: Remove unused include

Message ID 20231216032651.3553101-2-kent.overstreet@linux.dev (mailing list archive)
State New, archived
Headers show
Series big header dependency cleanup targeting sched.h | expand

Commit Message

Kent Overstreet Dec. 16, 2023, 3:26 a.m. UTC
prandom.h doesn't use percpu.h - this fixes some circular header issues.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
---
 include/linux/prandom.h | 1 -
 1 file changed, 1 deletion(-)

Comments

Randy Dunlap Dec. 16, 2023, 6:52 p.m. UTC | #1
On 12/15/23 19:26, Kent Overstreet wrote:
> prandom.h doesn't use percpu.h - this fixes some circular header issues.
> 
> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
> Signed-off-by: Suren Baghdasaryan <surenb@google.com>
> ---
>  include/linux/prandom.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/include/linux/prandom.h b/include/linux/prandom.h
> index f2ed5b72b3d6..f7f1e5251c67 100644
> --- a/include/linux/prandom.h
> +++ b/include/linux/prandom.h
> @@ -10,7 +10,6 @@
>  
>  #include <linux/types.h>
>  #include <linux/once.h>
> -#include <linux/percpu.h>
>  #include <linux/random.h>
>  
>  struct rnd_state {

In this header file:

    22	void prandom_seed_full_state(struct rnd_state __percpu *pcpu_state);

so where does it get __percpu from?
Kent Overstreet Dec. 16, 2023, 10:19 p.m. UTC | #2
On Sat, Dec 16, 2023 at 10:52:04AM -0800, Randy Dunlap wrote:
> 
> 
> On 12/15/23 19:26, Kent Overstreet wrote:
> > prandom.h doesn't use percpu.h - this fixes some circular header issues.
> > 
> > Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
> > Signed-off-by: Suren Baghdasaryan <surenb@google.com>
> > ---
> >  include/linux/prandom.h | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/include/linux/prandom.h b/include/linux/prandom.h
> > index f2ed5b72b3d6..f7f1e5251c67 100644
> > --- a/include/linux/prandom.h
> > +++ b/include/linux/prandom.h
> > @@ -10,7 +10,6 @@
> >  
> >  #include <linux/types.h>
> >  #include <linux/once.h>
> > -#include <linux/percpu.h>
> >  #include <linux/random.h>
> >  
> >  struct rnd_state {
> 
> In this header file:
> 
>     22	void prandom_seed_full_state(struct rnd_state __percpu *pcpu_state);
> 
> so where does it get __percpu from?

That comes from compiler.h -> compiler_types.h... cscope :)
diff mbox series

Patch

diff --git a/include/linux/prandom.h b/include/linux/prandom.h
index f2ed5b72b3d6..f7f1e5251c67 100644
--- a/include/linux/prandom.h
+++ b/include/linux/prandom.h
@@ -10,7 +10,6 @@ 
 
 #include <linux/types.h>
 #include <linux/once.h>
-#include <linux/percpu.h>
 #include <linux/random.h>
 
 struct rnd_state {