Messages in this thread | | | From | Andy Shevchenko <> | Date | Mon, 3 Apr 2017 23:48:00 +0300 | 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@pengutronix.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
| |