From: p.zabel@pengutronix.de (Philipp Zabel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] reset: Put back *_optional variants
Date: Mon, 30 May 2016 14:11:15 +0200 [thread overview]
Message-ID: <1464610275.3808.36.camel@pengutronix.de> (raw)
In-Reply-To: <5cf9f346-9b6e-d521-612c-9edd167aa759@redhat.com>
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
next prev parent reply other threads:[~2016-05-30 12:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-26 1:15 [PATCH] reset: Put back *_optional variants John Youn
2016-05-26 20:25 ` Hans de Goede
2016-05-26 21:44 ` John Youn
2016-05-27 7:06 ` Hans de Goede
2016-05-30 10:18 ` Philipp Zabel
2016-05-30 11:32 ` Hans de Goede
2016-05-30 12:11 ` Philipp Zabel [this message]
2016-05-31 5:53 ` John Youn
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=1464610275.3808.36.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.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).