From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: ufs: exynos: stop poking into struct phy guts Date: Tue, 10 Mar 2026 11:57:16 +1000 Message-ID: In-Reply-To: <20260309190842.927634-10-vladimir.oltean@nxp.com> References: <20260309190842.927634-1-vladimir.oltean@nxp.com> <20260309190842.927634-10-vladimir.oltean@nxp.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 a behavior change that replaces `generic_phy->power_count` checks w= ith a local `phy_powered_on` boolean. The commit message correctly identifi= es that reading `power_count` without holding `phy->mutex` is racy, and tha= t a single consumer shouldn't rely on a shared refcount. The implementation looks correct: - `exynos_ufs_phy_init()`: sets `phy_powered_on =3D false` on power-down, `= true` after successful power-on - `exynos_ufs_exit()`: early return if `!phy_powered_on` =E2=80=94 **minor = concern**: the original code unconditionally called `phy_power_off()`/`phy_= exit()`. Adding the early return changes behavior if `exynos_ufs_exit()` is= called without a prior successful `phy_init()`. However, since `phy_powere= d_on` starts as `false` (zero-init of kzalloc'd struct), this should be saf= e and actually prevents potential underrun. - `exynos_ufs_suspend()`: correctly gates `phy_power_off()` with `phy_power= ed_on` - `exynos_ufs_resume()`: now checks error from `phy_power_on()` =E2=80=94 g= ood improvement No issues. Well-reasoned change. --- Generated by Claude Code Patch Reviewer