From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Frank Wunderlich <linux@fw-web.de>
Cc: linux-pm@vger.kernel.org,
Frank Wunderlich <frank-w@public-files.de>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
Stephen Boyd <sboyd@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC v1] opp: add config option for debug
Date: Wed, 4 May 2022 20:24:00 +0200 [thread overview]
Message-ID: <YnLEwEIOqnLGxFjJ@kroah.com> (raw)
In-Reply-To: <20220504174823.156709-1-linux@fw-web.de>
On Wed, May 04, 2022 at 07:48:23PM +0200, Frank Wunderlich wrote:
> From: Frank Wunderlich <frank-w@public-files.de>
>
> Currently OPP debug is enabled by DEBUG_DRIVER option. This is generic
> driver debug and opp floods serial console. This is annoying if opp is
> not needed so give it an additional config-key.
>
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> ---
> drivers/base/Kconfig | 1 +
> drivers/opp/Kconfig | 7 +++++++
> drivers/opp/Makefile | 2 +-
> 3 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
> index 6f04b831a5c0..8ae826c95d5f 100644
> --- a/drivers/base/Kconfig
> +++ b/drivers/base/Kconfig
> @@ -130,6 +130,7 @@ config DEV_COREDUMP
> config DEBUG_DRIVER
> bool "Driver Core verbose debug messages"
> depends on DEBUG_KERNEL
> + imply DEBUG_OPP
This should not be needed, otherwise we would have to do that for all
random driver subsystem in the kernel.
> help
> Say Y here if you want the Driver core to produce a bunch of
> debug messages to the system log. Select this if you are having a
> diff --git a/drivers/opp/Kconfig b/drivers/opp/Kconfig
> index e8ce47b32735..6a2d2c6c1143 100644
> --- a/drivers/opp/Kconfig
> +++ b/drivers/opp/Kconfig
> @@ -12,3 +12,10 @@ config PM_OPP
> representing individual voltage domains and provides SOC
> implementations a ready to use framework to manage OPPs.
> For more information, read <file:Documentation/power/opp.rst>
> +
> +menu "Operating Performance Points (OPP)"
> +config DEBUG_OPP
> + bool "Debug Operating Performance Points"
> + help
> + enable opp debugging
> +endmenu
> diff --git a/drivers/opp/Makefile b/drivers/opp/Makefile
> index f65ed5985bb4..2589915eef95 100644
> --- a/drivers/opp/Makefile
> +++ b/drivers/opp/Makefile
> @@ -1,5 +1,5 @@
> # SPDX-License-Identifier: GPL-2.0-only
> -ccflags-$(CONFIG_DEBUG_DRIVER) := -DDEBUG
> +ccflags-$(CONFIG_DEBUG_OPP) := -DDEBUG
This feels wrong, you shouldn't need a -DDEBUG for anything if all is
going correctly. Why is opp so odd this way? Just use the normal
dev_dbg() macros and all will be fine, nothing special should be needed
at all.
And don't use a config option for it either, no one will turn it on, it
needs to "just work" for all systems.
thanks,
greg k-h
next prev parent reply other threads:[~2022-05-05 17:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-04 17:48 [RFC v1] opp: add config option for debug Frank Wunderlich
2022-05-04 18:24 ` Greg Kroah-Hartman [this message]
2022-05-05 17:50 ` Frank Wunderlich
2022-05-05 17:57 ` Greg Kroah-Hartman
2022-05-05 5:58 ` Viresh Kumar
2022-05-05 15:54 ` Aw: " Frank Wunderlich
2022-05-05 17:38 ` Greg Kroah-Hartman
2022-05-06 4:06 ` Viresh Kumar
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=YnLEwEIOqnLGxFjJ@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=frank-w@public-files.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@fw-web.de \
--cc=nm@ti.com \
--cc=rafael@kernel.org \
--cc=sboyd@kernel.org \
--cc=vireshk@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).