From ab2624d5dc5b7f35b554be22aead0a9a7130df17 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Fri, 5 Nov 2021 17:31:54 +0100 Subject: [PATCH] thermal: Replace pr_warn() with pr_warn_once() in user_space_bind() 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: af6490bccab1 ("thermal/core: Make the userspace governor deprecated") Reported-by: Linus Torvalds Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano --- drivers/thermal/gov_user_space.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/gov_user_space.c b/drivers/thermal/gov_user_space.c index f4fe050e1cbce..64a18e354a204 100644 --- a/drivers/thermal/gov_user_space.c +++ b/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; } -- 2.39.5