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: dw-hdmi: move next_bridge lookup to attach time Date: Tue, 31 Mar 2026 16:54:44 +1000 Message-ID: In-Reply-To: <20260330-drm-lcdif-dbanc-v2-7-c7f2af536a24@bootlin.com> References: <20260330-drm-lcdif-dbanc-v2-0-c7f2af536a24@bootlin.com> <20260330-drm-lcdif-dbanc-v2-7-c7f2af536a24@bootlin.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 is the most complex change. The commit message explains the devlink ch= icken-egg problem well. **Concern about `__free(drm_bridge_put)` on `next_bridge`:** The code does: ```c struct drm_bridge *next_bridge __free(drm_bridge_put) =3D of_drm_find_and_get_bridge(remote); if (!next_bridge) return -EPROBE_DEFER; return drm_bridge_attach(encoder, next_bridge, bridge, flags); ``` The `__free(drm_bridge_put)` will call `drm_bridge_put(next_bridge)` when t= he variable goes out of scope (i.e., after `drm_bridge_attach` returns). Th= is is correct only if `drm_bridge_attach` takes its own reference on the br= idge. Given that this codebase has been converted to refcounted bridges (pe= r the cover letter's grand plan), this should be fine =E2=80=94 `drm_bridge= _attach` presumably does a `drm_bridge_get`. But this is worth double-check= ing by the maintainers, since getting this wrong would cause a use-after-fr= ee. **Error return semantics:** `of_drm_find_and_get_bridge()` returns `NULL` o= n failure (not `ERR_PTR`), and the code correctly checks `!next_bridge`. Go= od. --- Generated by Claude Code Patch Reviewer