public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: Re: [PATCH] staging: fbtft: fb_ra8875: replace udelay() with usleep_range()
Date: Fri, 13 Mar 2026 14:46:09 +1000	[thread overview]
Message-ID: <review-patch1-2026031151-fragrant-geometry-4b3f@gregkh> (raw)
In-Reply-To: <2026031151-fragrant-geometry-4b3f@gregkh>

Patch Review

**Overall: Correct and appropriate change.**

The two conversions at lines 213 and 234 of `fb_ra8875.c` are in `write_reg8_bus8()`, which is a `.write_register` callback that calls `par->fbtftops.write()` (i.e., `fbtft_write_spi`). SPI transfers can sleep, so this function is already in process context — `usleep_range()` is safe here.

```c
-	udelay(100);
+	usleep_range(100, 200);
```

The chosen range of `(100, 200)` is reasonable for a 100 µs delay.

**Minor nit (not a blocker):** The commit message says "as recommended by checkpatch.pl" — while true, it would be slightly better to mention the actual technical benefit (the function is in process/sleepable context since it performs SPI transfers) rather than citing checkpatch as the primary motivation. Checkpatch-driven patches that blindly convert `udelay` to `usleep_range` without verifying context safety are a common source of bugs; mentioning why it's safe here would strengthen the commit message.

**No functional issues found.**

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-03-13  4:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 13:52 [PATCH] staging: fbtft: fb_ra8875: replace udelay() with usleep_range() Anas Iqbal
2026-03-11 14:23 ` Greg KH
2026-03-13  4:46   ` Claude review: " Claude Code Review Bot
2026-03-13  4:46   ` Claude Code Review Bot [this message]
2026-03-11 15:57 ` 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-2026031151-fragrant-geometry-4b3f@gregkh \
    --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