All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Tejun Heo <tj@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	"David S . Miller" <davem@davemloft.net>,
	David Airlie <airlied@linux.ie>,
	Andrew Morton <akpm@linux-foundation.org>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>
Subject: Re: [PATCH v3 0/9] lib/string: introduce match_string() helper
Date: Fri, 08 Jan 2016 16:13:18 +0200	[thread overview]
Message-ID: <1452262398.1342.4.camel@linux.intel.com> (raw)
In-Reply-To: <20160108131908.GB17997@ZenIV.linux.org.uk>

On Fri, 2016-01-08 at 13:19 +0000, Al Viro wrote:
> On Fri, Jan 08, 2016 at 03:09:09PM +0200, Andy Shevchenko wrote:
> > There are users of a simple string matching in the array. Let's do
> > a common
> > helper for that.
>  
> What's the reason for making it return -ENODATA when no match is
> found?

What else can be suitable?

> That one of the callers wants to return that as error in such case?
> At least one other is returning -EINVAL in the same situation...

Linus Acked this, maybe he missed that one.

Linus, do we still need to return -EINVAL in pinmux?

In general our error reporting sucks, you know. So, any return value
will be not ideal and self-explanatory (see json approach in perf). But
I prefer return some return code instead of opaque -1, for example.
This at least helps some users.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

      reply	other threads:[~2016-01-08 14:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-08 13:09 [PATCH v3 0/9] lib/string: introduce match_string() helper Andy Shevchenko
2016-01-08 13:09 ` [PATCH v3 1/9] " Andy Shevchenko
2016-01-08 13:09 ` [PATCH v3 2/9] device property: convert to use " Andy Shevchenko
2016-01-08 23:33   ` Rafael J. Wysocki
2016-01-28 12:40     ` Andy Shevchenko
2016-01-08 13:09 ` [PATCH v3 3/9] pinctrl: " Andy Shevchenko
2016-01-08 13:09 ` [PATCH v3 4/9] drm/edid: " Andy Shevchenko
2016-01-08 13:09 ` [PATCH v3 5/9] power: charger_manager: " Andy Shevchenko
2016-01-08 13:09 ` [PATCH v3 6/9] power: ab8500: " Andy Shevchenko
2016-01-08 13:09 ` [PATCH v3 7/9] ata: hpt366: " Andy Shevchenko
2016-01-08 13:09 ` [PATCH v3 8/9] ide: " Andy Shevchenko
2016-01-08 13:09 ` [PATCH v3 9/9] usb: common: " Andy Shevchenko
2016-01-08 13:19 ` [PATCH v3 0/9] lib/string: introduce " Al Viro
2016-01-08 14:13   ` Andy Shevchenko [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=1452262398.1342.4.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=airlied@linux.ie \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=dbaryshkov@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=tj@kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.