Re: [PATCH 2/4] net: phy: adin1100: Add ethtool get_stats support
From: Andrew Lunn
Date: Thu Jun 24 2021 - 13:19:47 EST
> +static u64 adin_get_stat(struct phy_device *phydev, int i)
> +{
> + const struct adin_hw_stat *stat = &adin_hw_stats[i];
> + struct adin_priv *priv = phydev->priv;
> + u64 val;
> + int ret;
> +
> + ret = phy_read_mmd(phydev, MDIO_MMD_VEND2, stat->reg1);
> + if (ret < 0)
> + return (u64)(~0);
U64_MAX is more common.
Andrew