Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlaf Hering <ohering@suse.de>2017-10-20 12:20:33 +0200
committerOlaf Hering <ohering@suse.de>2017-10-20 12:23:27 +0200
commitce5c61d62236a0331bcf6a2bdf95bdcbd2d70e1e (patch)
tree4f503837b0ae2dc3f6bc528e79ed253a4c06137b
parent033d9a3b140eeef2b966365c20220427c98e44ab (diff)
netvsc: remove unnecessary check for NULL hdr (fate#323887).
-rw-r--r--patches.suse/msft-hv-1432-netvsc-remove-unnecessary-check-for-NULL-hdr.patch34
-rw-r--r--series.conf1
2 files changed, 35 insertions, 0 deletions
diff --git a/patches.suse/msft-hv-1432-netvsc-remove-unnecessary-check-for-NULL-hdr.patch b/patches.suse/msft-hv-1432-netvsc-remove-unnecessary-check-for-NULL-hdr.patch
new file mode 100644
index 0000000000..376cef756e
--- /dev/null
+++ b/patches.suse/msft-hv-1432-netvsc-remove-unnecessary-check-for-NULL-hdr.patch
@@ -0,0 +1,34 @@
+From: stephen hemminger <stephen@networkplumber.org>
+Date: Wed, 9 Aug 2017 17:46:10 -0700
+Patch-mainline: v4.14-rc1
+Subject: netvsc: remove unnecessary check for NULL hdr
+Git-commit: ea5a32c00bcacce1d8ac834a70a82f95a1c79425
+References: fate#323887
+
+The function init_page_array is always called with a valid pointer
+to RNDIS header. No check for NULL is needed.
+
+Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Olaf Hering <ohering@suse.de>
+---
+ drivers/net/hyperv/netvsc_drv.c | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
+--- a/drivers/net/hyperv/netvsc_drv.c
++++ b/drivers/net/hyperv/netvsc_drv.c
+@@ -333,10 +333,9 @@ static u32 init_page_array(void *hdr, u32 len, struct sk_buff *skb,
+ * 2. skb linear data
+ * 3. skb fragment data
+ */
+- if (hdr != NULL)
+- slots_used += fill_pg_buf(virt_to_page(hdr),
+- offset_in_page(hdr),
+- len, &pb[slots_used]);
++ slots_used += fill_pg_buf(virt_to_page(hdr),
++ offset_in_page(hdr),
++ len, &pb[slots_used]);
+
+ packet->rmsg_size = len;
+ packet->rmsg_pgcnt = slots_used;
diff --git a/series.conf b/series.conf
index 76d3d90521..1e135bdaef 100644
--- a/series.conf
+++ b/series.conf
@@ -1682,6 +1682,7 @@
patches.suse/msft-hv-1429-netvsc-no-need-to-allocate-send-receive-on-numa-node.patch
patches.suse/msft-hv-1430-netvsc-whitespace-cleanup.patch
patches.suse/msft-hv-1431-netvsc-remove-unnecessary-cast-of-void-pointer.patch
+ patches.suse/msft-hv-1432-netvsc-remove-unnecessary-check-for-NULL-hdr.patch
patches.suse/suse-hv-guest-os-id.patch
patches.suse/suse-hv-kvp_on_msg.dbg.patch