aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Keller <[email protected]>2018-07-31 03:41:44 -0700
committerJeff Kirsher <[email protected]>2018-08-07 12:20:00 -0700
commit4d9768237c19d7bcea8b284ec98c04a5846977be (patch)
tree8857c90986ef8ca83af724a924930372fcccb05c
parentf25848d4cdf2c5db5c506ca6553c79f97db19975 (diff)
i40e: remove unnecessary i variable causing -Wshadow warning
Commit c61c8fe1d592 ("i40e: Implement an ethtool private flag to stop LLDP in FW") added an extra for-loop which added a shadowing 'i' variable as the index. However, the local variable i already exists, and we already use it as a loop index. Additionally, at this point, there is no further use of the variable, so it's safe to simply overwrite the variable contents. This fixes a -Wshadow warning which has started being enabled on some distributions Signed-off-by: Jacob Keller <[email protected]> Reviewed-by: Patryk Malek <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_ethtool.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 9c380c0b0202..12d279a6eae8 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -4642,7 +4642,6 @@ flags_complete:
if (changed_flags & I40E_FLAG_DISABLE_FW_LLDP) {
if (pf->flags & I40E_FLAG_DISABLE_FW_LLDP) {
struct i40e_dcbx_config *dcbcfg;
- int i;
i40e_aq_stop_lldp(&pf->hw, true, NULL);
i40e_aq_set_dcb_parameters(&pf->hw, true, NULL);