* [PATCH v2] iopoll: fix function parameter names in read_poll_timeout_atomic()
@ 2026-03-06 22:10 Randy Dunlap
2026-03-08 22:11 ` Claude review: " Claude Code Review Bot
2026-03-08 22:11 ` Claude Code Review Bot
0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2026-03-06 22:10 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Ville Syrjälä, Jani Nikula, intel-gfx,
intel-xe, dri-devel
Correct the function parameter names to avoid kernel-doc warnings
and to emphasize this function is atomic (non-sleeping).
Warning: include/linux/iopoll.h:169 function parameter 'sleep_us' not
described in 'read_poll_timeout_atomic'
Warning: ../include/linux/iopoll.h:169 function parameter
'sleep_before_read' not described in 'read_poll_timeout_atomic'
Fixes: 9df8043a546d ("iopoll: Generalize read_poll_timeout() into poll_timeout_us()")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
v2: change the function parameter names, not the kernel-doc comments (Jani)
include/linux/iopoll.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- linux-next-20260304.orig/include/linux/iopoll.h
+++ linux-next-20260304/include/linux/iopoll.h
@@ -159,7 +159,7 @@
*
* This macro does not rely on timekeeping. Hence it is safe to call even when
* timekeeping is suspended, at the expense of an underestimation of wall clock
- * time, which is rather minimal with a non-zero delay_us.
+ * time, which is rather minimal with a non-zero @delay_us.
*
* When available, you'll probably want to use one of the specialized
* macros defined below rather than this macro directly.
@@ -167,9 +167,9 @@
* Returns: 0 on success and -ETIMEDOUT upon a timeout. In either
* case, the last read value at @args is stored in @val.
*/
-#define read_poll_timeout_atomic(op, val, cond, sleep_us, timeout_us, \
- sleep_before_read, args...) \
- poll_timeout_us_atomic((val) = op(args), cond, sleep_us, timeout_us, sleep_before_read)
+#define read_poll_timeout_atomic(op, val, cond, delay_us, timeout_us, \
+ delay_before_read, args...) \
+ poll_timeout_us_atomic((val) = op(args), cond, delay_us, timeout_us, delay_before_read)
/**
* readx_poll_timeout - Periodically poll an address until a condition is met or a timeout occurs
---
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Claude review: iopoll: fix function parameter names in read_poll_timeout_atomic()
2026-03-06 22:10 [PATCH v2] iopoll: fix function parameter names in read_poll_timeout_atomic() Randy Dunlap
2026-03-08 22:11 ` Claude review: " Claude Code Review Bot
@ 2026-03-08 22:11 ` Claude Code Review Bot
1 sibling, 0 replies; 3+ messages in thread
From: Claude Code Review Bot @ 2026-03-08 22:11 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: iopoll: fix function parameter names in read_poll_timeout_atomic()
Author: Randy Dunlap <rdunlap@infradead.org>
Patches: 1
Reviewed: 2026-03-09T08:11:16.714489
---
This is a single-patch series that fixes kernel-doc warnings for `read_poll_timeout_atomic()` in `include/linux/iopoll.h`. The fix is straightforward and correct: the macro's parameter names (`sleep_us`, `sleep_before_read`) didn't match the kernel-doc comments (`delay_us`, `delay_before_read`), causing kernel-doc warnings. The v2 approach—renaming the parameters to match the documentation rather than the other way around—is the right call, since "delay" is semantically more accurate for an atomic (non-sleeping) context that uses `udelay()` rather than `usleep_range()`.
**Verdict: Patch looks good.**
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 3+ messages in thread
* Claude review: iopoll: fix function parameter names in read_poll_timeout_atomic()
2026-03-06 22:10 [PATCH v2] iopoll: fix function parameter names in read_poll_timeout_atomic() Randy Dunlap
@ 2026-03-08 22:11 ` Claude Code Review Bot
2026-03-08 22:11 ` Claude Code Review Bot
1 sibling, 0 replies; 3+ messages in thread
From: Claude Code Review Bot @ 2026-03-08 22:11 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**Purpose:** Fix kernel-doc warnings by renaming macro parameters `sleep_us` → `delay_us` and `sleep_before_read` → `delay_before_read` to match the existing kernel-doc block.
**Analysis:**
The kernel-doc block documents:
```
* @delay_us: Time to udelay between reads in us ...
* @delay_before_read: if it is true, delay @delay_us before read.
```
But the old macro definition used:
```c
#define read_poll_timeout_atomic(op, val, cond, sleep_us, timeout_us, \
sleep_before_read, args...) \
poll_timeout_us_atomic((val) = op(args), cond, sleep_us, timeout_us, sleep_before_read)
```
The fix renames the parameters consistently:
```c
#define read_poll_timeout_atomic(op, val, cond, delay_us, timeout_us, \
delay_before_read, args...) \
poll_timeout_us_atomic((val) = op(args), cond, delay_us, timeout_us, delay_before_read)
```
This is a pure rename of macro parameter names—since these are positional macro parameters, callers are completely unaffected. The name change is also semantically correct: this is the `_atomic` variant that uses `udelay()` (busy-wait delay), not `usleep_range()` (sleeping), so "delay" is the appropriate term. The non-atomic `read_poll_timeout()` correctly retains `sleep_us`/`sleep_before_read` at line 143-145.
The additional fix on the comment line changing `delay_us` to `@delay_us` (adding the kernel-doc parameter reference marker) is a nice minor improvement.
The `Fixes:` tag correctly references the commit that introduced the mismatch.
**Reviewed-by: No issues found.** This is a clean, minimal documentation/naming fix.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-08 22:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-06 22:10 [PATCH v2] iopoll: fix function parameter names in read_poll_timeout_atomic() Randy Dunlap
2026-03-08 22:11 ` Claude review: " Claude Code Review Bot
2026-03-08 22:11 ` 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