[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75VeXoqO-Tfasv9mV1WaVB5eBA51F0AQouKpE435FA+3-PQ@mail.gmail.com>
Date: Mon, 3 Apr 2017 23:48:00 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Philipp Zabel <p.zabel@...gutronix.de>
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
"mika.westerberg@...ux.intel.com" <mika.westerberg@...ux.intel.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Ramiro.Oliveira@...opsys.com" <Ramiro.Oliveira@...opsys.com>
Subject: Re: [PATCH v1] reset: Make optional stuff optional for all users
On Mon, Apr 3, 2017 at 7:04 PM, Philipp Zabel <p.zabel@...gutronix.de> wrote:
> On Mon, 2017-04-03 at 18:23 +0300, Andy Shevchenko wrote:
>> On Mon, 2017-04-03 at 17:09 +0200, Philipp Zabel wrote:
>> > On Mon, 2017-04-03 at 14:33 +0000, Shevchenko, Andriy wrote:
>> > > On Mon, 2017-04-03 at 17:31 +0300, Andy Shevchenko wrote:
>> I really don't like ping-ponging of the code. Perhaps you would fix it
>> once for the best now?
>
> How about:
Below looks fine to me, one nit still and I would like to test it tomorrow.
Thanks for taking care.
> +struct reset_control *__reset_control_get(struct device *dev, const char *id,
> + int index, bool shared, bool optional)
> +{
> + if (dev->of_node)
> + return __of_reset_control_get(dev->of_node, id, index, shared,
> +
optional);
> + else
Redundant.
> + return optional ? NULL : ERR_PTR(-EINVAL);
> +}
> +EXPORT_SYMBOL_GPL(__reset_control_get);
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists