* [PATCH] driver core: add missing kernel-doc for union members
@ 2026-06-23 19:00 Randy Dunlap
2026-06-23 20:12 ` Thomas Weißschuh
2026-06-28 23:18 ` Danilo Krummrich
0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2026-06-23 19:00 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Thomas Weißschuh, Rafael J. Wysocki,
Danilo Krummrich, driver-core, Greg Kroah-Hartman, stable
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>
---
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).
* @store: Store handler.
+ * @store_const: Store handler (read-only).
*/
struct device_attribute {
struct attribute attr;
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] driver core: add missing kernel-doc for union members
2026-06-23 19:00 [PATCH] driver core: add missing kernel-doc for union members Randy Dunlap
@ 2026-06-23 20:12 ` Thomas Weißschuh
2026-06-28 23:18 ` Danilo Krummrich
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Weißschuh @ 2026-06-23 20:12 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, Rafael J. Wysocki, Danilo Krummrich, driver-core,
Greg Kroah-Hartman, stable
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;
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] driver core: add missing kernel-doc for union members
2026-06-23 19:00 [PATCH] driver core: add missing kernel-doc for union members Randy Dunlap
2026-06-23 20:12 ` Thomas Weißschuh
@ 2026-06-28 23:18 ` Danilo Krummrich
1 sibling, 0 replies; 3+ messages in thread
From: Danilo Krummrich @ 2026-06-28 23:18 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, Thomas Weißschuh, Rafael J . Wysocki,
Danilo Krummrich, driver-core, Greg Kroah-Hartman, stable
On Tue, 23 Jun 2026 12:00:22 -0700, Randy Dunlap wrote:
> [PATCH] driver core: add missing kernel-doc for union members
Applied, thanks!
Branch: driver-core-linus
Tree: git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git
[1/1] driver core: add missing kernel-doc for union members
commit: 667d0fb32149
The patch will appear in the next linux-next integration (typically within 24
hours on weekdays).
The patch is queued up for Linus's tree and should land in the next -rc release.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-28 23:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-23 19:00 [PATCH] driver core: add missing kernel-doc for union members Randy Dunlap
2026-06-23 20:12 ` Thomas Weißschuh
2026-06-28 23:18 ` Danilo Krummrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox