From patchwork Fri Nov 16 06:50:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 12892 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 5947823E13 for ; Fri, 16 Nov 2012 06:57:28 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id E9477A19391 for ; Fri, 16 Nov 2012 06:57:27 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so3064408iej.11 for ; Thu, 15 Nov 2012 22:57:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=uvplCML3OpI5Zo7pjs+XiT39MkRCujKMohinXnMuvA4=; b=doqPlCduRqjtxGOZ2IG1wASQ+QVSEzjav3Xw9aDx/6fWqdMpo0vUEUPjgxaB7w3BeR ehpvJ2nqk+IFEEStlpY8fpdpOtza92EOTMemSgzfwXhaNmtnjYtx2IZAZXUSTiOQGyO8 Wzhs9RirppKEZLl3TQMVnMtKkodhqWieOqXK79i8AgjNkMLCr11Tb/bLCsaRJigeTKSp yae3umbVYRdHcsCpi5RpL9Ymxjz0PUpZZg873T2XbLI6ewzBYn2iET7e1UC+wNit6Ffs o+2hpe/J6BkkyCmRheHFbILhvX3qhX1mgj+ti6CCwBqtbaMXuoXeNEzhK8oFIyJggv3l DuHA== Received: by 10.50.161.169 with SMTP id xt9mr2181586igb.62.1353049047703; Thu, 15 Nov 2012 22:57:27 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp23364igt; Thu, 15 Nov 2012 22:57:27 -0800 (PST) Received: by 10.66.79.166 with SMTP id k6mr10329516pax.25.1353049047079; Thu, 15 Nov 2012 22:57:27 -0800 (PST) Received: from mail-pb0-f51.google.com (mail-pb0-f51.google.com [209.85.160.51]) by mx.google.com with ESMTPS id v5si1152532paz.144.2012.11.15.22.57.26 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Nov 2012 22:57:27 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.51 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.160.51; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.51 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) smtp.mail=tushar.behera@linaro.org Received: by mail-pb0-f51.google.com with SMTP id rp16so1587383pbb.38 for ; Thu, 15 Nov 2012 22:57:26 -0800 (PST) Received: by 10.66.80.166 with SMTP id s6mr10340982pax.21.1353049046845; Thu, 15 Nov 2012 22:57:26 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id mz10sm753915pbc.37.2012.11.15.22.57.23 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Nov 2012 22:57:26 -0800 (PST) From: Tushar Behera To: linux-kernel@vger.kernel.org Cc: patches@linaro.org, Konrad Rzeszutek Wilk , Jeremy Fitzhardinge , xen-devel@lists.xensource.com, virtualization@lists.linux-foundation.org Subject: [PATCH 09/14] xen: events: Remove redundant check on unsigned variable Date: Fri, 16 Nov 2012 12:20:41 +0530 Message-Id: <1353048646-10935-10-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1353048646-10935-1-git-send-email-tushar.behera@linaro.org> References: <1353048646-10935-1-git-send-email-tushar.behera@linaro.org> X-Gm-Message-State: ALoCoQkOv0IFq+pmXVQxY97X1StrIDFZtcoSBrv1AqGs1YPgjzo7fyIJSh09YxixTfwjNscPGNRL No need to check whether unsigned variable is less than 0. CC: Konrad Rzeszutek Wilk CC: Jeremy Fitzhardinge CC: xen-devel@lists.xensource.com CC: virtualization@lists.linux-foundation.org Signed-off-by: Tushar Behera Acked-by: Konrad Rzeszutek Wilk --- drivers/xen/events.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 4293c57..cadd7d1 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@ -216,7 +216,7 @@ static void xen_irq_info_pirq_init(unsigned irq, */ static unsigned int evtchn_from_irq(unsigned irq) { - if (unlikely(WARN(irq < 0 || irq >= nr_irqs, "Invalid irq %d!\n", irq))) + if (unlikely(WARN(irq >= nr_irqs, "Invalid irq %d!\n", irq))) return 0; return info_for_irq(irq)->evtchn;