From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 12:19:33 +1000 Message-ID: In-Reply-To: <20260511063941.2070-1-yanlonglong@kylinos.cn> References: <20260511063941.2070-1-yanlonglong@kylinos.cn> <20260511063941.2070-1-yanlonglong@kylinos.cn> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Bug analysis:** Correct. The function signature is: ```c static bool dw_dp_video_need_vsc_sdp(struct dw_dp *dp) ``` The old code had: ```c state =3D dw_dp_get_bridge_state(dp); if (!state) return -EINVAL; ``` `-EINVAL` is `-22`, which when cast to `bool` becomes `true`. This would ca= use callers at lines 1163 and 1388 to incorrectly set `DP_MSA_MISC_COLOR_VS= C_SDP` or take the VSC SDP code path when the bridge state couldn't be retr= ieved =E2=80=94 the opposite of the intended "bail out" behavior. **Fix assessment:** The change to `return false` is correct. When `dw_dp_ge= t_bridge_state()` fails, the safe default is to not require a VSC SDP. Both= callers treat `true` as "do extra VSC SDP work", so `false` correctly skip= s that path on error. **Minor nits (non-blocking):** - The Fixes tag formatting has a minor style issue: `Fixes: 86eecc3a9c2e("d= rm/bridge:...` should have a space before the parenthesis per kernel conven= tion: `Fixes: 86eecc3a9c2e ("drm/bridge:...` - The commit message is missing a period at the end of the description para= graph ("the opposite of the intended behavior" =E2=86=92 "the opposite of t= he intended behavior."). **Reviewed-by worthy:** Yes =E2=80=94 this is a clear, minimal, and correct= bug fix. --- Generated by Claude Code Patch Reviewer