[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1353057394.3499.159.camel@zakaz.uk.xensource.com>
Date: Fri, 16 Nov 2012 09:16:34 +0000
From: Ian Campbell <Ian.Campbell@...rix.com>
To: Tushar Behera <tushar.behera@...aro.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"patches@...aro.org" <patches@...aro.org>,
"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH 08/14] xen: netback: Remove redundant check on unsigned
variable
On Fri, 2012-11-16 at 06:50 +0000, Tushar Behera wrote:
> No need to check whether unsigned variable is less than 0.
>
> CC: Ian Campbell <ian.campbell@...rix.com>
> CC: xen-devel@...ts.xensource.com
> CC: netdev@...r.kernel.org
> Signed-off-by: Tushar Behera <tushar.behera@...aro.org>
Acked-by: Ian Campbell <ian.campbell@...rix.com>
Thanks.
> ---
> drivers/net/xen-netback/netback.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
> index aab8677..515e10c 100644
> --- a/drivers/net/xen-netback/netback.c
> +++ b/drivers/net/xen-netback/netback.c
> @@ -190,14 +190,14 @@ static int get_page_ext(struct page *pg,
>
> group = ext.e.group - 1;
>
> - if (group < 0 || group >= xen_netbk_group_nr)
> + if (group >= xen_netbk_group_nr)
> return 0;
>
> netbk = &xen_netbk[group];
>
> idx = ext.e.idx;
>
> - if ((idx < 0) || (idx >= MAX_PENDING_REQS))
> + if (idx >= MAX_PENDING_REQS)
> return 0;
>
> if (netbk->mmap_pages[idx] != pg)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists