From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: media: renesas: vsp1: Use mutex guards Date: Sat, 16 May 2026 14:29:49 +1000 Message-ID: In-Reply-To: <20260511235637.3468558-6-laurent.pinchart+renesas@ideasonboard.com> References: <20260511235637.3468558-1-laurent.pinchart+renesas@ideasonboard.com> <20260511235637.3468558-6-laurent.pinchart+renesas@ideasonboard.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 Converts `mutex_lock()`/`mutex_unlock()` pairs to `guard(mutex)()` where th= e lock covers until the end of the function. This allows removal of `goto d= one`/`done:` cleanup labels and simplifies early-return paths. Touched file= s: `vsp1_brx.c`, `vsp1_drm.c`, `vsp1_entity.c`, `vsp1_histo.c`, `vsp1_hsit.= c`, `vsp1_rwpf.c`, `vsp1_sru.c`, `vsp1_uds.c`, `vsp1_uif.c`, `vsp1_video.c`= , `vsp1_wpf.c`. All conversions follow the same pattern =E2=80=94 `ret` tracking variable i= s removed, error paths return directly. The nested guards in `vsp1_wpf_set_= rotation()` maintain the original lock ordering (`video->lock` before `wpf-= >entity.lock`): ```c guard(mutex)(&video->lock); ... guard(mutex)(&wpf->entity.lock); ``` This is correct =E2=80=94 cleanup occurs in reverse declaration order on fu= nction return. **Clean and correct throughout.** --- Generated by Claude Code Patch Reviewer