lkml.org 
[lkml]   [2016]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 0/9] lib/string: introduce match_string() helper
From
Date
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

\
 
 \ /
  Last update: 2016-01-08 16:01    [W:1.924 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site