[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 11 Nov 2020 17:08:07 +0300
From: Dmitry Osipenko <digetx@...il.com>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Georgi Djakov <georgi.djakov@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Peter De Schrijver <pdeschrijver@...dia.com>,
MyungJoo Ham <myungjoo.ham@...sung.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>,
Mikko Perttunen <cyndis@...si.fi>,
Viresh Kumar <vireshk@...nel.org>,
Peter Geis <pgwipeout@...il.com>,
Nicolas Chauvet <kwizart@...il.com>,
Krzysztof Kozlowski <krzk@...nel.org>,
linux-tegra@...r.kernel.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH v8 09/26] memory: tegra30: Support interconnect framework
11.11.2020 10:54, Viresh Kumar пишет:
> On 11-11-20, 10:32, Dmitry Osipenko wrote:
>> 11.11.2020 09:18, Viresh Kumar пишет:
>>> On 11-11-20, 09:14, Dmitry Osipenko wrote:
>>>> The dev_pm_opp_of_add_table() will produce a error message which doesn't
>>>> give a clue about what's wrong, i.e. that device-tree needs to be updated.
>>>
>>> If you think that you need to print something more, then you can do
>>> that in the error message you print when dev_pm_opp_of_add_table()
>>> fails. I would suggest to drop this redundant check here.
>>>
>>
>> Please give the rationale.
>
> The rationale is that the check is already performed by
> dev_pm_opp_of_add_table() and it isn't going to add *any* benefit to
> check it again here. Such a check for matching compatible platforms is
> normally fine, but not for this. This is like open coding part of
> dev_pm_opp_of_add_table(), and so is redundant. The
> dev_pm_opp_of_add_table() helper also checks for OPPv1 bindings in the
> DT (yes you won't be using them on your platform) and so relying on
> that API is a better thing to do.
>
> As you already said, you just wanted a better print message and so you
> have added this check. If you really care only about the print
> message, then you can add a print of your choice in the driver but
> otherwise this check is not going to benefit you much I am afraid.
>
> Having said that, this isn't the code I maintain. I need to guarantee
> that the OPP core APIs are used properly and are not misused and so I
> have a higher say there. But in this case all I can do is _suggest_
> and not enforce. And as I said earlier, I suggest to drop this
> redundant check in order to make your code better and faster.
>
> Thanks.
>
I took a closer look and turned out that devm_pm_opp_of_add_table()
silently returns -ENODEV if OPP is missing in a DT. Hence indeed it
should be good to drop the property-check. I'll improve it in the next
revision, thank you.
Powered by blists - more mailing lists