Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1413326 > unrolled thread

[PATCH net-next v2 0/5] hv_netvsc: cleanup after untangling the pointer mess

Started byVitaly Kuznetsov <vkuznets@redhat.com>
First post2016-06-03 18:00 +0200
Last post2016-06-06 05:20 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH net-next v2 0/5] hv_netvsc: cleanup after untangling the pointer mess Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-06-03 18:00 +0200
    [PATCH net-next v2 1/5] hv_netvsc: remove redundant assignment in netvsc_recv_callback() Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-06-03 18:00 +0200
    Re: [PATCH net-next v2 0/5] hv_netvsc: cleanup after untangling  the pointer mess David Miller <davem@davemloft.net> - 2016-06-06 05:20 +0200

#1413326 — [PATCH net-next v2 0/5] hv_netvsc: cleanup after untangling the pointer mess

FromVitaly Kuznetsov <vkuznets@redhat.com>
Date2016-06-03 18:00 +0200
Subject[PATCH net-next v2 0/5] hv_netvsc: cleanup after untangling the pointer mess
Message-ID<rFZFU-5aq-15@gated-at.bofh.it>
Changes since v1:
- resend when net-next is open [David Miller]
- rebased to current net-next.

After we made traveling through our internal structures explicit it became
obvious that some functions take arguments they don't need just to do
redundant pointer travel and get to what they really need while their
callers already have the required information.

This is just a cleanup series with no functional changes intended. It
doesn't pretend to be complete, additional cleanup of other functions may
follow.

Vitaly Kuznetsov (5):
  hv_netvsc: remove redundant assignment in netvsc_recv_callback()
  hv_netvsc: introduce {net,hv}_device_to_netvsc_device() helpers
  hv_netvsc: pass struct netvsc_device to rndis_filter_{open,close}()
  hv_netvsc: pass struct net_device to rndis_filter_set_device_mac()
  hv_netvsc: pass struct net_device to rndis_filter_set_offload_params()

 drivers/net/hyperv/hyperv_net.h   | 19 +++++++++++++++---
 drivers/net/hyperv/netvsc.c       | 11 +++-------
 drivers/net/hyperv/netvsc_drv.c   | 18 ++++++-----------
 drivers/net/hyperv/rndis_filter.c | 42 ++++++++++++---------------------------
 4 files changed, 38 insertions(+), 52 deletions(-)

-- 
2.5.5

[toc] | [next] | [standalone]


#1413328 — [PATCH net-next v2 1/5] hv_netvsc: remove redundant assignment in netvsc_recv_callback()

FromVitaly Kuznetsov <vkuznets@redhat.com>
Date2016-06-03 18:00 +0200
Subject[PATCH net-next v2 1/5] hv_netvsc: remove redundant assignment in netvsc_recv_callback()
Message-ID<rFZFU-5aq-37@gated-at.bofh.it>
In reply to#1413326
net_device_ctx is assigned in the very beginning of the function and 'net'
pointer doesn't change.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
 drivers/net/hyperv/netvsc_drv.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 6a69b5c..db8fedf 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -701,7 +701,6 @@ int netvsc_recv_callback(struct hv_device *device_obj,
 	}
 
 vf_injection_done:
-	net_device_ctx = netdev_priv(net);
 	rx_stats = this_cpu_ptr(net_device_ctx->rx_stats);
 
 	/* Allocate a skb - TODO direct I/O to pages? */
-- 
2.5.5

[toc] | [prev] | [next] | [standalone]


#1414573 — Re: [PATCH net-next v2 0/5] hv_netvsc: cleanup after untangling the pointer mess

FromDavid Miller <davem@davemloft.net>
Date2016-06-06 05:20 +0200
SubjectRe: [PATCH net-next v2 0/5] hv_netvsc: cleanup after untangling the pointer mess
Message-ID<rGTf3-7rN-1@gated-at.bofh.it>
In reply to#1413326
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Fri,  3 Jun 2016 17:50:57 +0200

> Changes since v1:
> - resend when net-next is open [David Miller]
> - rebased to current net-next.
> 
> After we made traveling through our internal structures explicit it became
> obvious that some functions take arguments they don't need just to do
> redundant pointer travel and get to what they really need while their
> callers already have the required information.
> 
> This is just a cleanup series with no functional changes intended. It
> doesn't pretend to be complete, additional cleanup of other functions may
> follow.

Series applied, thanks.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web