* [PATCH] hv_netvsc: remove unused variable in netvsc_send()
@ 2015-05-04 17:57 Jerry Snitselaar
2015-05-04 21:44 ` Haiyang Zhang
2015-05-05 21:31 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Jerry Snitselaar @ 2015-05-04 17:57 UTC (permalink / raw)
To: linux-kernel; +Cc: netdev, devel, Haiyang Zhang, K. Y. Srinivasan
With commit b56fc3c53654 ("hv_netvsc: Fix a bug in netvsc_start_xmit()"),
skb variable is no longer used in netvsc_send. Remove variable and dead
code that depended on it.
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
---
drivers/net/hyperv/netvsc.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 2d9ef53..ea091bc 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -826,7 +826,6 @@ int netvsc_send(struct hv_device *device,
u16 q_idx = packet->q_idx;
u32 pktlen = packet->total_data_buflen, msd_len = 0;
unsigned int section_index = NETVSC_INVALID_INDEX;
- struct sk_buff *skb = NULL;
unsigned long flag;
struct multi_send_data *msdp;
struct hv_netvsc_packet *msd_send = NULL, *cur_send = NULL;
@@ -924,12 +923,8 @@ int netvsc_send(struct hv_device *device,
if (cur_send)
ret = netvsc_send_pkt(cur_send, net_device);
- if (ret != 0) {
- if (section_index != NETVSC_INVALID_INDEX)
- netvsc_free_send_slot(net_device, section_index);
- } else if (skb) {
- dev_kfree_skb_any(skb);
- }
+ if (ret != 0 && section_index != NETVSC_INVALID_INDEX)
+ netvsc_free_send_slot(net_device, section_index);
return ret;
}
--
2.4.0.rc3.3.g6eb1401
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] hv_netvsc: remove unused variable in netvsc_send()
2015-05-04 17:57 [PATCH] hv_netvsc: remove unused variable in netvsc_send() Jerry Snitselaar
@ 2015-05-04 21:44 ` Haiyang Zhang
2015-05-05 21:31 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Haiyang Zhang @ 2015-05-04 21:44 UTC (permalink / raw)
To: Jerry Snitselaar, linux-kernel; +Cc: netdev, devel, KY Srinivasan
> -----Original Message-----
> From: Jerry Snitselaar [mailto:jsnitsel@redhat.com]
> Sent: Monday, May 4, 2015 10:57 AM
> To: linux-kernel@vger.kernel.org
> Cc: netdev@vger.kernel.org; devel@linuxdriverproject.org; Haiyang Zhang;
> KY Srinivasan
> Subject: [PATCH] hv_netvsc: remove unused variable in netvsc_send()
>
> With commit b56fc3c53654 ("hv_netvsc: Fix a bug in netvsc_start_xmit()"),
> skb variable is no longer used in netvsc_send. Remove variable and dead
> code that depended on it.
>
> Cc: Haiyang Zhang <haiyangz@microsoft.com>
> Cc: K. Y. Srinivasan <kys@microsoft.com>
> Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
Thanks.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] hv_netvsc: remove unused variable in netvsc_send()
2015-05-04 17:57 [PATCH] hv_netvsc: remove unused variable in netvsc_send() Jerry Snitselaar
2015-05-04 21:44 ` Haiyang Zhang
@ 2015-05-05 21:31 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2015-05-05 21:31 UTC (permalink / raw)
To: jsnitsel; +Cc: linux-kernel, netdev, devel, haiyangz, kys
From: Jerry Snitselaar <jsnitsel@redhat.com>
Date: Mon, 4 May 2015 10:57:16 -0700
> With commit b56fc3c53654 ("hv_netvsc: Fix a bug in netvsc_start_xmit()"),
> skb variable is no longer used in netvsc_send. Remove variable and dead
> code that depended on it.
>
> Cc: Haiyang Zhang <haiyangz@microsoft.com>
> Cc: K. Y. Srinivasan <kys@microsoft.com>
> Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-05 21:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-04 17:57 [PATCH] hv_netvsc: remove unused variable in netvsc_send() Jerry Snitselaar
2015-05-04 21:44 ` Haiyang Zhang
2015-05-05 21:31 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®