From 9e28f7a74581204807f20ae46568939038e327aa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Adri=C3=A1n=20Larumbe?= Date: Sat, 20 May 2023 18:00:35 +0100 Subject: [PATCH] OPP: rate-limit debug messages when no change in OPP is required MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Otherwise, when enabling a debug build and dynamic debug in the kernel, it quickly floods the kernel ring buffer and makes debugging of other subsystems almost impossible, unless manually disabled. Signed-off-by: Adrián Larumbe Signed-off-by: Viresh Kumar --- drivers/opp/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/opp/core.c b/drivers/opp/core.c index 954c948..85cbc8d 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -1091,7 +1091,7 @@ static int _set_opp(struct device *dev, struct opp_table *opp_table, /* Return early if nothing to do */ if (!forced && old_opp == opp && opp_table->enabled) { - dev_dbg(dev, "%s: OPPs are same, nothing to do\n", __func__); + dev_dbg_ratelimited(dev, "%s: OPPs are same, nothing to do\n", __func__); return 0; } -- 2.7.4