From: Sibi Sankar <sibis@codeaurora.org>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: sboyd@kernel.org, georgi.djakov@linaro.org, nm@ti.com,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org, saravanak@google.com, mka@chromium.org,
smasetty@codeaurora.org, linux-arm-msm-owner@vger.kernel.org,
linux-kernel-owner@vger.kernel.org
Subject: Re: [PATCH] OPP: Check for bandwidth values before creating icc paths
Date: Mon, 01 Jun 2020 12:09:40 +0530 [thread overview]
Message-ID: <ee51e55bdf518832e4ecb2faf98c6b58@codeaurora.org> (raw)
In-Reply-To: <20200601040742.3a4cmhrwgh2ueksy@vireshk-i7>
On 2020-06-01 09:37, Viresh Kumar wrote:
> On 29-05-20, 19:47, Sibi Sankar wrote:
>> opp_np needs to be subjected
>> to NULL check as well.
>
> No, it isn't. It should already be valid and is set by the OPP core.
> Actually we don't need to do of_node_get(opp_table->np) and just use
> np, I did that to not have a special case while putting the resource.
>
I should have phrased it differently.
opp_np needs to be checked to deal
with cases where devices don't have
"operating-points-v2" associated with
it.
diff --git a/drivers/opp/of.c b/drivers/opp/of.c
index a5d87ca0ab571..06976d14e6ccb 100644
--- a/drivers/opp/of.c
+++ b/drivers/opp/of.c
@@ -344,14 +344,14 @@ static int _bandwidth_supported(struct device
*dev, struct opp_table *opp_table)
opp_np = _opp_of_get_opp_desc_node(np, 0);
of_node_put(np);
-
- /* Lets not fail in case we are parsing opp-v1 bindings
*/
- if (!opp_np)
- return 0;
} else {
opp_np = of_node_get(opp_table->np);
}
+ /* Lets not fail in case we are parsing opp-v1 bindings */
+ if (!opp_np)
+ return 0;
+
sdhci_msm 7c4000.sdhci: OPP table empty
sdhci_msm 7c4000.sdhci: _allocate_opp_table: Error finding interconnect
paths: -22
I see the following errors without
the check.
>> Tested-by: Sibi Sankar <sibis@codeaurora.org>
>> Reviewed-by: Sibi Sankar <sibis@codeaurora.org>
>
> Thanks.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project.
next prev parent reply other threads:[~2020-06-01 6:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-27 19:24 [PATCH] OPP: Check for bandwidth values before creating icc paths Sibi Sankar
2020-05-29 5:20 ` Viresh Kumar
2020-05-29 14:17 ` Sibi Sankar
2020-06-01 4:07 ` Viresh Kumar
2020-06-01 6:39 ` Sibi Sankar [this message]
2020-06-01 7:13 ` Viresh Kumar
2020-06-01 10:00 ` Sibi Sankar
2020-06-01 10:15 ` Viresh Kumar
2020-06-01 10:24 ` Sibi Sankar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ee51e55bdf518832e4ecb2faf98c6b58@codeaurora.org \
--to=sibis@codeaurora.org \
--cc=georgi.djakov@linaro.org \
--cc=linux-arm-msm-owner@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel-owner@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mka@chromium.org \
--cc=nm@ti.com \
--cc=saravanak@google.com \
--cc=sboyd@kernel.org \
--cc=smasetty@codeaurora.org \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).