* [PATCH v2] accel: Arm Ethos-U NPU: fix all uapi kernel-doc warnings
@ 2026-04-27 18:41 Randy Dunlap
2026-04-28 4:03 ` Claude review: " Claude Code Review Bot
2026-04-28 4:03 ` Claude Code Review Bot
0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2026-04-27 18:41 UTC (permalink / raw)
To: dri-devel
Cc: Randy Dunlap, Rob Herring, Tomeu Vizoso, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
Use correct struct names, struct member names, and kernel-doc
format to resolve all kernel-doc warnings:
Warning: include/uapi/drm/ethosu_accel.h:81 expecting prototype for struct
drm_ethosu_gpu_info. Prototype was for struct drm_ethosu_npu_info instead
Warning: include/uapi/drm/ethosu_accel.h:81 struct member 'config' not
described in 'drm_ethosu_npu_info'
Warning: include/uapi/drm/ethosu_accel.h:81 struct member 'sram_size' not
described in 'drm_ethosu_npu_info'
Warning: include/uapi/drm/ethosu_accel.h:172 expecting prototype for struct
drm_ethosu_wait_bo. Prototype was for struct drm_ethosu_bo_wait instead
Warning: include/uapi/drm/ethosu_accel.h:172 struct member 'handle' not
described in 'drm_ethosu_bo_wait'
Warning: include/uapi/drm/ethosu_accel.h:172 struct member 'pad' not
described in 'drm_ethosu_bo_wait'
Warning: include/uapi/drm/ethosu_accel.h:172 struct member 'timeout_ns' not
described in 'drm_ethosu_bo_wait'
Warning: include/uapi/drm/ethosu_accel.h:208 struct member 'cmd_bo' not
described in 'drm_ethosu_job'
Warning: include/uapi/drm/ethosu_accel.h:208 struct member 'sram_size' not
described in 'drm_ethosu_job'
Warning: include/uapi/drm/ethosu_accel.h:208 struct member
'region_bo_handles' not described in 'drm_ethosu_job'
Warning: include/uapi/drm/ethosu_accel.h:224 struct member 'jobs' not
described in 'drm_ethosu_submit'
Warning: include/uapi/drm/ethosu_accel.h:224 struct member 'job_count' not
described in 'drm_ethosu_submit'
Warning: include/uapi/drm/ethosu_accel.h:224 struct member 'pad' not
described in 'drm_ethosu_submit'
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
v2: rebase & resend
Cc: Rob Herring <robh@kernel.org>
Cc: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: David Airlie <airlied@gmail.com>
Cc: Simona Vetter <simona@ffwll.ch>
include/uapi/drm/ethosu_accel.h | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
--- linux-next-20260427.orig/include/uapi/drm/ethosu_accel.h
+++ linux-next-20260427/include/uapi/drm/ethosu_accel.h
@@ -60,7 +60,7 @@ enum drm_ethosu_dev_query_type {
};
/**
- * struct drm_ethosu_gpu_info - NPU information
+ * struct drm_ethosu_npu_info - NPU information
*
* Structure grouping all queryable information relating to the NPU.
*/
@@ -75,9 +75,10 @@ struct drm_ethosu_npu_info {
#define DRM_ETHOSU_VERSION_MINOR(x) (((x) >> 4) & 0xff)
#define DRM_ETHOSU_VERSION_STATUS(x) ((x) & 0xf)
- /** @gpu_rev: GPU revision. */
+ /** @config: NPU revision. */
__u32 config;
+ /** @sram_size: NPU SRAM size (KB) */
__u32 sram_size;
};
@@ -159,7 +160,7 @@ struct drm_ethosu_bo_mmap_offset {
};
/**
- * struct drm_ethosu_wait_bo - ioctl argument for waiting for
+ * struct drm_ethosu_bo_wait - ioctl argument for waiting for
* completion of the last DRM_ETHOSU_SUBMIT on a BO.
*
* This is useful for cases where multiple processes might be
@@ -167,9 +168,12 @@ struct drm_ethosu_bo_mmap_offset {
* completed.
*/
struct drm_ethosu_bo_wait {
+ /** @handle: BO handle */
__u32 handle;
+ /** @pad: Reserved, must be zero. */
__u32 pad;
- __s64 timeout_ns; /* absolute */
+ /** @timeout_ns: Absolute timeout in ns. */
+ __s64 timeout_ns;
};
struct drm_ethosu_cmdstream_bo_create {
@@ -197,14 +201,14 @@ struct drm_ethosu_cmdstream_bo_create {
* sequentially on the same core, to benefit from memory residency in SRAM.
*/
struct drm_ethosu_job {
- /** Input: BO handle for cmdstream. */
+ /** @cmd_bo: Input: BO handle for cmdstream. */
__u32 cmd_bo;
- /** Input: Amount of SRAM to use. */
+ /** @sram_size: Input: Amount of SRAM to use. */
__u32 sram_size;
#define ETHOSU_MAX_REGIONS 8
- /** Input: Array of BO handles for each region. */
+ /** @region_bo_handles: Input: Array of BO handles for each region. */
__u32 region_bo_handles[ETHOSU_MAX_REGIONS];
};
@@ -214,13 +218,13 @@ struct drm_ethosu_job {
* The kernel will schedule the execution of these jobs in dependency order.
*/
struct drm_ethosu_submit {
- /** Input: Pointer to an array of struct drm_ethosu_job. */
+ /** @jobs: Input: Pointer to an array of struct drm_ethosu_job. */
__u64 jobs;
- /** Input: Number of jobs passed in. */
+ /** @job_count: Input: Number of jobs passed in. */
__u32 job_count;
- /** Reserved, must be zero. */
+ /** @pad: Reserved, must be zero. */
__u32 pad;
};
^ permalink raw reply [flat|nested] 3+ messages in thread* Claude review: accel: Arm Ethos-U NPU: fix all uapi kernel-doc warnings
2026-04-27 18:41 [PATCH v2] accel: Arm Ethos-U NPU: fix all uapi kernel-doc warnings Randy Dunlap
@ 2026-04-28 4:03 ` Claude Code Review Bot
2026-04-28 4:03 ` Claude Code Review Bot
1 sibling, 0 replies; 3+ messages in thread
From: Claude Code Review Bot @ 2026-04-28 4:03 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: accel: Arm Ethos-U NPU: fix all uapi kernel-doc warnings
Author: Randy Dunlap <rdunlap@infradead.org>
Patches: 1
Reviewed: 2026-04-28T14:03:30.211455
---
This is a single-patch series from Randy Dunlap fixing kernel-doc warnings in the Arm Ethos-U NPU accelerator UAPI header (`include/uapi/drm/ethosu_accel.h`). The patch is straightforward documentation-only — no functional changes. It corrects struct names in doc comments to match actual struct definitions, adds missing `@member` annotations for undocumented struct members, and applies proper kernel-doc formatting. This is v2 (rebase & resend).
**Verdict: The patch is correct and should be applied.** All changes are accurate and resolve the listed kernel-doc warnings. There are no functional code changes, so risk is minimal.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 3+ messages in thread
* Claude review: accel: Arm Ethos-U NPU: fix all uapi kernel-doc warnings
2026-04-27 18:41 [PATCH v2] accel: Arm Ethos-U NPU: fix all uapi kernel-doc warnings Randy Dunlap
2026-04-28 4:03 ` Claude review: " Claude Code Review Bot
@ 2026-04-28 4:03 ` Claude Code Review Bot
1 sibling, 0 replies; 3+ messages in thread
From: Claude Code Review Bot @ 2026-04-28 4:03 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**Status: Good to merge**
The patch addresses four categories of kernel-doc issues:
**1. Struct name corrections (correct)**
```c
- * struct drm_ethosu_gpu_info - NPU information
+ * struct drm_ethosu_npu_info - NPU information
```
The actual struct is `drm_ethosu_npu_info` — the doc comment had a stale name `drm_ethosu_gpu_info`. Correct fix.
```c
- * struct drm_ethosu_wait_bo - ioctl argument for waiting for
+ * struct drm_ethosu_bo_wait - ioctl argument for waiting for
```
The actual struct is `drm_ethosu_bo_wait` — the doc comment had the name segments reversed. Correct fix.
**2. Member name correction (correct)**
```c
- /** @gpu_rev: GPU revision. */
+ /** @config: NPU revision. */
__u32 config;
```
The field is named `config`, not `gpu_rev`. The description is also updated from "GPU revision" to "NPU revision", which is consistent with the rest of the header that uses "NPU" terminology throughout (the device is an NPU, not a GPU). Correct fix.
**3. Missing `@member` annotations added (correct)**
For `drm_ethosu_npu_info`:
```c
+ /** @sram_size: NPU SRAM size (KB) */
__u32 sram_size;
```
For `drm_ethosu_bo_wait`:
```c
+ /** @handle: BO handle */
__u32 handle;
+ /** @pad: Reserved, must be zero. */
__u32 pad;
- __s64 timeout_ns; /* absolute */
+ /** @timeout_ns: Absolute timeout in ns. */
+ __s64 timeout_ns;
```
Note: `timeout_ns` previously had an inline comment `/* absolute */` which is replaced by a proper kernel-doc annotation with the same information. Good.
For `drm_ethosu_job`:
```c
- /** Input: BO handle for cmdstream. */
+ /** @cmd_bo: Input: BO handle for cmdstream. */
...
- /** Input: Amount of SRAM to use. */
+ /** @sram_size: Input: Amount of SRAM to use. */
...
- /** Input: Array of BO handles for each region. */
+ /** @region_bo_handles: Input: Array of BO handles for each region. */
```
For `drm_ethosu_submit`:
```c
- /** Input: Pointer to an array of struct drm_ethosu_job. */
+ /** @jobs: Input: Pointer to an array of struct drm_ethosu_job. */
...
- /** Input: Number of jobs passed in. */
+ /** @job_count: Input: Number of jobs passed in. */
...
- /** Reserved, must be zero. */
+ /** @pad: Reserved, must be zero. */
```
All member name annotations correctly match the actual field names in each struct. The existing description text is preserved in every case.
**Minor nits (not worth a respin):**
- `@sram_size: NPU SRAM size (KB)` is missing a trailing period, while other descriptions like `@pad: Reserved, must be zero.` and `@timeout_ns: Absolute timeout in ns.` have one. This is a very minor inconsistency already present in the existing `@handle: BO handle` line as well.
- `struct drm_ethosu_cmdstream_bo_create` (lines 179-194 in the post-patch file) still lacks kernel-doc formatted comments — its members use plain `/* */` comments without `@member:` prefixes. This is pre-existing and out of scope for this patch, but could be a follow-up.
**No functional concerns.** The commit message is well-structured, listing all warnings that are resolved. The Signed-off-by is present. Reviewed-by or Acked-by from the Ethos-U maintainer (Rob Herring or Tomeu Vizoso) would be nice but is not strictly required for a doc-only fix.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-28 4:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-27 18:41 [PATCH v2] accel: Arm Ethos-U NPU: fix all uapi kernel-doc warnings Randy Dunlap
2026-04-28 4:03 ` Claude review: " Claude Code Review Bot
2026-04-28 4:03 ` Claude Code Review Bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox