path: root/drivers/net/ethernet/intel/igb/e1000_nvm.c
diff options
authorJacob Keller <jacob.e.keller@intel.com>2016-04-13 16:08:28 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-05-13 14:39:47 -0700
commita51d8c217b15b97fede844dd6860f7b3c6ffcfef (patch)
tree0153da876d8119a5df6dd02f585ab1ad731ea5ba /drivers/net/ethernet/intel/igb/e1000_nvm.c
parente1000e: Cleanup consistency in ret_val variable usage (diff)
igb: use BIT() macro or unsigned prefix
For bitshifts, we should make use of the BIT macro when possible, and ensure that other bitshifts are marked as unsigned. This helps prevent signed bitshift errors, and ensures similar style. Make use of GENMASK and the unsigned postfix where BIT() isn't appropriate. 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/igb/e1000_nvm.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/igb/e1000_nvm.c b/drivers/net/ethernet/intel/igb/e1000_nvm.c
index e8280d0d7f02..3582c5cf8843 100644
--- a/drivers/net/ethernet/intel/igb/e1000_nvm.c
+++ b/drivers/net/ethernet/intel/igb/e1000_nvm.c
@@ -72,7 +72,7 @@ static void igb_shift_out_eec_bits(struct e1000_hw *hw, u16 data, u16 count)
u32 eecd = rd32(E1000_EECD);
u32 mask;
- mask = 0x01 << (count - 1);
+ mask = 1u << (count - 1);
if (nvm->type == e1000_nvm_eeprom_spi)
eecd |= E1000_EECD_DO;