Re: [PATCH net-next] net: micrel: Fix set/get PHC time for lan8814

From: Vadim Fedorenko
Date: Fri Jan 26 2024 - 10:27:19 EST


On 26/01/2024 13:15, Andrew Lunn wrote:
+ *sec |= lanphy_read_page_reg(phydev, 4, PTP_CLOCK_READ_SEC_MID);

lanphy_read_page_reg returns int, but only 16 bits have meanings here.
Is it safe to assume that other 16 bits will be zeros always?

Yes. __phy_read() should only return a negative error code, or a value
which fits in a u16. If any of the top bits are set, its a bug in the
MDIO driver which needs finding and fixing.

Got it. Thanks Andrew