]> Git Repo - linux.git/commitdiff
ixgbe: don't do arithmetic operations on bitmasks
authorEmil Tantilov <[email protected]>
Tue, 5 Feb 2013 09:43:26 +0000 (09:43 +0000)
committerJeff Kirsher <[email protected]>
Thu, 18 Apr 2013 04:24:59 +0000 (21:24 -0700)
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 <[email protected]>
Signed-off-by: Emil Tantilov <[email protected]>
Tested-by: Phil Schmitt <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c

index 99e472ebaa750c2a1a90bdd089ba6559d62e4cb3..f8d3deccc9b2c8071fc269b030f909feac65565e 100644 (file)
@@ -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);
This page took 0.065443 seconds and 4 git commands to generate.