From: Emil Tantilov Date: Tue, 5 Feb 2013 09:43:26 +0000 (+0000) Subject: ixgbe: don't do arithmetic operations on bitmasks X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d01115752f5e37b2c79280d60c0e8e19267a0cc9;p=linux-beck.git ixgbe: don't do arithmetic operations on bitmasks Make the calculation of eerd consistent between the read and write functions by using | instead of + for IXGBE_EEPROM_RW_REG_START Reported-by: Dan Carpenter Signed-off-by: Emil Tantilov Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c index 99e472ebaa75..f8d3deccc9b2 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c @@ -1125,7 +1125,7 @@ s32 ixgbe_read_eerd_buffer_generic(struct ixgbe_hw *hw, u16 offset, } for (i = 0; i < words; i++) { - eerd = ((offset + i) << IXGBE_EEPROM_RW_ADDR_SHIFT) + + eerd = ((offset + i) << IXGBE_EEPROM_RW_ADDR_SHIFT) | IXGBE_EEPROM_RW_REG_START; IXGBE_WRITE_REG(hw, IXGBE_EERD, eerd);