From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Rafael Wysocki <rjw@rjwysocki.net>,
acourbot@nvidia.com, Viresh Kumar <vireshk@kernel.org>,
Nishanth Menon <nm@ti.com>, Stephen Boyd <sboyd@codeaurora.org>,
Lists linaro-kernel <linaro-kernel@lists.linaro.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Alexandre Courbot <gnurou@gmail.com>,
linux-tegra@vger.kernel.org
Subject: Re: [PATCH] PM / OPP: 'UNKNOWN' status of opp-table->shared
Date: Thu, 16 Jun 2016 15:26:33 +0200 [thread overview]
Message-ID: <CAJZ5v0h3iO3UhzOiUb41TnDaSOLvBxkCCNp-9D0ndtbBnh31-Q@mail.gmail.com> (raw)
In-Reply-To: <20160616124818.GN5726@vireshk-i7>
On Thu, Jun 16, 2016 at 2:48 PM, Viresh Kumar <viresh.kumar@linaro.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@linaro.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.
prev parent reply other threads:[~2016-06-16 13:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-16 6:33 [PATCH] PM / OPP: 'UNKNOWN' status of opp-table->shared Viresh Kumar
2016-06-16 6:55 ` Alexandre Courbot
2016-06-16 6:57 ` Viresh Kumar
2016-06-16 12:25 ` Rafael J. Wysocki
2016-06-16 12:48 ` Viresh Kumar
2016-06-16 13:26 ` Rafael J. Wysocki [this message]
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=CAJZ5v0h3iO3UhzOiUb41TnDaSOLvBxkCCNp-9D0ndtbBnh31-Q@mail.gmail.com \
--to=rafael@kernel.org \
--cc=acourbot@nvidia.com \
--cc=gnurou@gmail.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=nm@ti.com \
--cc=rjw@rjwysocki.net \
--cc=sboyd@codeaurora.org \
--cc=viresh.kumar@linaro.org \
--cc=vireshk@kernel.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).