aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/brocade
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2018-07-31 03:41:45 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-08-07 12:20:15 -0700
commit6e2feaa344e651bc1a1ec224018827e36192c039 (patch)
tree25aa8070c48e202644bae68c2ba9f8c18bffaaec /drivers/net/ethernet/brocade
parenti40e: remove unnecessary i variable causing -Wshadow warning (diff)
downloadlinux-dev-6e2feaa344e651bc1a1ec224018827e36192c039.tar.xz
linux-dev-6e2feaa344e651bc1a1ec224018827e36192c039.zip
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/brocade')
0 files changed, 0 insertions, 0 deletions