[PATCH] reset: Put back *_optional variants

Philipp Zabel p.zabel at pengutronix.de
Mon May 30 05:11:15 PDT 2016


Am Montag, den 30.05.2016, 13:32 +0200 schrieb Hans de Goede:
> Hi,
> 
> On 30-05-16 12:18, Philipp Zabel wrote:
> > Hi,
> >
> > Am Freitag, den 27.05.2016, 09:06 +0200 schrieb Hans de Goede:
> > [...]
> >>>> So IMHO the following change would be a better way to fix this:
> >>>>
> >>>> --- a/include/linux/reset.h
> >>>> +++ b/include/linux/reset.h
> >>>> @@ -65,14 +65,14 @@ static inline struct reset_control *__of_reset_control_get(
> >>>>                                          struct device_node *node,
> >>>>                                          const char *id, int index, int shared)
> >>>>   {
> >>>> -   return ERR_PTR(-EINVAL);
> >>>> + return ERR_PTR(-ENOTSUPP);
> >>>>   }
> >>>>
> >>>>   static inline struct reset_control *__devm_reset_control_get(
> >>>>                                          struct device *dev,
> >>>>                                          const char *id, int index, int shared)
> >>>>   {
> >>>> -   return ERR_PTR(-EINVAL);
> >>>> + return ERR_PTR(-ENOTSUPP);
> >>>>   }
> >>>>
> >>>>   #endif /* CONFIG_RESET_CONTROLLER */
> >>>
> >>>
> >>> I'm good with this. However, per Philipp on a previous thread, the
> >>> intended behavior is to return -EINVAL for the non-optional functions.
> >>>
> >>> http://marc.info/?l=linux-usb&m=146156945528848&w=2
> >
> > Adding Dinh to Cc: because he wanted this changed from -EINVAL.
> > My point then was that WARN_ON + -EINVAL is indented in this case.

No idea how this happened, but I meant "intended", obviously :)

regards
Philipp




More information about the linux-arm-kernel mailing list