diff mbox series

OPP: rate-limit debug messages when no change in OPP is required

Message ID 20230520170035.2540438-1-adrian.larumbe@collabora.com (mailing list archive)
State New, archived
Delegated to: viresh kumar
Headers show
Series OPP: rate-limit debug messages when no change in OPP is required | expand

Commit Message

Adrián Larumbe May 20, 2023, 5 p.m. UTC
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 <adrian.larumbe@collabora.com>
---
 drivers/opp/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Viresh Kumar May 22, 2023, 3:42 a.m. UTC | #1
On 20-05-23, 18:00, Adrián Larumbe wrote:
> 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 <adrian.larumbe@collabora.com>
> ---
>  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 954c94865cf5..85cbc8de407c 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;
>  	}

Applied. Thanks.
diff mbox series

Patch

diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index 954c94865cf5..85cbc8de407c 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;
 	}