* [PATCH] drivers: base: power: remove wakeup_sources_stats_dentry variable
@ 2019-06-18 15:34 Greg Kroah-Hartman
2019-06-19 9:44 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Greg Kroah-Hartman @ 2019-06-18 15:34 UTC (permalink / raw)
To: rjw; +Cc: Greg Kroah-Hartman, Pavel Machek, Len Brown, linux-pm
wakeup_sources_stats_dentry is assigned when the debugfs file is
created, but then never used ever again. So no need for it at all, just
remove it and call debugfs_create_file() on its own.
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Len Brown <len.brown@intel.com>
Cc: linux-pm@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/base/power/wakeup.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
index 5b2b6a05a4f3..ee31d4f8d856 100644
--- a/drivers/base/power/wakeup.c
+++ b/drivers/base/power/wakeup.c
@@ -968,8 +968,6 @@ void pm_wakep_autosleep_enabled(bool set)
}
#endif /* CONFIG_PM_AUTOSLEEP */
-static struct dentry *wakeup_sources_stats_dentry;
-
/**
* print_wakeup_source_stats - Print wakeup source statistics information.
* @m: seq_file to print the statistics into.
@@ -1099,8 +1097,8 @@ static const struct file_operations wakeup_sources_stats_fops = {
static int __init wakeup_sources_debugfs_init(void)
{
- wakeup_sources_stats_dentry = debugfs_create_file("wakeup_sources",
- S_IRUGO, NULL, NULL, &wakeup_sources_stats_fops);
+ debugfs_create_file("wakeup_sources", S_IRUGO, NULL, NULL,
+ &wakeup_sources_stats_fops);
return 0;
}
--
2.22.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers: base: power: remove wakeup_sources_stats_dentry variable
2019-06-18 15:34 [PATCH] drivers: base: power: remove wakeup_sources_stats_dentry variable Greg Kroah-Hartman
@ 2019-06-19 9:44 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2019-06-19 9:44 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Pavel Machek, Len Brown, linux-pm
On Tuesday, June 18, 2019 5:34:16 PM CEST Greg Kroah-Hartman wrote:
> wakeup_sources_stats_dentry is assigned when the debugfs file is
> created, but then never used ever again. So no need for it at all, just
> remove it and call debugfs_create_file() on its own.
>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: Len Brown <len.brown@intel.com>
> Cc: linux-pm@vger.kernel.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> drivers/base/power/wakeup.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
> index 5b2b6a05a4f3..ee31d4f8d856 100644
> --- a/drivers/base/power/wakeup.c
> +++ b/drivers/base/power/wakeup.c
> @@ -968,8 +968,6 @@ void pm_wakep_autosleep_enabled(bool set)
> }
> #endif /* CONFIG_PM_AUTOSLEEP */
>
> -static struct dentry *wakeup_sources_stats_dentry;
> -
> /**
> * print_wakeup_source_stats - Print wakeup source statistics information.
> * @m: seq_file to print the statistics into.
> @@ -1099,8 +1097,8 @@ static const struct file_operations wakeup_sources_stats_fops = {
>
> static int __init wakeup_sources_debugfs_init(void)
> {
> - wakeup_sources_stats_dentry = debugfs_create_file("wakeup_sources",
> - S_IRUGO, NULL, NULL, &wakeup_sources_stats_fops);
> + debugfs_create_file("wakeup_sources", S_IRUGO, NULL, NULL,
> + &wakeup_sources_stats_fops);
> return 0;
> }
>
>
Queued for 5.3, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-19 9:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-18 15:34 [PATCH] drivers: base: power: remove wakeup_sources_stats_dentry variable Greg Kroah-Hartman
2019-06-19 9:44 ` Rafael J. Wysocki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.