Skip to contentSkip to conversation

net/bnxt: address unused variable warning

PATCH In review Ajit Khaparde 1 participant 2 messages Mar 11, 2021 – Mar 12, 2021 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/bnxt: address unused variable warning

Fix a potential unused variable warning when compiling on PPC.

---
 drivers/net/bnxt/bnxt_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/bnxt/bnxt_ethdev.c +2 -1
index 3f28e0ea45..b561ff5520 100644
@@ -3079,7 +3079,7 @@ bnxt_rx_descriptor_status_op(void *rx_queue, uint16_t offset)
 	struct bnxt_rx_queue *rxq = rx_queue;
 	struct bnxt_cp_ring_info *cpr;
 	struct bnxt_rx_ring_info *rxr;
-	uint32_t desc, cons, raw_cons;
+	uint32_t desc, raw_cons;
 	struct bnxt *bp = rxq->bp;
 	struct rx_pkt_cmpl *rxcmp;
 	int rc;
@@ -3101,6 +3101,7 @@ bnxt_rx_descriptor_status_op(void *rx_queue, uint16_t offset)
 #if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	if (bp->flags & BNXT_FLAG_RX_VECTOR_PKT_MODE) {
 		struct rx_pkt_cmpl *rxcmp;
+		uint32_t cons;
 
 		/* Check status of completion descriptor. */
 		raw_cons = cpr->cp_raw_cons +
Signature · 1 line
2.21.1 (Apple Git-122.3)
#1 lore raw
Quoted 4 lines · Ajit Khaparde

Fix a potential unused variable warning when compiling on PPC.

Squashed with previous patch "net/bnxt: fix Rx descriptor status"

https://inbox.dpdk.org/dev/[email protected]/

Quoted 28 lines
---
 drivers/net/bnxt/bnxt_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/bnxt/bnxt_ethdev.c +2 -2
index 3f28e0ea45..b561ff5520 100644
@@ -3079,7 +3079,7 @@ bnxt_rx_descriptor_status_op(void *rx_queue, uint16_t offset)
        struct bnxt_rx_queue *rxq = rx_queue;
        struct bnxt_cp_ring_info *cpr;
        struct bnxt_rx_ring_info *rxr;
-       uint32_t desc, cons, raw_cons;
+       uint32_t desc, raw_cons;
        struct bnxt *bp = rxq->bp;
        struct rx_pkt_cmpl *rxcmp;
        int rc;
@@ -3101,6 +3101,7 @@ bnxt_rx_descriptor_status_op(void *rx_queue, uint16_t offset)
 #if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
        if (bp->flags & BNXT_FLAG_RX_VECTOR_PKT_MODE) {
                struct rx_pkt_cmpl *rxcmp;
+               uint32_t cons;
 
                /* Check status of completion descriptor. */
                raw_cons = cpr->cp_raw_cons +
--

2.21.1 (Apple Git-122.3)