From patchwork Fri Sep 26 13:16:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 37967 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 95525202DB for ; Fri, 26 Sep 2014 13:19:54 +0000 (UTC) Received: by mail-wg0-f70.google.com with SMTP id a1sf5623582wgh.5 for ; Fri, 26 Sep 2014 06:19:53 -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=OLc3k4tzzKPHHN6/jgbFah0jldKPKtMbYEsZlbVW1Lk=; b=m+UWpu1Q3Iif5KjQXJ/S+MtEzjQ84xD7fg21IOuh0AfbTyzpz6YUzjFk5B57nfzeYI 9S9T7GskCGHUPapZvaFjF/W3BJUpyb8tmNf2btcfz+Z6hx051HDy7W0J0QkiXwiT0mBd CcIF1eCdAdg1fBO2NA9LIaV44ToB4Zb5SovRHbWUKEPo/xJ4YPnFVP9+gKTx0oPuzEBF 5xASMN+mVDrojoz2XBl3BZoKB2PKV5+2+9XkpL9kJFpszeOIg4bkN9HaYK8BUL7IhTLL EgO8NgJASCVPT44LjzjkJZrPE6JUhIpK33DkBKOpcPKcBsWyiA/tXdDdbTGnCFTLNv/N u5jg== X-Gm-Message-State: ALoCoQkzFi1VcIOxPAQjLKzo/mlVwxrb/aCqFBiA+sfw3ALsSsYSS4b2SrR8qLZQtL6+bRZLtN/w X-Received: by 10.112.145.136 with SMTP id su8mr2707712lbb.9.1411737593779; Fri, 26 Sep 2014 06:19:53 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.161.225 with SMTP id xv1ls378768lab.43.gmail; Fri, 26 Sep 2014 06:19:53 -0700 (PDT) X-Received: by 10.112.159.169 with SMTP id xd9mr19379804lbb.71.1411737593643; Fri, 26 Sep 2014 06:19:53 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com [209.85.217.173]) by mx.google.com with ESMTPS id r1si7185009lar.58.2014.09.26.06.19.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Sep 2014 06:19:53 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by mail-lb0-f173.google.com with SMTP id 10so12612332lbg.4 for ; Fri, 26 Sep 2014 06:19:53 -0700 (PDT) X-Received: by 10.152.22.137 with SMTP id d9mr20393313laf.29.1411737593573; Fri, 26 Sep 2014 06:19:53 -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.112.130.169 with SMTP id of9csp59269lbb; Fri, 26 Sep 2014 06:19:52 -0700 (PDT) X-Received: by 10.68.68.173 with SMTP id x13mr574185pbt.84.1411737592064; Fri, 26 Sep 2014 06:19:52 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id of4si9320178pbc.79.2014.09.26.06.19.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Sep 2014 06:19:52 -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 1XXVPi-00034D-H2; Fri, 26 Sep 2014 13:18:22 +0000 Received: from mail-la0-f51.google.com ([209.85.215.51]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XXVPO-0002YC-Mb for linux-arm-kernel@lists.infradead.org; Fri, 26 Sep 2014 13:18:03 +0000 Received: by mail-la0-f51.google.com with SMTP id pv20so4950770lab.10 for ; Fri, 26 Sep 2014 06:17:40 -0700 (PDT) X-Received: by 10.112.171.229 with SMTP id ax5mr12490948lbc.25.1411737460196; Fri, 26 Sep 2014 06:17:40 -0700 (PDT) Received: from localhost.localdomain (188-178-240-98-static.dk.customer.tdc.net. [188.178.240.98]) by mx.google.com with ESMTPSA id z4sm1876657laz.39.2014.09.26.06.17.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Sep 2014 06:17:39 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , Gleb Natapov Subject: [PATCH 03/27] KVM: ARM/arm64: fix non-const declaration of function returning const Date: Fri, 26 Sep 2014 15:16:36 +0200 Message-Id: <1411737420-9063-4-git-send-email-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1411737420-9063-1-git-send-email-christoffer.dall@linaro.org> References: <1411737420-9063-1-git-send-email-christoffer.dall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140926_061802_967227_0551EE53 X-CRM114-Status: GOOD ( 10.81 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.51 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.51 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: kvm@vger.kernel.org, Marc Zyngier , Will Deacon , Christoffer Dall , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org 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: christoffer.dall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 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 From: Will Deacon 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 Signed-off-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 6dfb404..fcb12a6 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 e10c45a..44094e5 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);