mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
ixgbe: drop unnecessary casts to u16 / int
Remove unnecessary casts of constant values to u16. C's integer promotion rules make them ints no matter what. Additionally drop cast from u16 to int in return statements. Signed-off-by: Jacek Kowalski <jacek@jacekk.info> Suggested-by: Simon Horman <horms@kernel.org> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel) Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
parent
d45dda4914
commit
396a788bca
|
|
@ -1739,9 +1739,9 @@ int ixgbe_calc_eeprom_checksum_generic(struct ixgbe_hw *hw)
|
|||
}
|
||||
}
|
||||
|
||||
checksum = (u16)IXGBE_EEPROM_SUM - checksum;
|
||||
checksum = IXGBE_EEPROM_SUM - checksum;
|
||||
|
||||
return (int)checksum;
|
||||
return checksum;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -373,9 +373,9 @@ static int ixgbe_calc_eeprom_checksum_X540(struct ixgbe_hw *hw)
|
|||
}
|
||||
}
|
||||
|
||||
checksum = (u16)IXGBE_EEPROM_SUM - checksum;
|
||||
checksum = IXGBE_EEPROM_SUM - checksum;
|
||||
|
||||
return (int)checksum;
|
||||
return checksum;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1060,9 +1060,9 @@ static int ixgbe_calc_checksum_X550(struct ixgbe_hw *hw, u16 *buffer,
|
|||
return status;
|
||||
}
|
||||
|
||||
checksum = (u16)IXGBE_EEPROM_SUM - checksum;
|
||||
checksum = IXGBE_EEPROM_SUM - checksum;
|
||||
|
||||
return (int)checksum;
|
||||
return checksum;
|
||||
}
|
||||
|
||||
/** ixgbe_calc_eeprom_checksum_X550 - Calculates and returns the checksum
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user