net/nfp: use macro PCI_PRI_FMT for PCI log format
diff mbox series

Message ID 1578923375-23820-1-git-send-email-wangyunjian@huawei.com
State Accepted
Delegated to: Ferruh Yigit
Headers show
Series
  • net/nfp: use macro PCI_PRI_FMT for PCI log format
Related show

Checks

Context Check Description
ci/travis-robot success Travis build: passed
ci/iol-testing success Testing PASS
ci/Intel-compilation fail Compilation issues
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Yunjian Wang Jan. 13, 2020, 1:49 p.m. UTC
Use PCI_PRI_FMT instead of "%04d:%02d:%02d:%d" print format.

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
 drivers/net/nfp/nfp_net.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Heinrich Kuhn Jan. 16, 2020, 8:12 a.m. UTC | #1
> Use PCI_PRI_FMT instead of "%04d:%02d:%02d:%d" print format.
> 
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> ---
>  drivers/net/nfp/nfp_net.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
> index 3aafa7f80..64d9d218d 100644
> --- a/drivers/net/nfp/nfp_net.c
> +++ b/drivers/net/nfp/nfp_net.c
> @@ -1377,9 +1377,9 @@ nfp_net_dev_link_status_print(struct rte_eth_dev *dev)
>  		PMD_DRV_LOG(INFO, " Port %d: Link Down",
>  			    dev->data->port_id);
>  
> -	PMD_DRV_LOG(INFO, "PCI Address: %04d:%02d:%02d:%d",
> -		pci_dev->addr.domain, pci_dev->addr.bus,
> -		pci_dev->addr.devid, pci_dev->addr.function);
> +	PMD_DRV_LOG(INFO, "PCI Address: " PCI_PRI_FMT,
> +		    pci_dev->addr.domain, pci_dev->addr.bus,
> +		    pci_dev->addr.devid, pci_dev->addr.function);
>  }
>  
>  /* Interrupt configuration and handling */
> 

Acked-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Ferruh Yigit Jan. 16, 2020, 6:41 p.m. UTC | #2
On 1/16/2020 8:12 AM, Heinrich Kuhn wrote:
> 
>> Use PCI_PRI_FMT instead of "%04d:%02d:%02d:%d" print format.
>>
>> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
>> ---
>>  drivers/net/nfp/nfp_net.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
>> index 3aafa7f80..64d9d218d 100644
>> --- a/drivers/net/nfp/nfp_net.c
>> +++ b/drivers/net/nfp/nfp_net.c
>> @@ -1377,9 +1377,9 @@ nfp_net_dev_link_status_print(struct rte_eth_dev *dev)
>>  		PMD_DRV_LOG(INFO, " Port %d: Link Down",
>>  			    dev->data->port_id);
>>  
>> -	PMD_DRV_LOG(INFO, "PCI Address: %04d:%02d:%02d:%d",
>> -		pci_dev->addr.domain, pci_dev->addr.bus,
>> -		pci_dev->addr.devid, pci_dev->addr.function);
>> +	PMD_DRV_LOG(INFO, "PCI Address: " PCI_PRI_FMT,
>> +		    pci_dev->addr.domain, pci_dev->addr.bus,
>> +		    pci_dev->addr.devid, pci_dev->addr.function);
>>  }
>>  
>>  /* Interrupt configuration and handling */
>>
> 
> Acked-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
> 

Applied to dpdk-next-net/master, thanks.

Patch
diff mbox series

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 3aafa7f80..64d9d218d 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1377,9 +1377,9 @@  nfp_net_dev_link_status_print(struct rte_eth_dev *dev)
 		PMD_DRV_LOG(INFO, " Port %d: Link Down",
 			    dev->data->port_id);
 
-	PMD_DRV_LOG(INFO, "PCI Address: %04d:%02d:%02d:%d",
-		pci_dev->addr.domain, pci_dev->addr.bus,
-		pci_dev->addr.devid, pci_dev->addr.function);
+	PMD_DRV_LOG(INFO, "PCI Address: " PCI_PRI_FMT,
+		    pci_dev->addr.domain, pci_dev->addr.bus,
+		    pci_dev->addr.devid, pci_dev->addr.function);
 }
 
 /* Interrupt configuration and handling */