public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Kent Gibson <warthog618@gmail.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH v2] gpio: consumer: new virtual driver
Date: Fri, 11 Aug 2023 17:32:23 +0300	[thread overview]
Message-ID: <ZNZGdyQ6FuBtDT47@smile.fi.intel.com> (raw)
In-Reply-To: <CAMRc=MfzXbuJb1hYe57MeMXkNaXPg8_Ei0Y=JURyCCoXBffhtg@mail.gmail.com>

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@linux.intel.com> 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



      reply	other threads:[~2023-08-11 14:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-08 14:56 [PATCH v2] gpio: consumer: new virtual driver Bartosz Golaszewski
2023-08-08 17:23 ` Andy Shevchenko
2023-08-09  7:29   ` Bartosz Golaszewski
2023-08-10 14:53     ` Andy Shevchenko
2023-08-11 13:39       ` Bartosz Golaszewski
2023-08-11 14:32         ` Andy Shevchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZNZGdyQ6FuBtDT47@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=brgl@bgdev.pl \
    --cc=geert@linux-m68k.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viresh.kumar@linaro.org \
    --cc=warthog618@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox