Skip to content

Commit

Permalink
net: atlantic: use U32_MAX in aq_hw_utils.c
Browse files Browse the repository at this point in the history
This patch replaces magic constant ~0U usage with U32_MAX in aq_hw_utils.c

Signed-off-by: Mark Starovoytov <mstarovoitov@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Mark Starovoytov authored and David S. Miller committed Jul 21, 2020
1 parent 1e41b3f commit 88bc9cf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/ethernet/aquantia/atlantic/aq_hw_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ u32 aq_hw_read_reg(struct aq_hw_s *hw, u32 reg)
{
u32 value = readl(hw->mmio + reg);

if ((~0U) == value &&
(~0U) == readl(hw->mmio +
hw->aq_nic_cfg->aq_hw_caps->hw_alive_check_addr))
if (value == U32_MAX &&
readl(hw->mmio + hw->aq_nic_cfg->aq_hw_caps->hw_alive_check_addr) == U32_MAX)
aq_utils_obj_set(&hw->flags, AQ_HW_FLAG_ERR_UNPLUG);

return value;
Expand Down

0 comments on commit 88bc9cf

Please sign in to comment.