From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Jason Baron <jbaron@akamai.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
linux-kernel@vger.kernel.org, Ard Biesheuvel <ardb@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH 2/2] jump_label: refactor #ifdef of struct static_key
Date: Fri, 18 Feb 2022 11:27:54 -0800 [thread overview]
Message-ID: <20220218192754.hlwo6ffixybevbrt@treble> (raw)
In-Reply-To: <c65fa908-72a6-bad9-613b-fb33a6e0359c@akamai.com>
On Fri, Feb 18, 2022 at 02:07:26PM -0500, Jason Baron wrote:
> On 2/13/22 11:57, Masahiro Yamada wrote:
> > Move #ifdef CONFIG_JUMP_LABEL inside the struct static_key.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
> >
> > include/linux/jump_label.h | 9 ++-------
> > 1 file changed, 2 insertions(+), 7 deletions(-)
> >
> > diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h
> > index 6924e6837e6d..107751cc047b 100644
> > --- a/include/linux/jump_label.h
> > +++ b/include/linux/jump_label.h
> > @@ -82,10 +82,9 @@ extern bool static_key_initialized;
> > "%s(): static key '%pS' used before call to jump_label_init()", \
> > __func__, (key))
> >
> > -#ifdef CONFIG_JUMP_LABEL
> > -
> > struct static_key {
> > atomic_t enabled;
> > +#ifdef CONFIG_JUMP_LABEL
> > /*
> > * Note:
> > * To make anonymous unions work with old compilers, the static
> > @@ -104,13 +103,9 @@ struct static_key {
> > struct jump_entry *entries;
> > struct static_key_mod *next;
> > };
> > +#endif /* CONFIG_JUMP_LABEL */
> > };
> >
> > -#else
> > -struct static_key {
> > - atomic_t enabled;
> > -};
> > -#endif /* CONFIG_JUMP_LABEL */
> > #endif /* __ASSEMBLY__ */
> >
> > #ifdef CONFIG_JUMP_LABEL
>
>
> These two cleanups look fine to me.
>
> Acked-by: Jason Baron <jbaron@akamai.com>>
Both look fine to me as well. For both patches:
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
--
Josh
next prev parent reply other threads:[~2022-02-18 19:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-13 16:57 [PATCH 1/2] jump_label: avoid unneeded casts in STATIC_KEY_INIT_{TRUE,FALSE} Masahiro Yamada
2022-02-13 16:57 ` [PATCH 2/2] jump_label: refactor #ifdef of struct static_key Masahiro Yamada
2022-02-17 18:56 ` [tip: locking/core] jump_label: Refactor " tip-bot2 for Masahiro Yamada
2022-02-18 19:07 ` [PATCH 2/2] jump_label: refactor " Jason Baron
2022-02-18 19:27 ` Josh Poimboeuf [this message]
2022-02-17 18:56 ` [tip: locking/core] jump_label: Avoid unneeded casts in STATIC_KEY_INIT_{TRUE,FALSE} tip-bot2 for Masahiro Yamada
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=20220218192754.hlwo6ffixybevbrt@treble \
--to=jpoimboe@redhat.com \
--cc=ardb@kernel.org \
--cc=jbaron@akamai.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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
all inboxes | Powered by JetHome®