lkml.org 
[lkml]   [2021]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4] lib/string: Introduce sysfs_streqcase
On Thu, Apr 8, 2021 at 3:14 PM Jinpu Wang <jinpu.wang@ionos.com> wrote:
>
> On Thu, Apr 8, 2021 at 3:06 PM Gioh Kim <gi-oh.kim@ionos.com> wrote:
> >
> > As the name shows, it checks if strings are equal in case insensitive
> > manner.
> >
> > For example, drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c uses
> > strncasecmp to check that the input via sysfs is "mi". But it would
> > work even-if the input is "min-wrongcommand".
> >
> > I found some more cases using strncasecmp to check the entire string
> > such as rtrs-clt-sysfs.c does. drivers/pnp/interface.c checks
> > "disable" command with strncasecmp but it would also work if the
> > command is "disable-wrong".
> >
> > Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com>
> you should add the
> Reported-by: kernel test robot <lkp@intel.com>
> > ---
> you can add the changelog here after the ---
> v4->v3: removed #ifdef CONFIG_SYSFS ~ #endif.
>
> The string comparison doesn't depends on CONFIG_SYSFS at all.
>
> It looks good to me.
> Reviewed-by: Jack Wang <jinpu.wang@ionos.com>
>
>

Yes, I got two build error reports for v3.
Should I send v5 including "Reported-by: kernel test robot <lkp@intel.com>" tag?

\
 
 \ /
  Last update: 2021-04-08 16:53    [W:0.106 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site