From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: Re: [PATCH] staging: fbtft: fb_tinylcd: replace udelay() with usleep_range()
Date: Fri, 13 Mar 2026 14:44:57 +1000 [thread overview]
Message-ID: <review-patch1-abGA1WOvzvV8fusw@stanley.mountain> (raw)
In-Reply-To: <abGA1WOvzvV8fusw@stanley.mountain>
Patch Review
**Unrelated whitespace change included:**
The patch changes the continuation-line alignment of the `write_reg` call at line 40-41, which is unrelated to the `udelay` → `usleep_range` conversion:
```diff
write_reg(par, 0xE0, 0x00, 0x35, 0x33, 0x00, 0x00, 0x00,
- 0x00, 0x35, 0x33, 0x00, 0x00, 0x00);
+ 0x00, 0x35, 0x33, 0x00, 0x00, 0x00);
```
This should either be dropped from this patch or submitted as a separate cleanup. Mixing unrelated changes makes review and bisection harder.
**Sleeping context concern:**
`usleep_range()` can only be called from process/sleepable context — it cannot be used in atomic context (interrupts, spinlock-held sections, etc.). The `init_display` function is called via `fbtft_ops.init_display`, which is typically invoked during probe or from sysfs, so it should be in sleepable context. However, the commit message should mention that this was verified, or the author should confirm that `init_display` is never called from atomic context. Looking at the fbtft framework, this appears safe, but it's worth calling out.
**Upper bound of the range:**
The chosen range `usleep_range(250, 500)` doubles the maximum delay compared to the original. For a post-sleep-exit delay on a display controller, this is likely fine — MIPI DCS `EXIT_SLEEP_MODE` typically requires at least 120ms per spec (this 250µs delay seems like it may already be too short, but that's a pre-existing issue). The 250–500µs range is acceptable.
**Verdict:** The core change is fine but the patch should drop the unrelated whitespace change. A v2 with only the `udelay` → `usleep_range` hunk would be clean and acceptable.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-03-13 4:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 14:24 [PATCH] staging: fbtft: fb_tinylcd: replace udelay() with usleep_range() Anas Iqbal
2026-03-11 14:48 ` Dan Carpenter
2026-03-13 4:44 ` Claude Code Review Bot [this message]
2026-03-13 4:44 ` Claude review: " Claude Code Review Bot
2026-03-11 14:56 ` Greg KH
2026-03-11 16:01 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=review-patch1-abGA1WOvzvV8fusw@stanley.mountain \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox