From: Arnd Bergmann <arnd@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>,
Douglas Anderson <dianders@chromium.org>,
Petr Mladek <pmladek@suse.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Kees Cook <keescook@chromium.org>,
David Gow <davidgow@google.com>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Miguel Ojeda <ojeda@kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Zhaoyang Huang <zhaoyang.huang@unisoc.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] watchdog/hardlockup: simplify Kconfig selection
Date: Fri, 4 Aug 2023 15:27:51 +0200 [thread overview]
Message-ID: <20230804132800.2270896-2-arnd@kernel.org> (raw)
In-Reply-To: <20230804132800.2270896-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
The use of the 'imply' keyword tends to be a bad idea, as it's at best
confusing to the reader but often actually doesn't do what the author
intended.
In this case, it seems to be used correctly, but doing the same thing
using 'default' statements as we have elsewhere in the kernel is simpler
and would be easier to understand by readers that are unfamiliar with
the special semantics of 'imply'.
Fixes: 1356d0b966e7e ("watchdog/hardlockup: make the config checks more straightforward")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I got confused by the 'imply' here myself and thought this had caused
a build failure that turned out to be unrelated, but it might help
to apply this anyway to save the next person the confusion.
---
lib/Kconfig.debug | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 72177a80baddc..8cfb49b6974c8 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1056,9 +1056,6 @@ config HARDLOCKUP_DETECTOR
bool "Detect Hard Lockups"
depends on DEBUG_KERNEL && !S390 && !HARDLOCKUP_DETECTOR_SPARC64
depends on HAVE_HARDLOCKUP_DETECTOR_PERF || HAVE_HARDLOCKUP_DETECTOR_BUDDY || HAVE_HARDLOCKUP_DETECTOR_ARCH
- imply HARDLOCKUP_DETECTOR_PERF
- imply HARDLOCKUP_DETECTOR_BUDDY
- imply HARDLOCKUP_DETECTOR_ARCH
select LOCKUP_DETECTOR
help
@@ -1090,24 +1087,21 @@ config HARDLOCKUP_DETECTOR_PREFER_BUDDY
for the hardlockup detector are better used for other things.
config HARDLOCKUP_DETECTOR_PERF
- bool
+ def_bool HAVE_HARDLOCKUP_DETECTOR_PERF
depends on HARDLOCKUP_DETECTOR
- depends on HAVE_HARDLOCKUP_DETECTOR_PERF && !HARDLOCKUP_DETECTOR_PREFER_BUDDY
- depends on !HAVE_HARDLOCKUP_DETECTOR_ARCH
+ depends on !HARDLOCKUP_DETECTOR_PREFER_BUDDY && !HAVE_HARDLOCKUP_DETECTOR_ARCH
select HARDLOCKUP_DETECTOR_COUNTS_HRTIMER
config HARDLOCKUP_DETECTOR_BUDDY
- bool
+ def_bool HAVE_HARDLOCKUP_DETECTOR_BUDDY
depends on HARDLOCKUP_DETECTOR
- depends on HAVE_HARDLOCKUP_DETECTOR_BUDDY
depends on !HAVE_HARDLOCKUP_DETECTOR_PERF || HARDLOCKUP_DETECTOR_PREFER_BUDDY
depends on !HAVE_HARDLOCKUP_DETECTOR_ARCH
select HARDLOCKUP_DETECTOR_COUNTS_HRTIMER
config HARDLOCKUP_DETECTOR_ARCH
- bool
+ def_bool HAVE_HARDLOCKUP_DETECTOR_ARCH
depends on HARDLOCKUP_DETECTOR
- depends on HAVE_HARDLOCKUP_DETECTOR_ARCH
help
The arch-specific implementation of the hardlockup detector will
be used.
--
2.39.2
next prev parent reply other threads:[~2023-08-04 13:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-04 13:27 [PATCH 1/2] watchdog/hardlockup: avoid unused-function warning Arnd Bergmann
2023-08-04 13:27 ` Arnd Bergmann [this message]
2023-08-04 14:06 ` [PATCH 2/2] watchdog/hardlockup: simplify Kconfig selection Doug Anderson
2023-08-04 14:03 ` [PATCH 1/2] watchdog/hardlockup: avoid unused-function warning Doug Anderson
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=20230804132800.2270896-2-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=davidgow@google.com \
--cc=dianders@chromium.org \
--cc=geert+renesas@glider.be \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=pmladek@suse.com \
--cc=zhaoyang.huang@unisoc.com \
/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