Home Home > GIT Browse > SLE12-SP4-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2019-06-10 12:55:00 +0200
committerMichal Suchanek <msuchanek@suse.de>2019-06-10 12:56:10 +0200
commit93d871745750eb6e05a96225b52484685f233701 (patch)
tree2f1ee7526ad9b7c41b9f196775e278907ddcd122
parent842fa5c056cc0d9b4ea8162e630cb474c043e395 (diff)
net/ibmvnic: Remove tests of member address (bsc#1137739).
-rw-r--r--patches.drivers/net-ibmvnic-Remove-tests-of-member-address.patch56
-rw-r--r--series.conf1
2 files changed, 57 insertions, 0 deletions
diff --git a/patches.drivers/net-ibmvnic-Remove-tests-of-member-address.patch b/patches.drivers/net-ibmvnic-Remove-tests-of-member-address.patch
new file mode 100644
index 0000000000..1cf3320ee8
--- /dev/null
+++ b/patches.drivers/net-ibmvnic-Remove-tests-of-member-address.patch
@@ -0,0 +1,56 @@
+From 390de1940441a72625283098dd0d9303d0ceb8fb Mon Sep 17 00:00:00 2001
+From: Wen Yang <wen.yang99@zte.com.cn>
+Date: Tue, 11 Dec 2018 12:20:46 +0800
+Subject: [PATCH] net/ibmvnic: Remove tests of member address
+
+References: bsc#1137739
+Patch-mainline: v5.0-rc1
+Git-commit: 390de1940441a72625283098dd0d9303d0ceb8fb
+
+The driver was checking for non-NULL address.
+- adapter->napi[i]
+
+This is pointless as these will be always non-NULL, since the
+'dapter->napi' is allocated in init_napi().
+It is safe to get rid of useless checks for addresses to fix the
+coccinelle warning:
+>>drivers/net/ethernet/ibm/ibmvnic.c: test of a variable/field address
+Since such statements always return true, they are redundant.
+
+Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
+CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+CC: Paul Mackerras <paulus@samba.org>
+CC: Michael Ellerman <mpe@ellerman.id.au>
+CC: Thomas Falcon <tlfalcon@linux.ibm.com>
+CC: John Allen <jallen@linux.ibm.com>
+CC: "David S. Miller" <davem@davemloft.net>
+CC: linuxppc-dev@lists.ozlabs.org
+CC: netdev@vger.kernel.org
+CC: linux-kernel@vger.kernel.org
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ drivers/net/ethernet/ibm/ibmvnic.c | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
+index ed50b8dee44f..14d00985f087 100644
+--- a/drivers/net/ethernet/ibm/ibmvnic.c
++++ b/drivers/net/ethernet/ibm/ibmvnic.c
+@@ -773,11 +773,8 @@ static void release_napi(struct ibmvnic_adapter *adapter)
+ return;
+
+ for (i = 0; i < adapter->num_active_rx_napi; i++) {
+- if (&adapter->napi[i]) {
+- netdev_dbg(adapter->netdev,
+- "Releasing napi[%d]\n", i);
+- netif_napi_del(&adapter->napi[i]);
+- }
++ netdev_dbg(adapter->netdev, "Releasing napi[%d]\n", i);
++ netif_napi_del(&adapter->napi[i]);
+ }
+
+ kfree(adapter->napi);
+--
+2.20.1
+
diff --git a/series.conf b/series.conf
index 9cb1a92ce6..7df807908b 100644
--- a/series.conf
+++ b/series.conf
@@ -20631,6 +20631,7 @@
patches.fixes/0001-net-mlx5-Release-resource-on-error-flow.patch
patches.fixes/0001-net-mlx5-Return-success-for-PAGE_FAULT_RESUME-in-int.patch
patches.fixes/0001-net-mlx5-Use-multi-threaded-workqueue-for-page-fault.patch
+ patches.drivers/net-ibmvnic-Remove-tests-of-member-address.patch
patches.fixes/indirect-call-wrappers-helpers-to-speed-up-indirect-.patch
patches.fixes/net-use-indirect-call-wrappers-at-GRO-network-layer.patch
patches.fixes/net-use-indirect-call-wrappers-at-GRO-transport-laye.patch