From: Kalesh AP <kalesh-anakkur.pura...@broadcom.com>

Use PCI_PRI_FMT instead of "%04x:%02x:%02x:%02x" print format.

Signed-off-by: Kalesh AP <kalesh-anakkur.pura...@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khapa...@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 6 +++---
 drivers/net/bnxt/bnxt_ring.c | 2 +-
 drivers/net/bnxt/bnxt_vnic.c | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 09a73286b..4c0fac6be 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1104,7 +1104,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
        dev_caps_cfg = rte_le_to_cpu_32(resp->dev_caps_cfg);
 
        if (bp->max_resp_len != max_resp_len) {
-               sprintf(type, "bnxt_hwrm_%04x:%02x:%02x:%02x",
+               sprintf(type, "bnxt_hwrm_" PCI_PRI_FMT,
                        bp->pdev->addr.domain, bp->pdev->addr.bus,
                        bp->pdev->addr.devid, bp->pdev->addr.function);
 
@@ -1139,7 +1139,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
             (dev_caps_cfg &
              HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_SHORT_CMD_REQUIRED)) ||
            bp->hwrm_max_ext_req_len > HWRM_MAX_REQ_LEN) {
-               sprintf(type, "bnxt_hwrm_short_%04x:%02x:%02x:%02x",
+               sprintf(type, "bnxt_hwrm_short_" PCI_PRI_FMT,
                        bp->pdev->addr.domain, bp->pdev->addr.bus,
                        bp->pdev->addr.devid, bp->pdev->addr.function);
 
@@ -2574,7 +2574,7 @@ int bnxt_alloc_hwrm_resources(struct bnxt *bp)
        struct rte_pci_device *pdev = bp->pdev;
        char type[RTE_MEMZONE_NAMESIZE];
 
-       sprintf(type, "bnxt_hwrm_%04x:%02x:%02x:%02x", pdev->addr.domain,
+       sprintf(type, "bnxt_hwrm_" PCI_PRI_FMT, pdev->addr.domain,
                pdev->addr.bus, pdev->addr.devid, pdev->addr.function);
        bp->max_resp_len = HWRM_MAX_RESP_LEN;
        bp->hwrm_cmd_resp_addr = rte_malloc(type, bp->max_resp_len, 0);
diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index 1999cd786..24a947f27 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -196,7 +196,7 @@ int bnxt_alloc_rings(struct bnxt *bp, uint16_t qidx,
        total_alloc_len += tpa_info_len;
 
        snprintf(mz_name, RTE_MEMZONE_NAMESIZE,
-                "bnxt_%04x:%02x:%02x:%02x-%04x_%s", pdev->addr.domain,
+                "bnxt_" PCI_PRI_FMT "-%04x_%s", pdev->addr.domain,
                 pdev->addr.bus, pdev->addr.devid, pdev->addr.function, qidx,
                 suffix);
        mz_name[RTE_MEMZONE_NAMESIZE - 1] = 0;
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index bc054a8e0..326c0d1b6 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -136,7 +136,7 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp)
 
        max_vnics = bp->max_vnics;
        snprintf(mz_name, RTE_MEMZONE_NAMESIZE,
-                "bnxt_%04x:%02x:%02x:%02x_vnicattr", pdev->addr.domain,
+                "bnxt_" PCI_PRI_FMT "_vnicattr", pdev->addr.domain,
                 pdev->addr.bus, pdev->addr.devid, pdev->addr.function);
        mz_name[RTE_MEMZONE_NAMESIZE - 1] = 0;
        mz = rte_memzone_lookup(mz_name);
-- 
2.21.1 (Apple Git-122.3)

Reply via email to