[dpdk-dev] [PATCH] net/hns3: fix debug build

Thomas Monjalon thomas at monjalon.net
Fri May 7 14:20:04 CEST 2021


The variable "dev" is not used in hns3_get_tx_prep_needed()
in the case of RTE_LIBRTE_ETHDEV_DEBUG:
drivers/net/hns3/hns3_rxtx.c:4213:45: error: unused parameter ‘dev’

Reported-by: David Marchand <david.marchand at redhat.com>
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
---
 drivers/net/hns3/hns3_rxtx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index a76b141891..1d7a769768 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -4213,6 +4213,7 @@ static bool
 hns3_get_tx_prep_needed(struct rte_eth_dev *dev)
 {
 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
+	RTE_SET_USED(dev);
 	/* always perform tx_prepare when debug */
 	return true;
 #else
-- 
2.31.1



More information about the dev mailing list