aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2016-04-13 19:08:22 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-04-25 07:15:11 -0400
commitb4f47a483045a6e6b31be8ade76cdfef7091f18b (patch)
tree92232ac7d9c844a7bb65c15fb9c4b7cadae5a079 /drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c
parent4319a7976722f6925b5bbbdac417d87a0cbde859 (diff)
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_82598.c')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c
index 6ecd598c6ef5..fb51be74dd4c 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c
@@ -792,7 +792,7 @@ mac_reset_top:
792 } 792 }
793 793
794 gheccr = IXGBE_READ_REG(hw, IXGBE_GHECCR); 794 gheccr = IXGBE_READ_REG(hw, IXGBE_GHECCR);
795 gheccr &= ~((1 << 21) | (1 << 18) | (1 << 9) | (1 << 6)); 795 gheccr &= ~(BIT(21) | BIT(18) | BIT(9) | BIT(6));
796 IXGBE_WRITE_REG(hw, IXGBE_GHECCR, gheccr); 796 IXGBE_WRITE_REG(hw, IXGBE_GHECCR, gheccr);
797 797
798 /* 798 /*
@@ -914,10 +914,10 @@ static s32 ixgbe_set_vfta_82598(struct ixgbe_hw *hw, u32 vlan, u32 vind,
914 bits = IXGBE_READ_REG(hw, IXGBE_VFTA(regindex)); 914 bits = IXGBE_READ_REG(hw, IXGBE_VFTA(regindex));
915 if (vlan_on) 915 if (vlan_on)
916 /* Turn on this VLAN id */ 916 /* Turn on this VLAN id */
917 bits |= (1 << bitindex); 917 bits |= BIT(bitindex);
918 else 918 else
919 /* Turn off this VLAN id */ 919 /* Turn off this VLAN id */
920 bits &= ~(1 << bitindex); 920 bits &= ~BIT(bitindex);
921 IXGBE_WRITE_REG(hw, IXGBE_VFTA(regindex), bits); 921 IXGBE_WRITE_REG(hw, IXGBE_VFTA(regindex), bits);
922 922
923 return 0; 923 return 0;