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:29 +0200
commit3cf46ece6a3553db462019daaa81b6b598ef5bf5 (patch)
treedcaec82ca150c9204e76891b9832447d827282a9
parentac370302bd1f70929d73a3feb452b368e889693e (diff)
hv_netvsc: Simplify num_chn checking in
rndis_filter_device_add() (fate#323887).
-rw-r--r--patches.suse/msft-hv-1458-hv_netvsc-Simplify-num_chn-checking-in-rndis_filter_.patch40
-rw-r--r--series.conf1
2 files changed, 41 insertions, 0 deletions
diff --git a/patches.suse/msft-hv-1458-hv_netvsc-Simplify-num_chn-checking-in-rndis_filter_.patch b/patches.suse/msft-hv-1458-hv_netvsc-Simplify-num_chn-checking-in-rndis_filter_.patch
new file mode 100644
index 0000000000..3a298f1e76
--- /dev/null
+++ b/patches.suse/msft-hv-1458-hv_netvsc-Simplify-num_chn-checking-in-rndis_filter_.patch
@@ -0,0 +1,40 @@
+From: Haiyang Zhang <haiyangz@microsoft.com>
+Date: Fri, 1 Sep 2017 14:30:05 -0700
+Patch-mainline: v4.14-rc1
+Subject: hv_netvsc: Simplify num_chn checking in rndis_filter_device_add()
+Git-commit: 5c4217d05d3258fa9999ad959c9b6da791b70bfa
+References: fate#323887
+
+The minus one and assignment to a local variable is not necessary.
+This patch simplifies it.
+
+Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Olaf Hering <ohering@suse.de>
+---
+ drivers/net/hyperv/rndis_filter.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c
+--- a/drivers/net/hyperv/rndis_filter.c
++++ b/drivers/net/hyperv/rndis_filter.c
+@@ -1067,7 +1067,7 @@ struct netvsc_device *rndis_filter_device_add(struct hv_device *dev,
+ struct ndis_recv_scale_cap rsscap;
+ u32 rsscap_size = sizeof(struct ndis_recv_scale_cap);
+ unsigned int gso_max_size = GSO_MAX_SIZE;
+- u32 mtu, size, num_rss_qs;
++ u32 mtu, size;
+ const struct cpumask *node_cpu_mask;
+ u32 num_possible_rss_qs;
+ int i, ret;
+@@ -1215,8 +1215,8 @@ struct netvsc_device *rndis_filter_device_add(struct hv_device *dev,
+ net_device->num_chn);
+
+ atomic_set(&net_device->open_chn, 1);
+- num_rss_qs = net_device->num_chn - 1;
+- if (num_rss_qs == 0)
++
++ if (net_device->num_chn == 1)
+ return net_device;
+
+ for (i = 1; i < net_device->num_chn; i++) {
diff --git a/series.conf b/series.conf
index 2ad7260f87..ace79fce07 100644
--- a/series.conf
+++ b/series.conf
@@ -1706,6 +1706,7 @@
patches.suse/msft-hv-1455-netvsc-cleanup-datapath-switch.patch
patches.suse/msft-hv-1456-netvsc-allow-driver-to-be-removed-even-if-VF-is-pres.patch
patches.suse/msft-hv-1457-hv_netvsc-Clean-up-an-unused-parameter-in-rndis_filt.patch
+ patches.suse/msft-hv-1458-hv_netvsc-Simplify-num_chn-checking-in-rndis_filter_.patch
patches.suse/suse-hv-guest-os-id.patch
patches.suse/suse-hv-kvp_on_msg.dbg.patch