linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Huichun Feng <foxhoundsk.tw@gmail.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Jonathan Corbet <corbet@lwn.net>,
	Kent Gibson <warthog618@gmail.com>,
	linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Mao Zhu <zhumao001@208suo.com>, Ran Sun <sunran001@208suo.com>,
	Xiang wangx <wangxiang@cdjrlc.com>,
	Shaomin Deng <dengshaomin@cdjrlc.com>,
	Charles Han <hanchunchao@inspur.com>,
	Attreyee M <tintinm2017@gmail.com>, LihaSika <lihasika@gmail.com>
Subject: Re: [PATCH] docs: gpio: prefer pread(2) for interrupt reading
Date: Tue, 14 May 2024 12:26:50 +0700	[thread overview]
Message-ID: <ZkL2GkCsyKYRckj7@archie.me> (raw)
In-Reply-To: <20240514041223.800811-1-foxhoundsk.tw@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 738 bytes --]

On Tue, May 14, 2024 at 12:12:23PM +0800, Huichun Feng wrote:
> In legacy sysfs GPIO, when using poll(2) on the sysfs GPIO value for
> state change awaiting, a subsequent read(2) is required for consuming
> the event, which the doc recommends the use of lseek(2) or
> close-and-reopen to reset the file offset afterwards.
> 
> The recommendations however, require at least 2 syscalls to consume
> the event. Gladly, use of pread(2) require only 1 syscall for the
> consumption. Let's advertise this usage by prioritizing its placement.
> 
> Signed-off-by: Huichun Feng <foxhoundsk.tw@gmail.com>

LGTM, thanks!

Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2024-05-14  5:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-14  4:12 [PATCH] docs: gpio: prefer pread(2) for interrupt reading Huichun Feng
2024-05-14  5:26 ` Bagas Sanjaya [this message]
2024-05-27  7:05 ` Huichun Feng
2024-05-27  7:34   ` Bartosz Golaszewski
2024-05-27 14:54 ` Bartosz Golaszewski
2024-06-02  7:49   ` Huichun Feng
2024-06-03  8:31     ` Bartosz Golaszewski

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=ZkL2GkCsyKYRckj7@archie.me \
    --to=bagasdotme@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=corbet@lwn.net \
    --cc=dengshaomin@cdjrlc.com \
    --cc=foxhoundsk.tw@gmail.com \
    --cc=hanchunchao@inspur.com \
    --cc=lihasika@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sunran001@208suo.com \
    --cc=tintinm2017@gmail.com \
    --cc=wangxiang@cdjrlc.com \
    --cc=warthog618@gmail.com \
    --cc=zhumao001@208suo.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;
as well as URLs for NNTP newsgroup(s).