Re: [PATCH] MIPS: Mark check_bugs{,_early}() as __init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 19, 2023 at 04:37:10PM -0700, Nathan Chancellor wrote:
> > > diff --git a/arch/mips/include/asm/bugs.h b/arch/mips/include/asm/bugs.h
> > > index d72dc6e1cf3c..9b9bf9bc7d24 100644
> > > --- a/arch/mips/include/asm/bugs.h
> > > +++ b/arch/mips/include/asm/bugs.h
> > > @@ -24,13 +24,13 @@ extern void check_bugs64_early(void);
> > >  extern void check_bugs32(void);
> > >  extern void check_bugs64(void);
> > >
> > > -static inline void check_bugs_early(void)
> > > +static inline void __init check_bugs_early(void)
> > >  {
> > >         if (IS_ENABLED(CONFIG_CPU_R4X00_BUGS64))
> > >                 check_bugs64_early();
> > >  }
> > 
> > If the only call site is in arch/mips/kernel/setup.c, then perhaps we
> > can move the definition of check_bugs_early there and mark it static
> > __init and drop inline?
> 
> Sure, we could even go a step further and just copy the body into the
> one call site ourselves, I see little reason for this to be a dedicated
> function. That is probably best done in a separate patch altogether in
> lieu of just adding __init.

I don't expect any new checks added to check_bugs_early so let's
move the whole function into the call site.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]



[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux