diff options
author | Jacob Keller <jacob.e.keller@intel.com> | 2018-07-31 03:41:45 -0700 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2018-08-07 12:20:15 -0700 |
commit | 6e2feaa344e651bc1a1ec224018827e36192c039 (patch) | |
tree | 25aa8070c48e202644bae68c2ba9f8c18bffaaec /drivers/net/ethernet/intel/i40evf | |
parent | 4d9768237c19d7bcea8b284ec98c04a5846977be (diff) |
i40e: fix warning about shadowed ring parameter
In commit 147e81ec7568 ("i40e: Test memory before ethtool alloc succeeds")
code was added to handle ring allocation on systems with low memory.
It shadowed the ring parameter pointer by introducing a local ring
pointer inside the for loop. Most of the code in the loop already just
accessed the ring via &rx_rings[i]. Since most of the code already does
this, just remove the local variable.
If someone considers it worth keeping a local around, they should use it
for the whole section instead of just a couple of accesses.
This fixes a warning when -Wshadow is enabled
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40evf')
0 files changed, 0 insertions, 0 deletions