Re: [PATCH v2] gpio: consumer: new virtual driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 11, 2023 at 03:39:08PM +0200, Bartosz Golaszewski wrote:
> On Thu, Aug 10, 2023 at 4:53 PM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

...

> > > > This can be avoided by
> > > >
> > > >         key = kstrndup(skip_spaces(page), count, GFP_KERNEL);
> > > >
> > > > no?
> > > >
> > >
> > > No, because we also want to remove the trailing spaces and newlines.
> > > But if you have a different suggestion with existing helpers, let me
> > > know. I didn't find any.
> >
> > kstrto*() are newline friendly. The rest as you noted can be covered with
> > sysfs_streq() / sysfs_match_string().
> 
> It's a kstrndup() not a kstrtosomething(). It's not newline friendly.

Right, I messed that up when replying.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux