[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-stable-commits
Subject:    Patch "opp: remove WARN when no valid OPPs remain" has been added to the 4.14-stable tree
From:       Sasha Levin <sashal () kernel ! org>
Date:       2021-08-30 19:23:05
Message-ID: 20210830192306.077D260ED6 () mail ! kernel ! org
[Download RAW message or body]

This is a note to let you know that I've just added the patch titled

    opp: remove WARN when no valid OPPs remain

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     opp-remove-warn-when-no-valid-opps-remain.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.



commit bbabb569efd92caac5b717471db6764ccece0e67
Author: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Date:   Mon Jul 26 10:30:56 2021 +0200

    opp: remove WARN when no valid OPPs remain
    
    [ Upstream commit 335ffab3ef864539e814b9a2903b0ae420c1c067 ]
    
    This WARN can be triggered per-core and the stack trace is not useful.
    Replace it with plain dev_err(). Fix a comment while at it.
    
    Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
    Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

diff --git a/drivers/base/power/opp/of.c b/drivers/base/power/opp/of.c
index 87509cb69f79..68ae8e9c1edc 100644
--- a/drivers/base/power/opp/of.c
+++ b/drivers/base/power/opp/of.c
@@ -402,8 +402,9 @@ static int _of_add_opp_table_v2(struct device *dev, struct device_node *opp_np)
 		}
 	}
 
-	/* There should be one of more OPP defined */
-	if (WARN_ON(!count)) {
+	/* There should be one or more OPPs defined */
+	if (!count) {
+		dev_err(dev, "%s: no supported OPPs", __func__);
 		ret = -ENOENT;
 		goto put_opp_table;
 	}
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic