drivers: net: replace UINT64_MAX with U64_MAX
U64_MAX is well defined now while the UINT64_MAX is not, so we fall back to drivers' own definition as below: #ifndef UINT64_MAX #define UINT64_MAX (u64)(~((u64)0)) #endif I believe this is in one phy driver then copied and pasted to other phy drivers. Replace the UINT64_MAX with U64_MAX to clean up the source code. Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
80e95f472f
commit
6c3442f5f8
@@ -650,9 +650,6 @@ static void kszphy_get_strings(struct phy_device *phydev, u8 *data)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef UINT64_MAX
|
||||
#define UINT64_MAX (u64)(~((u64)0))
|
||||
#endif
|
||||
static u64 kszphy_get_stat(struct phy_device *phydev, int i)
|
||||
{
|
||||
struct kszphy_hw_stat stat = kszphy_hw_stats[i];
|
||||
@@ -662,7 +659,7 @@ static u64 kszphy_get_stat(struct phy_device *phydev, int i)
|
||||
|
||||
val = phy_read(phydev, stat.reg);
|
||||
if (val < 0) {
|
||||
ret = UINT64_MAX;
|
||||
ret = U64_MAX;
|
||||
} else {
|
||||
val = val & ((1 << stat.bits) - 1);
|
||||
priv->stats[i] += val;
|
||||
|
Reference in New Issue
Block a user