[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150919222219.GE23081@codeaurora.org>
Date: Sat, 19 Sep 2015 15:22:19 -0700
From: Stephen Boyd <sboyd@...eaurora.org>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Rafael Wysocki <rjw@...ysocki.net>, linaro-kernel@...ts.linaro.org,
linux-pm@...r.kernel.org, nm@...com,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Len Brown <len.brown@...el.com>,
open list <linux-kernel@...r.kernel.org>,
Pavel Machek <pavel@....cz>
Subject: Re: [PATCH] PM / OPP: of_property_count_u32_elems() can return errors
On 09/18, Viresh Kumar wrote:
> On 17-09-15, 11:13, Stephen Boyd wrote:
> > > + count = of_property_count_u32_elems(opp->np, "opp-microvolt");
> > > + if (count < 0) {
> >
> > We can't test count for -EINVAL to detect the missing property
> > because -EINVAL is also returned on a non-multiple of u32 length
> > property? Maybe we shouldn't worry about that case and turn
> > -EINVAL into 0.
>
> So you are saying that we go ahead without regulators if a incorrect
> values are present in opp-microvolt? i.e. even if the length property
> was invalid, we return 0 from this function.
>
> The problem here is that we will try changing the frequency without
> changing the regulator in that case, and it might not be safe for the
> platform, isn't it?
>
Do we care if a platform has changed the length of the property
to something that isn't a multiple of u32? That sounds very rare,
that's all. I agree it's a bug.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists