[dpdk-stable] patch 'net/bnxt: remove unnecessary variable assignment' has been queued to LTS release 17.11.10

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Dec 19 15:33:31 CET 2019


Hi,

FYI, your patch has been queued to LTS release 17.11.10

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/21/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From e561b13d96687d3c989170715cd997cfa9870e42 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Date: Wed, 9 Oct 2019 18:41:53 -0700
Subject: [PATCH] net/bnxt: remove unnecessary variable assignment

[ upstream commit cd30e6a7239ce48c8b618c87b10ee5db094d9853 ]

There is no need to assign return value to a temporary variable.
Instead return error directly in case of failure.

Fixes: 1fe427fd08ee ("net/bnxt: support enable/disable interrupt")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur at broadcom.com>
---
 drivers/net/bnxt/bnxt_rxq.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index cdc5bbfc9f..b42562f802 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -371,10 +371,9 @@ bnxt_rx_queue_intr_enable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id)
 
 	if (eth_dev->data->rx_queues) {
 		rxq = eth_dev->data->rx_queues[queue_id];
-		if (!rxq) {
-			rc = -EINVAL;
-			return rc;
-		}
+		if (!rxq)
+			return -EINVAL;
+
 		cpr = rxq->cp_ring;
 		B_CP_DB_ARM(cpr);
 	}
@@ -390,10 +389,9 @@ bnxt_rx_queue_intr_disable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id)
 
 	if (eth_dev->data->rx_queues) {
 		rxq = eth_dev->data->rx_queues[queue_id];
-		if (!rxq) {
-			rc = -EINVAL;
-			return rc;
-		}
+		if (!rxq)
+			return -EINVAL;
+
 		cpr = rxq->cp_ring;
 		B_CP_DB_DISARM(cpr);
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-19 14:32:28.877513746 +0000
+++ 0064-net-bnxt-remove-unnecessary-variable-assignment.patch	2019-12-19 14:32:26.141298539 +0000
@@ -1,13 +1,14 @@
-From cd30e6a7239ce48c8b618c87b10ee5db094d9853 Mon Sep 17 00:00:00 2001
+From e561b13d96687d3c989170715cd997cfa9870e42 Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
 Date: Wed, 9 Oct 2019 18:41:53 -0700
 Subject: [PATCH] net/bnxt: remove unnecessary variable assignment
 
+[ upstream commit cd30e6a7239ce48c8b618c87b10ee5db094d9853 ]
+
 There is no need to assign return value to a temporary variable.
 Instead return error directly in case of failure.
 
 Fixes: 1fe427fd08ee ("net/bnxt: support enable/disable interrupt")
-Cc: stable at dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
 Signed-off-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
@@ -17,10 +18,10 @@
  1 file changed, 6 insertions(+), 8 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
-index a46f96827c..e1ed360eff 100644
+index cdc5bbfc9f..b42562f802 100644
 --- a/drivers/net/bnxt/bnxt_rxq.c
 +++ b/drivers/net/bnxt/bnxt_rxq.c
-@@ -384,10 +384,9 @@ bnxt_rx_queue_intr_enable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id)
+@@ -371,10 +371,9 @@ bnxt_rx_queue_intr_enable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id)
  
  	if (eth_dev->data->rx_queues) {
  		rxq = eth_dev->data->rx_queues[queue_id];
@@ -32,9 +33,9 @@
 +			return -EINVAL;
 +
  		cpr = rxq->cp_ring;
- 		B_CP_DB_REARM(cpr, cpr->cp_raw_cons);
+ 		B_CP_DB_ARM(cpr);
  	}
-@@ -408,10 +407,9 @@ bnxt_rx_queue_intr_disable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id)
+@@ -390,10 +389,9 @@ bnxt_rx_queue_intr_disable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id)
  
  	if (eth_dev->data->rx_queues) {
  		rxq = eth_dev->data->rx_queues[queue_id];


More information about the stable mailing list