Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH] thermal: Replace pr_warn() with pr_warn_once() in user_space_bind()
@ 2021-11-05 16:31 Rafael J. Wysocki
  2021-11-05 16:37 ` Daniel Lezcano
  0 siblings, 1 reply; 2+ messages in thread
From: Rafael J. Wysocki @ 2021-11-05 16:31 UTC (permalink / raw)
  To: Linux PM; +Cc: LKML, Daniel Lezcano, Linus Torvalds

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Use pr_warn_once() instead of pr_warn() to print the user space
governor deprecation message in user_space_bind() to reduce the
kernel log noise.

Fixes: 0275c9fb0eff ("thermal/core: Make the userspace governor deprecated")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/thermal/gov_user_space.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-pm/drivers/thermal/gov_user_space.c
===================================================================
--- linux-pm.orig/drivers/thermal/gov_user_space.c
+++ linux-pm/drivers/thermal/gov_user_space.c
@@ -17,8 +17,8 @@
 
 static int user_space_bind(struct thermal_zone_device *tz)
 {
-	pr_warn("Userspace governor deprecated: use thermal netlink "	\
-		"notification instead\n");
+	pr_warn_once("Userspace governor deprecated: use thermal netlink " \
+		     "notification instead\n");
 
 	return 0;
 }




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] thermal: Replace pr_warn() with pr_warn_once() in user_space_bind()
  2021-11-05 16:31 [PATCH] thermal: Replace pr_warn() with pr_warn_once() in user_space_bind() Rafael J. Wysocki
@ 2021-11-05 16:37 ` Daniel Lezcano
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Lezcano @ 2021-11-05 16:37 UTC (permalink / raw)
  To: Rafael J. Wysocki, Linux PM; +Cc: LKML, Linus Torvalds

On 05/11/2021 17:31, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Use pr_warn_once() instead of pr_warn() to print the user space
> governor deprecation message in user_space_bind() to reduce the
> kernel log noise.
> 
> Fixes: 0275c9fb0eff ("thermal/core: Make the userspace governor deprecated")
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>

> ---
>  drivers/thermal/gov_user_space.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Index: linux-pm/drivers/thermal/gov_user_space.c
> ===================================================================
> --- linux-pm.orig/drivers/thermal/gov_user_space.c
> +++ linux-pm/drivers/thermal/gov_user_space.c
> @@ -17,8 +17,8 @@
>  
>  static int user_space_bind(struct thermal_zone_device *tz)
>  {
> -	pr_warn("Userspace governor deprecated: use thermal netlink "	\
> -		"notification instead\n");
> +	pr_warn_once("Userspace governor deprecated: use thermal netlink " \
> +		     "notification instead\n");
>  
>  	return 0;
>  }
> 
> 
> 


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-05 16:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-05 16:31 [PATCH] thermal: Replace pr_warn() with pr_warn_once() in user_space_bind() Rafael J. Wysocki
2021-11-05 16:37 ` Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox