Skip to contentSkip to conversation

thermal: Replace pr_warn() with pr_warn_once() in user_space_bind()

PATCH In review Rafael J. Wysocki 2 participants 2 messages Nov 5, 2021 Thermal

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thermal: Replace pr_warn() with pr_warn_once() in user_space_bind()

From: Rafael J. Wysocki <[email protected]>

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")
---
 drivers/thermal/gov_user_space.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/thermal/gov_user_space.c +2 -2
Index: 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;
 }
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

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")
Quoted 22 lines
---
 drivers/thermal/gov_user_space.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-pm/drivers/thermal/gov_user_space.c
===================================================================

drivers/thermal/gov_user_space.c +2 -2
@@ -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;
 }
Signature · 5 lines
<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