From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: scsi: ufs: exynos: stop poking into struct phy guts Date: Sun, 22 Mar 2026 04:07:13 +1000 Message-ID: In-Reply-To: <20260319223241.1351137-10-vladimir.oltean@nxp.com> References: <20260319223241.1351137-1-vladimir.oltean@nxp.com> <20260319223241.1351137-10-vladimir.oltean@nxp.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Replaces `generic_phy->power_count` checks with a local `ufs->phy_powered_on` bool. The commit message provides excellent analysis of why the original pattern was wrong (other consumers could affect power_count, and the read was unlocked). The implementation correctly tracks state transitions in all paths: - `exynos_ufs_phy_init()`: sets `false` before power-off, sets `true` after power-on - `exynos_ufs_exit()`: early return if not powered on - `exynos_ufs_suspend()`: sets `false` after power-off - `exynos_ufs_resume()`: adds error handling for `phy_power_on()`, sets `true` on success One minor note: in `exynos_ufs_resume()`, the function continues executing (`exynos_ufs_config_smu`, `exynos_ufs_fmp_resume`) even if `phy_power_on()` fails. The error is logged but not propagated to the return value. This seems intentional -- the original code didn't check the return either -- but it's worth noting that the resume function will return 0 even on PHY power failure. This preserves existing behavior, so it's acceptable. --- Generated by Claude Code Patch Reviewer