From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Thierry Strudel <tstrudel@google.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Kevin Hilman <khilman@kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] PM: domains: create debugfs nodes when adding power domains
Date: Sat, 5 Dec 2020 09:58:08 +0100 [thread overview]
Message-ID: <X8tLoJ5Jl98EFLCo@kroah.com> (raw)
In-Reply-To: <20201205005716.307137-1-tstrudel@google.com>
On Fri, Dec 04, 2020 at 04:57:16PM -0800, Thierry Strudel wrote:
> debugfs nodes were created in genpd_debug_init alled in late_initcall
> preventing power domains registered though loadable modules to have
> a debugfs entry.
>
> Create/remove debugfs nodes when the power domain is added/removed
> to/from the internal gpd_list.
>
> Signed-off-by: Thierry Strudel <tstrudel@google.com>
> ---
> v2: fix forward declaration and genpd_debugfs_dir being NULL - Ulf
> v3: remove extra trailing char added by mistake in v2 - kernel test robot
> drivers/base/power/domain.c | 83 ++++++++++++++++++++++++-------------
> 1 file changed, 55 insertions(+), 28 deletions(-)
>
> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> index 743268996336..3e40ef5cd9ab 100644
> --- a/drivers/base/power/domain.c
> +++ b/drivers/base/power/domain.c
> @@ -24,6 +24,16 @@
>
> #include "power.h"
>
> +#ifdef CONFIG_DEBUG_FS
> +#include <linux/pm.h>
> +#include <linux/device.h>
> +#include <linux/debugfs.h>
> +#include <linux/seq_file.h>
> +#include <linux/init.h>
> +#include <linux/kobject.h>
Why do you need all of these files included for debugfs stuff?
And why put it in a #ifdef at all? Include files are not normally gated
that way.
> +static struct dentry *genpd_debugfs_dir;
That's the variable you want to only have declared or not, just #ifdef
for this :)
thanks,
greg k-h
prev parent reply other threads:[~2020-12-05 9:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-05 0:57 [PATCH v3] PM: domains: create debugfs nodes when adding power domains Thierry Strudel
2020-12-05 8:58 ` Greg Kroah-Hartman [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=X8tLoJ5Jl98EFLCo@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=khilman@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=tstrudel@google.com \
--cc=ulf.hansson@linaro.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