[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <X8tLoJ5Jl98EFLCo@kroah.com>
Date: Sat, 5 Dec 2020 09:58:08 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Thierry Strudel <tstrudel@...gle.com>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>,
Kevin Hilman <khilman@...nel.org>,
Ulf Hansson <ulf.hansson@...aro.org>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] PM: domains: create debugfs nodes when adding power
domains
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@...gle.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
Powered by blists - more mailing lists