summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/e1000e/nvm.c
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2016-04-14 02:08:32 +0300
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-05-14 01:15:36 +0300
commit18dd23920703891c39c7965873f8ae369bd3a237 (patch)
tree77ddae144327be435d00251c69be4a936e332094 /drivers/net/ethernet/intel/e1000e/nvm.c
parent0ed2dbf4f469e2e286d903ebc091edfd9be4d063 (diff)
downloadlinux-18dd23920703891c39c7965873f8ae369bd3a237.tar.xz
e1000e: use BIT() macro for bit defines
This prevents signed bitshift issues when the shift would overwrite the signed bit, and prevents making this mistake in the future when copying and modifying code. Use GENMASK or the unsigned postfix for cases which aren't suitable for BIT() macro. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/e1000e/nvm.c')
-rw-r--r--drivers/net/ethernet/intel/e1000e/nvm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/nvm.c b/drivers/net/ethernet/intel/e1000e/nvm.c
index 49f205c023bf..2efd80dfd88e 100644
--- a/drivers/net/ethernet/intel/e1000e/nvm.c
+++ b/drivers/net/ethernet/intel/e1000e/nvm.c
@@ -67,7 +67,7 @@ static void e1000_shift_out_eec_bits(struct e1000_hw *hw, u16 data, u16 count)
u32 eecd = er32(EECD);
u32 mask;
- mask = 0x01 << (count - 1);
+ mask = BIT(count - 1);
if (nvm->type == e1000_nvm_eeprom_spi)
eecd |= E1000_EECD_DO;