From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: linux-kernel@vger.kernel.org,
"Rafael J. Wysocki" <rafael@kernel.org>,
Danilo Krummrich <dakr@kernel.org>,
driver-core@lists.linux.dev,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org
Subject: Re: [PATCH] driver core: add missing kernel-doc for union members
Date: Tue, 23 Jun 2026 22:12:06 +0200 [thread overview]
Message-ID: <f37b38b3-8c50-4fdb-b99d-ccd7d518857f@t-8ch.de> (raw)
In-Reply-To: <20260623190023.407781-1-rdunlap@infradead.org>
On 2026-06-23 12:00:22-0700, Randy Dunlap wrote:
> The use of __SYSFS_FUNCTION_ALTERNATIVE() adds an anonymous union (or
> struct if CONFIG_CFI=y).*
>
> Describe the additional struct/union members to avoid docs build
> warnings.
>
> Warning: include/linux/device.h:117 struct member 'show_const' not described in 'device_attribute'
> Warning: include/linux/device.h:117 struct member 'store_const' not described in 'device_attribute'
>
> *: kernel-doc ignores CONFIG_ symbols in source files; it is using the
> first definition of __SYSFS_FUNCTION_ALTERNATIVE(), which is struct
> instead of union.
>
> Fixes: 434506b86a6c ("driver core: Allow the constification of device attributes")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Thanks!
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
> Cc: Thomas Weißschuh <linux@weissschuh.net>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Cc: Danilo Krummrich <dakr@kernel.org>
> Cc: driver-core@lists.linux.dev
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: stable@vger.kernel.org
>
> include/linux/device.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- linux-next-20260619.orig/include/linux/device.h
> +++ linux-next-20260619/include/linux/device.h
> @@ -99,7 +99,9 @@ struct device_type {
> * struct device_attribute - Interface for exporting device attributes.
> * @attr: sysfs attribute definition.
> * @show: Show handler.
> + * @show_const: Show handler (read-only).
Not a big fan of the wording, but I won't bikeshed.
The subject could also be a bit more specific.
> * @store: Store handler.
> + * @store_const: Store handler (read-only).
> */
> struct device_attribute {
> struct attribute attr;
next prev parent reply other threads:[~2026-06-23 20:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 19:00 Randy Dunlap
2026-06-23 20:12 ` Thomas Weißschuh [this message]
2026-06-28 23:18 ` Danilo Krummrich
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=f37b38b3-8c50-4fdb-b99d-ccd7d518857f@t-8ch.de \
--to=linux@weissschuh.net \
--cc=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rdunlap@infradead.org \
--cc=stable@vger.kernel.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®