From: Jonathan Corbet <corbet@lwn.net>
To: Mauro Codella <mauro.codella@pm.me>
Cc: Mauro Codella <mauro.codella@pm.me>,
skhan@linuxfoundation.org, rdunlap@infradead.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] docs: sysfs: Align example callback names with __ATTR_RW
Date: Wed, 25 Nov 2026 09:38:38 -0700 [thread overview]
Message-ID: <87ecc8x3w1.fsf@trenco.lwn.net> (raw)
In-Reply-To: <20261109204724.37838-1-mauro.codella@pm.me>
Mauro Codella <mauro.codella@pm.me> writes:
> The sysfs guide presents __ATTR_RW(foo) as a shorthand for the preceding
> DEVICE_ATTR declaration and explicit struct device_attribute initializer.
> Both preceding examples use show_foo and store_foo, but __ATTR_RW(_name)
> uses token pasting with _name##_show and _name##_store, so __ATTR_RW(foo)
> references foo_show and foo_store instead. Switching to the shorthand
> without renaming the callbacks would fail to compile.
>
> Rename the callbacks in both preceding examples to foo_show and foo_store
> so all three examples agree. No kernel behavior is changed.
>
> Codex identified the mismatch and assisted with the change and commit
> message after a request to find a small kernel contribution.
>
> Fixes: 44a47f0e3ec2 ("sysfs.txt: add note on available attribute macros")
> Signed-off-by: Mauro Codella <mauro.codella@pm.me>
> ---
> Documentation/filesystems/sysfs.rst | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Applied, thanks.
jon
prev parent reply other threads:[~2026-11-25 16:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 20:48 Mauro Codella
2026-11-25 16:38 ` Jonathan Corbet [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=87ecc8x3w1.fsf@trenco.lwn.net \
--to=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mauro.codella@pm.me \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.org \
/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
all inboxes | Powered by JetHome®