mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
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 <dan.carpenter@oracle.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
20967f4202
commit
d01115752f
1 changed files with 1 additions and 1 deletions
|
@ -1125,7 +1125,7 @@ s32 ixgbe_read_eerd_buffer_generic(struct ixgbe_hw *hw, u16 offset,
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < words; i++) {
|
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_EEPROM_RW_REG_START;
|
||||||
|
|
||||||
IXGBE_WRITE_REG(hw, IXGBE_EERD, eerd);
|
IXGBE_WRITE_REG(hw, IXGBE_EERD, eerd);
|
||||||
|
|
Loading…
Reference in a new issue