diff options
author | Jacob Keller | 2016-04-14 01:08:22 +0200 |
---|---|---|
committer | Jeff Kirsher | 2016-04-25 13:15:11 +0200 |
commit | b4f47a483045a6e6b31be8ade76cdfef7091f18b (patch) | |
tree | 92232ac7d9c844a7bb65c15fb9c4b7cadae5a079 /drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c | |
parent | ixgbe: Add work around for empty SFP+ cage crosstalk (diff) | |
download | kernel-qcow2-linux-b4f47a483045a6e6b31be8ade76cdfef7091f18b.tar.gz kernel-qcow2-linux-b4f47a483045a6e6b31be8ade76cdfef7091f18b.tar.xz kernel-qcow2-linux-b4f47a483045a6e6b31be8ade76cdfef7091f18b.zip |
ixgbe: use BIT() macro
Several areas of ixgbe were written before widespread usage of the
BIT(n) macro. With the impending release of GCC 6 and its associated new
warnings, some usages such as (1 << 31) have been noted within the ixgbe
driver source. Fix these wholesale and prevent future issues by simply
using BIT macro instead of hand coded bit shifts.
Also fix a few shifts that are shifting values into place by using the
'u' prefix to indicate unsigned. It doesn't strictly matter in these
cases because we're not shifting by too large a value, but these are all
unsigned values and should be indicated as such.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c index b2125e358f7b..a0cb84381cd0 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c @@ -314,8 +314,8 @@ static s32 ixgbe_check_for_rst_pf(struct ixgbe_hw *hw, u16 vf_number) break; } - if (vflre & (1 << vf_shift)) { - IXGBE_WRITE_REG(hw, IXGBE_VFLREC(reg_offset), (1 << vf_shift)); + if (vflre & BIT(vf_shift)) { + IXGBE_WRITE_REG(hw, IXGBE_VFLREC(reg_offset), BIT(vf_shift)); hw->mbx.stats.rsts++; return 0; } |