[dpdk-dev] [PATCH v6 01/19] net/ngbe: add build and doc infrastructure

Andrew Rybchenko andrew.rybchenko at oktetlabs.ru
Mon Jul 5 10:54:32 CEST 2021


On 7/5/21 5:52 AM, Jiawen Wu wrote:
> On July 2, 2021 9:08 PM, Andrew Rybchenko wrote:
>> On 6/17/21 1:59 PM, Jiawen Wu wrote:
>>> Adding bare minimum PMD library and doc build infrastructure and claim
>>> the maintainership for ngbe PMD.
>>>
>>> Signed-off-by: Jiawen Wu <jiawenwu at trustnetic.com>
>>
>> Just one nit below.
>>
>> [snip]
>>
>>> diff --git a/drivers/net/ngbe/ngbe_ethdev.c
>>> b/drivers/net/ngbe/ngbe_ethdev.c new file mode 100644 index
>>> 0000000000..f8e19066de
>>> --- /dev/null
>>> +++ b/drivers/net/ngbe/ngbe_ethdev.c
>>> @@ -0,0 +1,29 @@
>>> +/* SPDX-License-Identifier: BSD-3-Clause
>>> + * Copyright(c) 2018-2020 Beijing WangXun Technology Co., Ltd.
>>> + * Copyright(c) 2010-2017 Intel Corporation  */
>>> +
>>> +#include <errno.h>
>>> +#include <rte_common.h>
>>> +#include <ethdev_pci.h>
>>> +
>>> +static int
>>> +eth_ngbe_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
>>> +		struct rte_pci_device *pci_dev)
>>> +{
>>> +	RTE_SET_USED(pci_dev);
>>> +	return -EINVAL;
>>> +}
>>> +
>>> +static int eth_ngbe_pci_remove(struct rte_pci_device *pci_dev) {
>>> +	RTE_SET_USED(pci_dev);
>>> +	return -EINVAL;
>>> +}
>>
>> Why is different style of unused suppression is used
>> above: __rte_unused vs RTE_SET_USED'?
>>
>> [snip]
> 
> I guess, 'pci_drv' will not be used in future implement the probe function.
> So I just gave '__rte_unused' when I separated the patches.
> Does this have to be corrected?

You never know. So, it is better to be consistent. Yes, please.



More information about the dev mailing list