From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/bridge: synopsys: dw-dp: fix bool function returning negative error code
Date: Sat, 16 May 2026 10:13:40 +1000 [thread overview]
Message-ID: <review-patch1-20260515020156.601-1-yanlonglong@kylinos.cn> (raw)
In-Reply-To: <20260515020156.601-1-yanlonglong@kylinos.cn>
Patch Review
**Analysis:** The function `dw_dp_video_need_vsc_sdp()` at line 1139 returns `bool`. Before the patch, the error path at line 1145 was:
```c
if (!state)
return -EINVAL;
```
Since `-EINVAL` is `-22`, and C implicitly converts any non-zero integer to `true` for a `bool` return, this error path was silently returning `true` — indicating a VSC SDP *is* needed, when the function actually couldn't determine the answer. The sole caller at line 1163:
```c
if (dw_dp_video_need_vsc_sdp(dp))
misc |= DP_MSA_MISC_COLOR_VSC_SDP;
```
would incorrectly set the VSC SDP color bit in the MSA miscellaneous field on failure.
**The fix** — changing to `return false` — is correct. Returning `false` on failure is the safe default: it avoids setting the VSC SDP flag when state is unavailable, which matches the behavior of the other early-return (`!link->vsc_sdp_supported`) in the same function.
**Minor nits on the commit message:**
- The Fixes tag formatting has a minor style issue: there should be a space before the parenthesis: `Fixes: 86eecc3a9c2e ("drm/bridge:...")` (kernel convention uses `("...)` not `("...)`). This is cosmetic but maintainers sometimes ask for it to be fixed.
- The commit message body is missing a period at the end of the sentence ("the opposite of the intended behavior" → "the opposite of the intended behavior.").
**Verdict:** The code change itself is correct and complete. No functional concerns.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-16 0:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 2:01 [PATCH] drm/bridge: synopsys: dw-dp: fix bool function returning negative error code Bob ynn
2026-05-16 0:13 ` Claude review: " Claude Code Review Bot
2026-05-16 0:13 ` Claude Code Review Bot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-05-11 6:39 [PATCH] " Bob ynn
2026-05-16 2:19 ` Claude review: " Claude Code Review Bot
2026-05-16 2:19 ` Claude Code Review Bot
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-20260515020156.601-1-yanlonglong@kylinos.cn \
--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