diff options
author | Jisheng Zhang <Jisheng.Zhang@synaptics.com> | 2018-04-27 11:18:58 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-28 03:18:55 +0300 |
commit | 6c3442f5f85827e40e314a74a24b1428e78748c8 (patch) | |
tree | 2989a15b6960ce6d5d0fbceda1bd13f9f7ad4dfd /drivers/net/dsa/mv88e6xxx/chip.c | |
parent | 80e95f472fade809daf8110861a5553fba98cfe5 (diff) | |
download | linux-6c3442f5f85827e40e314a74a24b1428e78748c8.tar.xz |
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>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/chip.c')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/chip.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 8f92ccc0dd54..a13a7005ffa0 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -665,13 +665,13 @@ static uint64_t _mv88e6xxx_get_ethtool_stat(struct mv88e6xxx_chip *chip, case STATS_TYPE_PORT: err = mv88e6xxx_port_read(chip, port, s->reg, ®); if (err) - return UINT64_MAX; + return U64_MAX; low = reg; if (s->size == 4) { err = mv88e6xxx_port_read(chip, port, s->reg + 1, ®); if (err) - return UINT64_MAX; + return U64_MAX; high = reg; } break; @@ -685,7 +685,7 @@ static uint64_t _mv88e6xxx_get_ethtool_stat(struct mv88e6xxx_chip *chip, mv88e6xxx_g1_stats_read(chip, reg + 1, &high); break; default: - return UINT64_MAX; + return U64_MAX; } value = (((u64)high) << 16) | low; return value; |