Linux driver-core infrastructure
 help / color / mirror / Atom feed
* [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

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