Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751440Ab2KPJQj (ORCPT ); Fri, 16 Nov 2012 04:16:39 -0500 Received: from smtp.eu.citrix.com ([62.200.22.115]:62275 "EHLO SMTP.EU.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751109Ab2KPJQh (ORCPT ); Fri, 16 Nov 2012 04:16:37 -0500 X-IronPort-AV: E=Sophos;i="4.83,263,1352073600"; d="scan'208";a="15843610" Message-ID: <1353057394.3499.159.camel@zakaz.uk.xensource.com> Subject: Re: [PATCH 08/14] xen: netback: Remove redundant check on unsigned variable From: Ian Campbell To: Tushar Behera CC: "linux-kernel@vger.kernel.org" , "patches@linaro.org" , "xen-devel@lists.xensource.com" , "netdev@vger.kernel.org" Date: Fri, 16 Nov 2012 09:16:34 +0000 In-Reply-To: <1353048646-10935-9-git-send-email-tushar.behera@linaro.org> References: <1353048646-10935-1-git-send-email-tushar.behera@linaro.org> <1353048646-10935-9-git-send-email-tushar.behera@linaro.org> Organization: Citrix Systems, Inc. Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1312 Lines: 44 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 > CC: xen-devel@lists.xensource.com > CC: netdev@vger.kernel.org > Signed-off-by: Tushar Behera Acked-by: Ian Campbell 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 linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/