From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: phy: make phy_get_mode(), phy_(get|set)_bus_width() NULL tolerant Date: Tue, 05 May 2026 10:35:04 +1000 Message-ID: In-Reply-To: <20260430110652.558622-17-vladimir.oltean@nxp.com> References: <20260430110652.558622-1-vladimir.oltean@nxp.com> <20260430110652.558622-17-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 Makes the newly-exported functions handle `NULL` PHY pointers, consistent w= ith the optional-get pattern where `phy_get()` can return NULL. ```c enum phy_mode phy_get_mode(struct phy *phy) { if (!phy) return PHY_MODE_INVALID; return phy->attrs.mode; } ``` There's a minor question about the `!CONFIG_GENERIC_PHY` stubs in `phy.h` = =E2=80=94 the stub for `phy_get_bus_width()` adds a NULL check before `retu= rn -ENOSYS`, which is a no-op since it returns `-ENOSYS` regardless. This i= s harmless but redundant. Not worth blocking. --- Generated by Claude Code Patch Reviewer