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] [day] [month] [year] [list]
Message-ID: <CAJZ5v0h3iO3UhzOiUb41TnDaSOLvBxkCCNp-9D0ndtbBnh31-Q@mail.gmail.com>
Date:	Thu, 16 Jun 2016 15:26:33 +0200
From:	"Rafael J. Wysocki" <rafael@...nel.org>
To:	Viresh Kumar <viresh.kumar@...aro.org>
Cc:	"Rafael J. Wysocki" <rafael@...nel.org>,
	Rafael Wysocki <rjw@...ysocki.net>, acourbot@...dia.com,
	Viresh Kumar <vireshk@...nel.org>, Nishanth Menon <nm@...com>,
	Stephen Boyd <sboyd@...eaurora.org>,
	Lists linaro-kernel <linaro-kernel@...ts.linaro.org>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Alexandre Courbot <gnurou@...il.com>,
	linux-tegra@...r.kernel.org
Subject: Re: [PATCH] PM / OPP: 'UNKNOWN' status of opp-table->shared

On Thu, Jun 16, 2016 at 2:48 PM, Viresh Kumar <viresh.kumar@...aro.org> wrote:
> On 16-06-16, 14:25, Rafael J. Wysocki wrote:
>> On Thu, Jun 16, 2016 at 8:33 AM, Viresh Kumar <viresh.kumar@...aro.org> wrote:
>> > +                       if (opp_table->shared_opp == OPP_TABLE_IS_SHARED)
>> > +                               return opp_table;
>> > +
>> > +                       return NULL;
>>
>> That still can be
>>
>> return opp_table->shared_opp == OPP_TABLE_IS_SHARED ? opp_table : NULL;
>>
>> >                 }
>> >         }
>> >
>
>> > +       if (of_property_read_bool(opp_np, "opp-shared"))
>> > +               opp_table->shared_opp = OPP_TABLE_IS_SHARED;
>> > +       else
>> > +               opp_table->shared_opp = OPP_TABLE_IS_NOT_SHARED;
>>
>> And here
>>
>> opp_table->shared_opp = of_property_read_bool(opp_np, "opp-shared") ?
>>                                             OPP_TABLE_IS_SHARED :
>> OPP_TABLE_IS_NOT_SHARED;
>
> Conditional statement for both these cases is getting very long and
> if/else looks much more readable. And so I would like to stick with
> that, if you allow.

Fair enough.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ