net/hns3: fix debug build
authorThomas Monjalon <thomas@monjalon.net>
Fri, 7 May 2021 12:14:13 +0000 (14:14 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 7 May 2021 13:19:54 +0000 (15:19 +0200)
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’

Fixes: d7ec2c076579 ("net/hns3: select Tx prepare based on Tx offload")
Cc: stable@dpdk.org
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
drivers/net/hns3/hns3_rxtx.c

index a76b141..1d7a769 100644 (file)
@@ -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