[RFC PATCH 14/19] net/e1000: fix build with shadow warnings enabled
Bruce Richardson
bruce.richardson at intel.com
Thu Nov 6 15:09:43 CET 2025
Variable "ret" was shadowed within the close function, so rename outer
variable to "retval" to clear the warnings.
Fixes: 62024eb82756 ("ethdev: change stop operation callback to return int")
Cc: stable at dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
drivers/net/intel/e1000/igc_ethdev.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/intel/e1000/igc_ethdev.c b/drivers/net/intel/e1000/igc_ethdev.c
index b9c91d2446..47a91fe38e 100644
--- a/drivers/net/intel/e1000/igc_ethdev.c
+++ b/drivers/net/intel/e1000/igc_ethdev.c
@@ -1313,14 +1313,14 @@ eth_igc_close(struct rte_eth_dev *dev)
struct e1000_hw *hw = IGC_DEV_PRIVATE_HW(dev);
struct igc_adapter *adapter = IGC_DEV_PRIVATE(dev);
int retry = 0;
- int ret = 0;
+ int retval = 0;
PMD_INIT_FUNC_TRACE();
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
if (!adapter->stopped)
- ret = eth_igc_stop(dev);
+ retval = eth_igc_stop(dev);
igc_flow_flush(dev, NULL);
igc_clear_all_filter(dev);
@@ -1343,7 +1343,7 @@ eth_igc_close(struct rte_eth_dev *dev)
/* Reset any pending lock */
igc_reset_swfw_lock(hw);
- return ret;
+ return retval;
}
static void
--
2.48.1
More information about the dev
mailing list