diff mbox series

net/bnxt: address unused variable warning

Message ID 20210311233005.67032-1-ajit.khaparde@broadcom.com (mailing list archive)
State Accepted
Delegated to: Ajit Khaparde
Headers show
Series net/bnxt: address unused variable warning | expand

Checks

Context Check Description
ci/Intel-compilation fail apply issues
ci/checkpatch success coding style OK

Commit Message

Ajit Khaparde March 11, 2021, 11:30 p.m. UTC
Fix a potential unused variable warning when compiling on PPC.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Ajit Khaparde March 12, 2021, 3:22 p.m. UTC | #1
On Thu, Mar 11, 2021 at 3:30 PM Ajit Khaparde
<ajit.khaparde@broadcom.com> wrote:
>
> Fix a potential unused variable warning when compiling on PPC.
>
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Squashed with previous patch "net/bnxt: fix Rx descriptor status"

https://inbox.dpdk.org/dev/20210311200458.40432-1-ajit.khaparde@broadcom.com/

> ---
>  drivers/net/bnxt/bnxt_ethdev.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> index 3f28e0ea45..b561ff5520 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -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)
>
diff mbox series

Patch

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 3f28e0ea45..b561ff5520 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -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 +