OPP: rate-limit debug messages when no change in OPP is required
PATCH 1/1 OPP: rate-limit debug messages when no change in OPP is required
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 <[email protected]>
--- drivers/opp/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/opp/core.c +1 -1
@@ -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 ; }
Signature · 1 line
2.40.0
Viresh Kumar
AppliedQuoted 14 lines · Adrián Larumbe
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 <[email protected]>--- drivers/opp/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/opp/core.c +0
-0
drivers/opp/core.c static int _set_opp(struct device *dev, struct opp_table *opp_table, · line 1096
Quoted 7 lines
drivers/opp/core.c +1
-1@@ -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 ; }
Applied. Thanks.
Signature · 1 line
viresh