net/hns3: fix debug build

Message ID 20210507122004.683239-1-thomas@monjalon.net (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series net/hns3: fix debug build |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation warning apply issues
ci/iol-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-mellanox-Functional fail Functional Testing issues

Commit Message

Thomas Monjalon May 7, 2021, 12:20 p.m. UTC
  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@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/net/hns3/hns3_rxtx.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

David Marchand May 7, 2021, 12:25 p.m. UTC | #1
On Fri, May 7, 2021 at 2:20 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 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")

>
> Reported-by: David Marchand <david.marchand@redhat.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Acked-by: David Marchand <david.marchand@redhat.com>
  
Thomas Monjalon May 7, 2021, 12:49 p.m. UTC | #2
07/05/2021 14:25, David Marchand:
> On Fri, May 7, 2021 at 2:20 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > 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")
> 
> >
> > Reported-by: David Marchand <david.marchand@redhat.com>
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> Acked-by: David Marchand <david.marchand@redhat.com>

Applied with added Fixes line, thanks
  
humin (Q) May 8, 2021, 12:47 a.m. UTC | #3
在 2021/5/7 20:25, David Marchand 写道:
> On Fri, May 7, 2021 at 2:20 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>>
>> 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")
> 
Well, sorry for late reply, thanks Thomas and David.
>>
>> Reported-by: David Marchand <david.marchand@redhat.com>
>> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> Acked-by: David Marchand <david.marchand@redhat.com>
> 
>
  

Patch

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