From patchwork Tue Mar 25 16:55:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 27069 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E0B412057C for ; Tue, 25 Mar 2014 16:58:17 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id to1sf2606036ieb.1 for ; Tue, 25 Mar 2014 09:58:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :list-archive:content-type:content-transfer-encoding; bh=xzskiyzi8TdFwcQmPUMETP6nxOy0MjHTViG1nVIme2w=; b=g9Do+tCQr/lQsA3+W2x3ozm/h70z4Wgl4ZJoRBmdaI15mXwT8x0uwzpinSa2phScen HC0GyEqTlcGpr5fR1jSvwrYkNKHG+LQUVcvVYWbXy/+9C+w77COARLBWRCiRS+r3qEFq 7nrvbMW44DZNtKWkOY9rmZC1xpLuS9rk4+6wkLMgJQK2BdzyFFk9ijjZvH/a531SHEVB kyXbSSrc6WEJt40SnYgRfJhH2OyigOJ8t2i0GXcSWCCzEni6SnV29gWar+nHzHcolcp3 XX2XDb4hZdkhnjVpoCNRhs0MNRl9ys3ps4b5YSS+K9SBx+OX2nJBztfOYS2GDCqANvlc Mepg== X-Gm-Message-State: ALoCoQln8wnHlqTsgnLcwAFFne4qAnYyBmPh5pEzYl6ilRjk9HeHatTVqp4J2bfKkcu9VtNnvg5/ X-Received: by 10.51.18.97 with SMTP id gl1mr8351467igd.7.1395766696788; Tue, 25 Mar 2014 09:58:16 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.83.137 with SMTP id j9ls292274qgd.70.gmail; Tue, 25 Mar 2014 09:58:16 -0700 (PDT) X-Received: by 10.220.10.2 with SMTP id n2mr1998994vcn.26.1395766691476; Tue, 25 Mar 2014 09:58:11 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id tz5si3949690vdc.133.2014.03.25.09.58.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Mar 2014 09:58:10 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id lc6so892534vcb.21 for ; Tue, 25 Mar 2014 09:58:09 -0700 (PDT) X-Received: by 10.52.12.36 with SMTP id v4mr49091990vdb.20.1395766689756; Tue, 25 Mar 2014 09:58:09 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp320383vck; Tue, 25 Mar 2014 09:58:09 -0700 (PDT) X-Received: by 10.52.124.66 with SMTP id mg2mr343447vdb.50.1395766688834; Tue, 25 Mar 2014 09:58:08 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id y16si3812985vct.102.2014.03.25.09.57.38 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 25 Mar 2014 09:58:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WSUe8-0008SS-Uk; Tue, 25 Mar 2014 16:56:16 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WSUe7-0008QZ-Ga for xen-devel@lists.xenproject.org; Tue, 25 Mar 2014 16:56:15 +0000 Received: from [193.109.254.147:9667] by server-1.bemta-14.messagelabs.com id A0/EF-00839-E25B1335; Tue, 25 Mar 2014 16:56:14 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-3.tower-27.messagelabs.com!1395766573!4062981!1 X-Originating-IP: [74.125.83.47] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.11.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 18772 invoked from network); 25 Mar 2014 16:56:14 -0000 Received: from mail-ee0-f47.google.com (HELO mail-ee0-f47.google.com) (74.125.83.47) by server-3.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 25 Mar 2014 16:56:14 -0000 Received: by mail-ee0-f47.google.com with SMTP id b15so681053eek.6 for ; Tue, 25 Mar 2014 09:56:13 -0700 (PDT) X-Received: by 10.15.44.3 with SMTP id y3mr3882984eev.58.1395766573724; Tue, 25 Mar 2014 09:56:13 -0700 (PDT) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id h47sm33377501eey.13.2014.03.25.09.56.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Mar 2014 09:56:12 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 25 Mar 2014 16:55:19 +0000 Message-Id: <1395766541-23979-13-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1395766541-23979-1-git-send-email-julien.grall@linaro.org> References: <1395766541-23979-1-git-send-email-julien.grall@linaro.org> Cc: stefano.stabellini@citrix.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com Subject: [Xen-devel] [PATCH 12/34] xen/arm: psci: Don't need to check if vcpuid is negative X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: vcpuid is unsigned int, therefore the value will never be negative. It fixes compilation with clang 3.5: vpsci.c:29:18: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] if ( (vcpuid < 0) || (vcpuid >= MAX_VIRT_CPUS) ) ~~~~~~ ^ ~ Signed-off-by: Julien Grall Cc: Ian Campbell Cc: Stefano Stabellini Cc: Tim Deegan Acked-by: Ian Campbell --- xen/arch/arm/vpsci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/vpsci.c b/xen/arch/arm/vpsci.c index 1ceb8cb..abd3ade 100644 --- a/xen/arch/arm/vpsci.c +++ b/xen/arch/arm/vpsci.c @@ -26,7 +26,7 @@ int do_psci_cpu_on(uint32_t vcpuid, register_t entry_point) int rc; int is_thumb = entry_point & 1; - if ( (vcpuid < 0) || (vcpuid >= MAX_VIRT_CPUS) ) + if ( vcpuid >= MAX_VIRT_CPUS ) return PSCI_EINVAL; if ( vcpuid >= d->max_vcpus || (v = d->vcpu[vcpuid]) == NULL )