summaryrefslogtreecommitdiff
path: root/drivers/net/phy/bcm-phy-lib.c
diff options
context:
space:
mode:
authorJisheng Zhang <Jisheng.Zhang@synaptics.com>2018-04-27 16:18:58 +0800
committerDavid S. Miller <davem@davemloft.net>2018-04-27 20:18:55 -0400
commit6c3442f5f85827e40e314a74a24b1428e78748c8 (patch)
tree2989a15b6960ce6d5d0fbceda1bd13f9f7ad4dfd /drivers/net/phy/bcm-phy-lib.c
parent80e95f472fade809daf8110861a5553fba98cfe5 (diff)
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/phy/bcm-phy-lib.c')
-rw-r--r--drivers/net/phy/bcm-phy-lib.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/phy/bcm-phy-lib.c b/drivers/net/phy/bcm-phy-lib.c
index 5ad130c3da43..0876aec7328c 100644
--- a/drivers/net/phy/bcm-phy-lib.c
+++ b/drivers/net/phy/bcm-phy-lib.c
@@ -346,10 +346,6 @@ void bcm_phy_get_strings(struct phy_device *phydev, u8 *data)
}
EXPORT_SYMBOL_GPL(bcm_phy_get_strings);
-#ifndef UINT64_MAX
-#define UINT64_MAX (u64)(~((u64)0))
-#endif
-
/* Caller is supposed to provide appropriate storage for the library code to
* access the shadow copy
*/
@@ -362,7 +358,7 @@ static u64 bcm_phy_get_stat(struct phy_device *phydev, u64 *shadow,
val = phy_read(phydev, stat.reg);
if (val < 0) {
- ret = UINT64_MAX;
+ ret = U64_MAX;
} else {
val >>= stat.shift;
val = val & ((1 << stat.bits) - 1);