net/hns3: fix debug build
Checks
Commit Message
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
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>
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
在 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>
>
>
@@ -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