From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>,
jpoimboe@kernel.org, peterz@infradead.org,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, patches@lists.linux.dev
Subject: Re: [PATCH] MIPS: Mark check_bugs{,_early}() as __init
Date: Fri, 21 Apr 2023 09:27:12 +0200 [thread overview]
Message-ID: <20230421072712.GA5563@alpha.franken.de> (raw)
In-Reply-To: <20230419233710.GA1314058@dev-arch.thelio-3990X>
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 ]
prev parent reply other threads:[~2023-04-21 7:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-19 18:42 [PATCH] MIPS: Mark check_bugs{,_early}() as __init Nathan Chancellor
2023-04-19 22:03 ` Nick Desaulniers
2023-04-19 23:37 ` Nathan Chancellor
2023-04-21 7:27 ` Thomas Bogendoerfer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230421072712.GA5563@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=patches@lists.linux.dev \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).