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/msm/hdmi_bridge: Simplify register bit updates Date: Thu, 12 Mar 2026 06:45:27 +1000 Message-ID: In-Reply-To: <20260311-drm-msm-hdmi-cleanup-v1-6-c5535245f6de@oss.qualcomm.com> References: <20260311-drm-msm-hdmi-cleanup-v1-0-c5535245f6de@oss.qualcomm.com> <20260311-drm-msm-hdmi-cleanup-v1-6-c5535245f6de@oss.qualcomm.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review This patch introduces two new helpers in `hdmi.h`: ```c static inline void hdmi_clear_bits(struct hdmi *hdmi, u32 reg, u32 mask) static inline void hdmi_update_bits(struct hdmi *hdmi, u32 reg, u32 mask, u= 32 data) ``` The `hdmi_update_bits` correctly applies `val |=3D data & mask`, ensuring o= nly bits within the mask are modified. The conversions in `hdmi_bridge.c` a= re all correct. One observation: in the "set bits" cases (e.g., SPD and HDMI infoframe writ= es), the pattern `hdmi_update_bits(hdmi, reg, val, val)` is used where mask= =3D=3D data. This is actually *slightly better* than the original `|=3D` p= attern because it clears the `_LINE` field before setting the new value, wh= ereas the original code relied on the field being zero before the `|=3D`. I= n the clear functions that precede these writes, the LINE field would alrea= dy be zeroed, so it's not a bug fix, but the new code is more defensive. Minor nit: the commit message has a typo =E2=80=94 "reister" should be "reg= ister." This also appears in patch 7. --- Generated by Claude Code Patch Reviewer