lkml.org 
[lkml]   [2019]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/2] lib: add __sysfs_match_string_with_gaps() helper
On Fri, Apr 26, 2019 at 5:27 PM andriy.shevchenko@linux.intel.com
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Fri, Apr 26, 2019 at 12:29:11PM +0300, Alexandru Ardelean wrote:
>
> > Hmm, I actually did not give much thought to that -1.
> > I'll check into this and see about a V3.
> > It may make more sense to just fix the original
> > `__sysfs_match_string()`, but I'll need to go through the users of
> > this function and see.
>
> I was thinking about existing users of such (with "gaps") cases.
> Not all of them have NULL there and would like to avoid some members.
> Though, I think that we may ignore NULL items if -1 is supplied.
>
> Think as well about ARRAY_SIZE() as given to that.
>

I am a bit vague on what you are proposing.
Is it:

a) Leave __sysfs_match_string() as-is and introduce a new
`__sysfs_match_string_with_gaps()` helper/variant ?
b) Fix __sysfs_match_string() to break/exit on the first NULL, only if
-1 is provided ?

Either is fine, but I wanted to clarify.

Thanks
Alex

> And consider to fix match_string() accordingly.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>

\
 
 \ /
  Last update: 2019-05-06 15:46    [W:0.140 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site