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
commit033d9a3b140eeef2b966365c20220427c98e44ab (patch)
tree1e42c5459d9373958232df72a3c3e8ec30199f8f
parent57f49532b0cfdecc6571e638bb3a8cec9543443e (diff)
netvsc: remove unnecessary cast of void pointer (fate#323887).
-rw-r--r--patches.suse/msft-hv-1431-netvsc-remove-unnecessary-cast-of-void-pointer.patch43
-rw-r--r--series.conf1
2 files changed, 44 insertions, 0 deletions
diff --git a/patches.suse/msft-hv-1431-netvsc-remove-unnecessary-cast-of-void-pointer.patch b/patches.suse/msft-hv-1431-netvsc-remove-unnecessary-cast-of-void-pointer.patch
new file mode 100644
index 0000000000..f4a35a6b50
--- /dev/null
+++ b/patches.suse/msft-hv-1431-netvsc-remove-unnecessary-cast-of-void-pointer.patch
@@ -0,0 +1,43 @@
+From: stephen hemminger <stephen@networkplumber.org>
+Date: Wed, 9 Aug 2017 17:46:09 -0700
+Patch-mainline: v4.14-rc1
+Subject: netvsc: remove unnecessary cast of void pointer
+Git-commit: 00f5024e821e60c0d1d7df44f2577a2c277b5cc9
+References: fate#323887
+
+Assignment to a typed pointer is sufficient in C.
+No cast 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 | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 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
+@@ -523,9 +523,9 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
+
+ rndis_msg_size += NDIS_VLAN_PPI_SIZE;
+ ppi = init_ppi_data(rndis_msg, NDIS_VLAN_PPI_SIZE,
+- IEEE_8021Q_INFO);
+- vlan = (struct ndis_pkt_8021q_info *)((void *)ppi +
+- ppi->ppi_offset);
++ IEEE_8021Q_INFO);
++
++ vlan = (void *)ppi + ppi->ppi_offset;
+ vlan->vlanid = skb->vlan_tci & VLAN_VID_MASK;
+ vlan->pri = (skb->vlan_tci & VLAN_PRIO_MASK) >>
+ VLAN_PRIO_SHIFT;
+@@ -538,8 +538,7 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
+ ppi = init_ppi_data(rndis_msg, NDIS_LSO_PPI_SIZE,
+ TCP_LARGESEND_PKTINFO);
+
+- lso_info = (struct ndis_tcp_lso_info *)((void *)ppi +
+- ppi->ppi_offset);
++ lso_info = (void *)ppi + ppi->ppi_offset;
+
+ lso_info->lso_v2_transmit.type = NDIS_TCP_LARGE_SEND_OFFLOAD_V2_TYPE;
+ if (skb->protocol == htons(ETH_P_IP)) {
diff --git a/series.conf b/series.conf
index c944911f3f..76d3d90521 100644
--- a/series.conf
+++ b/series.conf
@@ -1681,6 +1681,7 @@
patches.suse/msft-hv-1428-netvsc-check-error-return-when-restoring-channels-an.patch
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/suse-hv-guest-os-id.patch
patches.suse/suse-hv-kvp_on_msg.dbg.patch