From: Thomas Monjalon Date: Thu, 14 Feb 2019 16:29:20 +0000 (+0100) Subject: ethdev: remove unused variable X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a3a4aba4b5c54e2a81daa792f49bb9743142c444;p=dpdk.git ethdev: remove unused variable When removing the old attach function, the racy variable for getting the last port id became unused. Fixes: c9cce42876f5 ("ethdev: remove deprecated attach/detach functions") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon Reviewed-by: Andrew Rybchenko --- diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index 0d192a24b2..85c1794968 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -48,7 +48,6 @@ int rte_eth_dev_logtype; static const char *MZ_RTE_ETH_DEV_DATA = "rte_eth_dev_data"; struct rte_eth_dev rte_eth_devices[RTE_MAX_ETHPORTS]; -static uint16_t eth_dev_last_created_port; /* spinlock for eth device callbacks */ static rte_spinlock_t rte_eth_dev_cb_lock = RTE_SPINLOCK_INITIALIZER; @@ -431,8 +430,6 @@ eth_dev_get(uint16_t port_id) eth_dev->data = &rte_eth_dev_shared_data->data[port_id]; - eth_dev_last_created_port = port_id; - return eth_dev; }