lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 11 Nov 2020 13:24:02 +0530
From:   Viresh Kumar <viresh.kumar@...aro.org>
To:     Dmitry Osipenko <digetx@...il.com>
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

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.

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ