From patchwork Fri Nov 16 06:50:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 12895 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 8524623E13 for ; Fri, 16 Nov 2012 06:57:38 +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 26EBCA18287 for ; Fri, 16 Nov 2012 06:57:38 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so3064408iej.11 for ; Thu, 15 Nov 2012 22:57:38 -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=zRe+qA25WzxMiRjKMJ9McPo+7o7n3uZndzPdM7Hkn9A=; b=Gof/SrzQVgM2wicbuYUk+gwLqvfC5zt+iAEuJhbAz4/vLxHK0zVms5yXEEQITeU4Jx ZZSpqFBeXR5IKmQG+VOjUHQgPF6pigBbUkfZnsg/jazBskS/SIHW/4G2x4QdYvA9tZIz 6Kq+WP23to07nbHnvhhWvSBBN6uj+Vr3RZSHjsLWRSmCz5KsrtPvq6hm383LITK1kskR rtpxYJ6qAzPhi/0yw3MiagZ+OX8pVsy8Dj71ZmbB2HWgWCf1Llpb4KdmJA7n+2jiTEq/ kQHUJw3tuOhLx2iVFZMcYK71wUAnbiFd132s26qajDd/C0r+WBfVwxOwpMXLGB1SHZuS tEaw== Received: by 10.50.213.69 with SMTP id nq5mr1691876igc.70.1353049057939; Thu, 15 Nov 2012 22:57:37 -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 n20csp23383igt; Thu, 15 Nov 2012 22:57:37 -0800 (PST) Received: by 10.66.78.4 with SMTP id x4mr10177344paw.60.1353049057441; Thu, 15 Nov 2012 22:57:37 -0800 (PST) Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by mx.google.com with ESMTPS id ka8si1543019pbc.5.2012.11.15.22.57.37 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Nov 2012 22:57:37 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.48 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.220.48; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.48 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-pa0-f48.google.com with SMTP id kp12so1837676pab.21 for ; Thu, 15 Nov 2012 22:57:37 -0800 (PST) Received: by 10.68.135.101 with SMTP id pr5mr12035627pbb.140.1353049057218; Thu, 15 Nov 2012 22:57:37 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id mz10sm753915pbc.37.2012.11.15.22.57.34 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Nov 2012 22:57:36 -0800 (PST) From: Tushar Behera To: linux-kernel@vger.kernel.org Cc: patches@linaro.org, Jack Steiner Subject: [PATCH 12/14] gru: Remove redundant check on unsigned variable Date: Fri, 16 Nov 2012 12:20:44 +0530 Message-Id: <1353048646-10935-13-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: ALoCoQnVBEU4Our0RfYZfrYgPR3NnscNgIeh7vyGi6Rg7vDoK4nbfcnFXL9BD3DlX8j5p7I84D/i No need to check whether unsigned variable is less than 0. CC: Jack Steiner Signed-off-by: Tushar Behera --- drivers/misc/sgi-gru/grukdump.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/misc/sgi-gru/grukdump.c b/drivers/misc/sgi-gru/grukdump.c index 9b2062d..860733b 100644 --- a/drivers/misc/sgi-gru/grukdump.c +++ b/drivers/misc/sgi-gru/grukdump.c @@ -197,7 +197,7 @@ int gru_dump_chiplet_request(unsigned long arg) return -EFAULT; /* Currently, only dump by gid is implemented */ - if (req.gid >= gru_max_gids || req.gid < 0) + if (req.gid >= gru_max_gids) return -EINVAL; gru = GID_TO_GRU(req.gid);