[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YNS+rEcYXlTqirwg@lunn.ch>
Date: Thu, 24 Jun 2021 19:19:40 +0200
From: Andrew Lunn <andrew@...n.ch>
To: alexandru.tachici@...log.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
davem@...emloft.net, kuba@...nel.org, linux@...linux.org.uk
Subject: Re: [PATCH 2/4] net: phy: adin1100: Add ethtool get_stats support
> +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
Powered by blists - more mailing lists