Re: [PATCH] lib/string: sysfs_streq works case insensitively

From: Andy Shevchenko
Date: Wed Apr 28 2021 - 03:47:05 EST


On Wed, Apr 28, 2021 at 10:32 AM Gioh Kim <gi-oh.kim@xxxxxxxxx> wrote:
> On Wed, Apr 28, 2021 at 8:42 AM Andy Shevchenko
> <andy.shevchenko@xxxxxxxxx> wrote:
> > On Wednesday, April 28, 2021, Gioh Kim <gi-oh.kim@xxxxxxxxx> wrote:
> >> On Mon, Apr 12, 2021 at 1:33 PM Gioh Kim <gi-oh.kim@xxxxxxxxx> wrote:
> >> >
> >> > As the name shows, it checks the strings inputed from sysfs.
> >> > It should work for both case-sensitive filesystem and
> >> > case-insensitive filesystem. Therefore sysfs_streq should work
> >> > case-insensitively.

...

> > Are you sure it’s good change? Sysfs is used for an ABI and you are opening a can of worms. From me NAK to this change without a very good background description that tells why it is safe to do.
>
> https://www.spinics.net/lists/kernel/msg3898123.html
> My initial idea was making a new function: sysfs_streqcase.
> Andrew and Greg suggested making sysfs_streq to be case-insensitive.
> I would like to have a discussion about it.

This patch even doesn't have users, but suddenly changes behaviour of
hundreds of existing users without any good justification. What
discussion here is needed? No way this goes to the kernel.

> >> I changed sysfs_streq to be case-insensitive as you requested.
> >> Is there any progress?


--
With Best Regards,
Andy Shevchenko