linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Ian Pilcher <arequipeno@gmail.com>,
	hch@infradead.org, pavel@ucw.cz, linux-leds@vger.kernel.org,
	linux-kernel@vger.kernel.org, kabel@kernel.org
Subject: Re: [PATCH v4 1/2] docs: Add block device (blkdev) LED trigger documentation
Date: Mon, 20 Sep 2021 07:43:52 +0100	[thread overview]
Message-ID: <YUgtqL4zUEV2YPnQ@infradead.org> (raw)
In-Reply-To: <YUWQSlXjIb58eCJZ@kroah.com>

On Sat, Sep 18, 2021 at 09:07:54AM +0200, Greg KH wrote:
> > Honestly, I wasn't particularly enthusiastic about it in the first
> > place; it feels like something that should be done in user space.  I
> > wouldn't have included it if I didn't have to make a writable copy of
> > the buffer anyway, in order to trim a trailing newline.
> > 
> > I can certainly remove the re-check logic.  The end result will be an
> > API that is slightly less "user friendly" in return for saving a bit of
> > pointer arithmetic and a 5-byte memcpy().
> 
> Just use the kernel block device name and that way you do not have to
> parse anything as it is unique and no paths are having to be followed.
> 
> That's the way that other LED apis are working, right?

The "kernel block device name" is the a block device special path
that a normal VFS path lookup is done on.  This is the preferred block
device API used by everyone.  And yes, this includes resolving symlinks.
The only other API is by dev_t, but it is highly discouraged and should
really not grow any new users.

  parent reply	other threads:[~2021-09-20  6:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16 20:21 [PATCH v4 0/2] Introduce block device LED trigger Ian Pilcher
2021-09-16 20:21 ` [PATCH v4 1/2] docs: Add block device (blkdev) LED trigger documentation Ian Pilcher
2021-09-17  6:19   ` Greg KH
2021-09-17 20:46     ` Ian Pilcher
2021-09-18  7:07       ` Greg KH
2021-09-18 14:43         ` Ian Pilcher
2021-09-20  6:43         ` Christoph Hellwig [this message]
2021-10-05 12:24           ` Marek Behún
2021-09-16 20:21 ` [PATCH v4 2/2] leds: trigger: Add block device LED trigger Ian Pilcher
2021-09-17  5:53   ` Christoph Hellwig

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=YUgtqL4zUEV2YPnQ@infradead.org \
    --to=hch@infradead.org \
    --cc=arequipeno@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kabel@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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;
as well as URLs for NNTP newsgroup(s).