linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "tip-bot2 for Masahiro Yamada" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Masahiro Yamada <masahiroy@kernel.org>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: locking/core] jump_label: Refactor #ifdef of struct static_key
Date: Thu, 17 Feb 2022 18:56:23 -0000	[thread overview]
Message-ID: <164512418374.16921.7962295675716313147.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20220213165717.2354046-2-masahiroy@kernel.org>

The following commit has been merged into the locking/core branch of tip:

Commit-ID:     cd27ccfc727e99352321c0c75012ab9c5a90321e
Gitweb:        https://git.kernel.org/tip/cd27ccfc727e99352321c0c75012ab9c5a90321e
Author:        Masahiro Yamada <masahiroy@kernel.org>
AuthorDate:    Mon, 14 Feb 2022 01:57:17 +09:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Wed, 16 Feb 2022 15:57:58 +01:00

jump_label: Refactor #ifdef of struct static_key

Move #ifdef CONFIG_JUMP_LABEL inside the struct static_key.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20220213165717.2354046-2-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 6924e68..107751c 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

  reply	other threads:[~2022-02-17 18:56 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-bot2 for Masahiro Yamada [this message]
2022-02-18 19:07   ` Jason Baron
2022-02-18 19:27     ` Josh Poimboeuf
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=164512418374.16921.7962295675716313147.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=peterz@infradead.org \
    --cc=x86@kernel.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).