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, 10 Mar 2026 11:57:17 +1000 Message-ID: In-Reply-To: <20260309190842.927634-14-vladimir.oltean@nxp.com> References: <20260309190842.927634-1-vladimir.oltean@nxp.com> <20260309190842.927634-14-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 attribute accessor functions tolerate NULL phy poi= nters, since `devm_phy_optional_get()` can return NULL. This is consistent = with other PHY API functions. One observation: the `!CONFIG_GENERIC_PHY` stub for `phy_get_bus_width()`: ```c static inline int phy_get_bus_width(struct phy *phy) { + if (!phy) + return 0; return -ENOSYS; } ``` Adding a NULL check before returning `-ENOSYS` is slightly odd =E2=80=94 if= CONFIG_GENERIC_PHY is disabled, the function already returns an error. But= it's harmless and maintains consistency. No real issue. --- Generated by Claude Code Patch Reviewer