mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/panthor: fix kernel-doc for nested struct members
@ 2026-10-05  0:03 Rosen Penev
  0 siblings, 0 replies; only message in thread
From: Rosen Penev @ 2026-10-05  0:03 UTC (permalink / raw)
  To: dri-devel
  Cc: Boris Brezillon, Steven Price, Liviu Dudau, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	open list

The kernel-doc comments for members of nested structs in panthor use
the bare member names, which kernel-doc reports as excess members of
the outer struct, for example:

  panthor_fw.c:143 Excess struct member 'start' description in 'panthor_fw_binary_section_entry_hdr' (did you mean one of: 'va.start', 'data.start')
  panthor_device.h:338 Excess struct member 'core' description in 'panthor_device' (did you mean one of: 'clks.core', 'clks.coregroup', 'coherent')

Prefix the member names with the enclosing member, as kernel-doc
suggests, in panthor_fw.c and panthor_device.h. In panthor_gem.h, the
label lock is documented as @lock.str instead of @label.lock; fix that
too. While at it, fix a typo in the @data.buf description.

Assisted-by: LLM
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/gpu/drm/panthor/panthor_device.h | 30 ++++++++++++------------
 drivers/gpu/drm/panthor/panthor_fw.c     | 14 +++++------
 drivers/gpu/drm/panthor/panthor_gem.h    |  2 +-
 3 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/drivers/gpu/drm/panthor/panthor_device.h b/drivers/gpu/drm/panthor/panthor_device.h
index b55a3f9edd41..7fbb95af3244 100644
--- a/drivers/gpu/drm/panthor/panthor_device.h
+++ b/drivers/gpu/drm/panthor/panthor_device.h
@@ -146,13 +146,13 @@ struct panthor_device {
 
 	/** @clks: GPU clocks. */
 	struct {
-		/** @core: Core clock. */
+		/** @clks.core: Core clock. */
 		struct clk *core;
 
-		/** @stacks: Stacks clock. This clock is optional. */
+		/** @clks.stacks: Stacks clock. This clock is optional. */
 		struct clk *stacks;
 
-		/** @coregroup: Core group clock. This clock is optional. */
+		/** @clks.coregroup: Core group clock. This clock is optional. */
 		struct clk *coregroup;
 	} clks;
 
@@ -260,11 +260,11 @@ struct panthor_device {
 
 	/** @unplug: Device unplug related fields. */
 	struct {
-		/** @lock: Lock used to serialize unplug operations. */
+		/** @unplug.lock: Lock used to serialize unplug operations. */
 		struct mutex lock;
 
 		/**
-		 * @done: Completion object signaled when the unplug
+		 * @unplug.done: Completion object signaled when the unplug
 		 * operation is done.
 		 */
 		struct completion done;
@@ -272,17 +272,17 @@ struct panthor_device {
 
 	/** @reset: Reset related fields. */
 	struct {
-		/** @wq: Ordered worqueud used to schedule reset operations. */
+		/** @reset.wq: Ordered worqueud used to schedule reset operations. */
 		struct workqueue_struct *wq;
 
-		/** @work: Reset work. */
+		/** @reset.work: Reset work. */
 		struct work_struct work;
 
-		/** @pending: Set to true if a reset is pending. */
+		/** @reset.pending: Set to true if a reset is pending. */
 		atomic_t pending;
 
 		/**
-		 * @fast: True if the post_reset logic can proceed with a fast reset.
+		 * @reset.fast: True if the post_reset logic can proceed with a fast reset.
 		 *
 		 * A fast reset is just a reset where the driver doesn't reload the FW sections.
 		 *
@@ -295,11 +295,11 @@ struct panthor_device {
 
 	/** @pm: Power management related data. */
 	struct {
-		/** @state: Power state. */
+		/** @pm.state: Power state. */
 		atomic_t state;
 
 		/**
-		 * @mmio_lock: Lock protecting MMIO userspace CPU mappings.
+		 * @pm.mmio_lock: Lock protecting MMIO userspace CPU mappings.
 		 *
 		 * This is needed to ensure we map the dummy IO pages when
 		 * the device is being suspended, and the real IO pages when
@@ -309,14 +309,14 @@ struct panthor_device {
 		struct mutex mmio_lock;
 
 		/**
-		 * @dummy_latest_flush: Dummy LATEST_FLUSH page.
+		 * @pm.dummy_latest_flush: Dummy LATEST_FLUSH page.
 		 *
 		 * Used to replace the real LATEST_FLUSH page when the GPU
 		 * is suspended.
 		 */
 		struct page *dummy_latest_flush;
 
-		/** @recovery_needed: True when a resume attempt failed. */
+		/** @pm.recovery_needed: True when a resume attempt failed. */
 		atomic_t recovery_needed;
 	} pm;
 
@@ -332,7 +332,7 @@ struct panthor_device {
 		/** @gems.lock: Protects the device-wide list of GEM objects. */
 		struct mutex lock;
 
-		/** @node: Used to keep track of all the device's DRM objects */
+		/** @gems.node: Used to keep track of all the device's DRM objects */
 		struct list_head node;
 	} gems;
 #endif
@@ -353,7 +353,7 @@ struct panthor_file {
 	/** @user_mmio: User MMIO related fields. */
 	struct {
 		/**
-		 * @offset: Offset used for user MMIO mappings.
+		 * @user_mmio.offset: Offset used for user MMIO mappings.
 		 *
 		 * This offset should not be used to check the type of mapping
 		 * except in panthor_mmap(). After that point, MMIO mapping
diff --git a/drivers/gpu/drm/panthor/panthor_fw.c b/drivers/gpu/drm/panthor/panthor_fw.c
index 4f1fab66a13b..e2a0dbd79233 100644
--- a/drivers/gpu/drm/panthor/panthor_fw.c
+++ b/drivers/gpu/drm/panthor/panthor_fw.c
@@ -126,19 +126,19 @@ struct panthor_fw_binary_section_entry_hdr {
 
 	/** @va: MCU virtual range to map this binary section to. */
 	struct {
-		/** @start: Start address. */
+		/** @va.start: Start address. */
 		u32 start;
 
-		/** @end: End address. */
+		/** @va.end: End address. */
 		u32 end;
 	} va;
 
 	/** @data: Data to initialize the FW section with. */
 	struct {
-		/** @start: Start offset in the FW binary. */
+		/** @data.start: Start offset in the FW binary. */
 		u32 start;
 
-		/** @end: End offset in the FW binary. */
+		/** @data.end: End offset in the FW binary. */
 		u32 end;
 	} data;
 };
@@ -192,10 +192,10 @@ struct panthor_fw_section {
 	 * We keep data around so we can reload sections after a reset.
 	 */
 	struct {
-		/** @buf: Buffed used to store init data. */
+		/** @data.buf: Buffer used to store init data. */
 		const void *buf;
 
-		/** @size: Size of @buf in bytes. */
+		/** @data.size: Size of @data.buf in bytes. */
 		size_t size;
 	} data;
 };
@@ -251,7 +251,7 @@ struct panthor_fw {
 
 	/** @watchdog: Collection of fields relating to the FW watchdog. */
 	struct {
-		/** @ping_work: Delayed work used to ping the FW. */
+		/** @watchdog.ping_work: Delayed work used to ping the FW. */
 		struct delayed_work ping_work;
 	} watchdog;
 
diff --git a/drivers/gpu/drm/panthor/panthor_gem.h b/drivers/gpu/drm/panthor/panthor_gem.h
index 5ae37d0d3646..00ed3c46d026 100644
--- a/drivers/gpu/drm/panthor/panthor_gem.h
+++ b/drivers/gpu/drm/panthor/panthor_gem.h
@@ -207,7 +207,7 @@ struct panthor_gem_object {
 		 */
 		const char *str;
 
-		/** @lock.str: Protects access to the @label.str field. */
+		/** @label.lock: Protects access to the @label.str field. */
 		struct mutex lock;
 	} label;
 
-- 
2.56.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-05  0:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-05  0:03 [PATCH] drm/panthor: fix kernel-doc for nested struct members Rosen Penev

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®