lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<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

Powered by Openwall GNU/*/Linux Powered by OpenVZ