mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
e1000: remove unused and incorrect code
The e1000_clear_vfta function was triggering a warning in kbuild-bot testing. It's actually a bug but has no functional impact. drivers/net/ethernet/intel/e1000/e1000_hw.c:4415:58: warning: Same expression in both branches of ternary operator. [duplicateExpressionTernary] Fix this warning by removing the offending code and simplifying the routine to do exactly what it did before, no functional change. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
30cf856a69
commit
f2bf814a27
1 changed files with 1 additions and 9 deletions
|
@ -4401,17 +4401,9 @@ void e1000_write_vfta(struct e1000_hw *hw, u32 offset, u32 value)
|
||||||
static void e1000_clear_vfta(struct e1000_hw *hw)
|
static void e1000_clear_vfta(struct e1000_hw *hw)
|
||||||
{
|
{
|
||||||
u32 offset;
|
u32 offset;
|
||||||
u32 vfta_value = 0;
|
|
||||||
u32 vfta_offset = 0;
|
|
||||||
u32 vfta_bit_in_reg = 0;
|
|
||||||
|
|
||||||
for (offset = 0; offset < E1000_VLAN_FILTER_TBL_SIZE; offset++) {
|
for (offset = 0; offset < E1000_VLAN_FILTER_TBL_SIZE; offset++) {
|
||||||
/* If the offset we want to clear is the same offset of the
|
E1000_WRITE_REG_ARRAY(hw, VFTA, offset, 0);
|
||||||
* manageability VLAN ID, then clear all bits except that of the
|
|
||||||
* manageability unit
|
|
||||||
*/
|
|
||||||
vfta_value = (offset == vfta_offset) ? vfta_bit_in_reg : 0;
|
|
||||||
E1000_WRITE_REG_ARRAY(hw, VFTA, offset, vfta_value);
|
|
||||||
E1000_WRITE_FLUSH();
|
E1000_WRITE_FLUSH();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue