From patchwork Tue Aug 26 14:13:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 36035 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C0AB52054F for ; Tue, 26 Aug 2014 14:17:13 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id tr6sf47765872ieb.10 for ; Tue, 26 Aug 2014 07:17:13 -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:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=3KKF6+hZcWpevdF4g1u0D6+Se33kSYwR1QBNc3V1aKg=; b=hjPeROt9+Q8xgbAiSRjn1cV/7EBUB+PBHbf5FQF6g6rHG20MDTjkM0zngOH2bsNIjb YLnYNGpTVdwAPu7L8W4MCmDp++Yib4JVy7tOMOwQvSBQGdO+zhLEbfrTNK+89DxLEv9x fxn8Wq+uu6O+MZmJV+TVUuPCEm6ohAoRZt2Dd6ypiUCooGjor6veB6j7P64FwSbpzgqj KzkgtlXTLGhFshMU/bpb/bRnReiZDFjC7xA3nW5GaChUtfJxMRkjAWMjJuQpz5AONPpV ioZEO6m5QKdJHHIE1vht/jHzlJQJ8Clpg0w/LDqqr3CUI0UbVetnphURLskAahqxGuHV IKTg== X-Gm-Message-State: ALoCoQmjzw/C20o9pu37na8UEpwYJsTQTruvDCMtHg+f+3WJvhkMBp3lYSEPRoZCzrGAE/OLYJDM X-Received: by 10.182.131.226 with SMTP id op2mr17534051obb.17.1409062633325; Tue, 26 Aug 2014 07:17:13 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.49.235 with SMTP id q98ls2589662qga.91.gmail; Tue, 26 Aug 2014 07:17:13 -0700 (PDT) X-Received: by 10.236.35.133 with SMTP id u5mr994757yha.181.1409062633162; Tue, 26 Aug 2014 07:17:13 -0700 (PDT) Received: from mail-yk0-f175.google.com (mail-yk0-f175.google.com [209.85.160.175]) by mx.google.com with ESMTPS id i3si2494353yhd.166.2014.08.26.07.17.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 26 Aug 2014 07:17:13 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.160.175 as permitted sender) client-ip=209.85.160.175; Received: by mail-yk0-f175.google.com with SMTP id q200so11278426ykb.20 for ; Tue, 26 Aug 2014 07:17:13 -0700 (PDT) X-Received: by 10.220.169.72 with SMTP id x8mr1386009vcy.45.1409062633070; Tue, 26 Aug 2014 07:17:13 -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.221.45.67 with SMTP id uj3csp202885vcb; Tue, 26 Aug 2014 07:17:12 -0700 (PDT) X-Received: by 10.68.132.10 with SMTP id oq10mr20561399pbb.132.1409062632150; Tue, 26 Aug 2014 07:17:12 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id ev1si3570745pbb.162.2014.08.26.07.17.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Aug 2014 07:17:12 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XMHXa-0004W5-GK; Tue, 26 Aug 2014 14:16:06 +0000 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XMHVH-00087J-JW for linux-arm-kernel@lists.infradead.org; Tue, 26 Aug 2014 14:13:44 +0000 Received: from edgewater-inn.cambridge.arm.com (edgewater-inn.cambridge.arm.com [10.1.203.34]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id s7QEDHwo011791; Tue, 26 Aug 2014 15:13:17 +0100 (BST) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 339A61AE01EA; Tue, 26 Aug 2014 15:13:37 +0100 (BST) From: Will Deacon To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 01/11] KVM: ARM/arm64: fix non-const declaration of function returning const Date: Tue, 26 Aug 2014 15:13:20 +0100 Message-Id: <1409062410-25891-2-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.0.rc1 In-Reply-To: <1409062410-25891-1-git-send-email-will.deacon@arm.com> References: <1409062410-25891-1-git-send-email-will.deacon@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140826_071344_020148_135B35C0 X-CRM114-Status: GOOD ( 10.14 ) X-Spam-Score: -5.0 (-----) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-5.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [217.140.96.50 listed in list.dnswl.org] 0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record Cc: Marc Zyngier , catalin.marinas@arm.com, Will Deacon , Christoffer Dall X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: will.deacon@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.160.175 as permitted sender) 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 Sparse kicks up about a type mismatch for kvm_target_cpu: arch/arm64/kvm/guest.c:271:25: error: symbol 'kvm_target_cpu' redeclared with different type (originally declared at ./arch/arm64/include/asm/kvm_host.h:45) - different modifiers so fix this by adding the missing const attribute to the function declaration. Cc: Christoffer Dall Cc: Marc Zyngier Signed-off-by: Will Deacon Acked-by: Marc Zyngier Acked-by: Christoffer Dall --- arch/arm/include/asm/kvm_host.h | 2 +- arch/arm64/include/asm/kvm_host.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h index 6dfb404f6c46..fcb12a6f7db5 100644 --- a/arch/arm/include/asm/kvm_host.h +++ b/arch/arm/include/asm/kvm_host.h @@ -42,7 +42,7 @@ struct kvm_vcpu; u32 *kvm_vcpu_reg(struct kvm_vcpu *vcpu, u8 reg_num, u32 mode); -int kvm_target_cpu(void); +int __attribute_const__ kvm_target_cpu(void); int kvm_reset_vcpu(struct kvm_vcpu *vcpu); void kvm_reset_coprocs(struct kvm_vcpu *vcpu); diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index e10c45a578e3..44094e559848 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -42,7 +42,7 @@ #define KVM_VCPU_MAX_FEATURES 3 struct kvm_vcpu; -int kvm_target_cpu(void); +int __attribute_const__ kvm_target_cpu(void); int kvm_reset_vcpu(struct kvm_vcpu *vcpu); int kvm_arch_dev_ioctl_check_extension(long ext);