Patchwork netback: remove redundant assignment

login
register
mail settings
Submitter Wei Liu
Date Dec. 6, 2011, 10:08 a.m.
Message ID <1323166100-7059-1-git-send-email-wei.liu2@citrix.com>
Download mbox | patch
Permalink /patch/129591/
State Accepted
Delegated to: David Miller
Headers show

Comments

Wei Liu - Dec. 6, 2011, 10:08 a.m.
New value for netbk->mmap_pages[pending_idx] is assigned in
xen_netbk_alloc_page(), no need for a second assignment which
exposes internal to the outside world.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 drivers/net/xen-netback/netback.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
Ian Campbell - Dec. 6, 2011, 10:21 a.m.
On Tue, 2011-12-06 at 10:08 +0000, Wei Liu wrote:
> New value for netbk->mmap_pages[pending_idx] is assigned in
> xen_netbk_alloc_page(), no need for a second assignment which
> exposes internal to the outside world.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>

> ---
>  drivers/net/xen-netback/netback.c |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
> index 15e332d..3ecb5aa 100644
> --- a/drivers/net/xen-netback/netback.c
> +++ b/drivers/net/xen-netback/netback.c
> @@ -940,8 +940,6 @@ static struct gnttab_copy *xen_netbk_get_requests(struct xen_netbk *netbk,
>  		if (!page)
>  			return NULL;
>  
> -		netbk->mmap_pages[pending_idx] = page;
> -
>  		gop->source.u.ref = txp->gref;
>  		gop->source.domid = vif->domid;
>  		gop->source.offset = txp->offset;
> @@ -1336,8 +1334,6 @@ static unsigned xen_netbk_tx_build_gops(struct xen_netbk *netbk)
>  			continue;
>  		}
>  
> -		netbk->mmap_pages[pending_idx] = page;
> -
>  		gop->source.u.ref = txreq.gref;
>  		gop->source.domid = vif->domid;
>  		gop->source.offset = txreq.offset;


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Dec. 6, 2011, 6:14 p.m.
From: Ian Campbell <Ian.Campbell@citrix.com>
Date: Tue, 6 Dec 2011 10:21:22 +0000

> On Tue, 2011-12-06 at 10:08 +0000, Wei Liu wrote:
>> New value for netbk->mmap_pages[pending_idx] is assigned in
>> xen_netbk_alloc_page(), no need for a second assignment which
>> exposes internal to the outside world.
>> 
>> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> Acked-by: Ian Campbell <ian.campbell@citrix.com>

Applied to net-next, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index 15e332d..3ecb5aa 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -940,8 +940,6 @@  static struct gnttab_copy *xen_netbk_get_requests(struct xen_netbk *netbk,
 		if (!page)
 			return NULL;
 
-		netbk->mmap_pages[pending_idx] = page;
-
 		gop->source.u.ref = txp->gref;
 		gop->source.domid = vif->domid;
 		gop->source.offset = txp->offset;
@@ -1336,8 +1334,6 @@  static unsigned xen_netbk_tx_build_gops(struct xen_netbk *netbk)
 			continue;
 		}
 
-		netbk->mmap_pages[pending_idx] = page;
-
 		gop->source.u.ref = txreq.gref;
 		gop->source.domid = vif->domid;
 		gop->source.offset = txreq.offset;