netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tushar Behera <tushar.behera@linaro.org>
To: linux-kernel@vger.kernel.org
Cc: patches@linaro.org, Ian Campbell <ian.campbell@citrix.com>,
	xen-devel@lists.xensource.com, netdev@vger.kernel.org
Subject: [PATCH 08/14] xen: netback: Remove redundant check on unsigned variable
Date: Fri, 16 Nov 2012 12:20:40 +0530	[thread overview]
Message-ID: <1353048646-10935-9-git-send-email-tushar.behera@linaro.org> (raw)
In-Reply-To: <1353048646-10935-1-git-send-email-tushar.behera@linaro.org>

No need to check whether unsigned variable is less than 0.

CC: Ian Campbell <ian.campbell@citrix.com>
CC: xen-devel@lists.xensource.com
CC: netdev@vger.kernel.org
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
---
 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)
-- 
1.7.4.1

  reply	other threads:[~2012-11-16  6:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-16  6:50 [PATCH 00/14] Modify signed comparisons of unsigned variables Tushar Behera
2012-11-16  6:50 ` Tushar Behera [this message]
2012-11-16  9:16   ` [PATCH 08/14] xen: netback: Remove redundant check on unsigned variable Ian Campbell
2012-12-28  5:15     ` Tushar Behera
2012-12-28 10:41       ` [Xen-devel] " Wei Liu
2013-01-02 21:40         ` Konrad Rzeszutek Wilk
2012-11-16  6:50 ` [PATCH 10/14] atm: Removed " Tushar Behera
2012-12-28  5:16   ` Tushar Behera
2012-12-31 15:18     ` chas williams - CONTRACTOR
2012-11-16  6:50 ` [PATCH 14/14] wlcore: Remove " Tushar Behera
2012-11-16 18:24   ` Luciano Coelho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1353048646-10935-9-git-send-email-tushar.behera@linaro.org \
    --to=tushar.behera@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).