From patchwork Tue Jun 2 14:48:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 49382 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4D54D20BD1 for ; Tue, 2 Jun 2015 14:49:34 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2sf42639110lbb.0 for ; Tue, 02 Jun 2015 07:49:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=7twLvSOuqVJX/f/J3o5gfAlmfCIldUTkXWyBe9b9ZWA=; b=eg5oDGL4zfz0S+3wFgf0VMdX5U9klLYGJDd5D2W85LNiU1IwoHCW+PIKNSdyda1cfs 4JSURqOUPqr2y0XTwLY7eXbuR/7xJca2rP988cyJpuv7b/5HiOyjt3rM3cDtSKI/g/sI /lPxGIYMnK/XKi+rNIrmNF3Li2FRv8Vcd28V99E3FWNFJ4MNQNUiGfclvXzPreymjsIu UlROzsaOAEOUrvYjMNwd3nGGW0eUWT2fE3bDmOyX/PioAYW+JL26FA1tWvFo4F86T65K 5aC7ZikuXkALibg7kKUc+OBJ8ICRmYT8xLdTRZ/hLvzXU7yzieqd2ffPW5t6QDOlAnon 6dmA== X-Gm-Message-State: ALoCoQlVWAHB62RAemszS5e4D1x0X8AQYrSKqArOkVO5qPBlDDkSCqNAlpAK8Zj46J4YOUBVTuVD X-Received: by 10.194.158.134 with SMTP id wu6mr4102607wjb.6.1433256573127; Tue, 02 Jun 2015 07:49:33 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.205.107 with SMTP id lf11ls16019lac.65.gmail; Tue, 02 Jun 2015 07:49:32 -0700 (PDT) X-Received: by 10.152.8.102 with SMTP id q6mr7090351laa.27.1433256572761; Tue, 02 Jun 2015 07:49:32 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id rk9si15268284lac.100.2015.06.02.07.49.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jun 2015 07:49:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by labpy14 with SMTP id py14so115668703lab.0 for ; Tue, 02 Jun 2015 07:49:32 -0700 (PDT) X-Received: by 10.152.27.1 with SMTP id p1mr26119254lag.112.1433256572665; Tue, 02 Jun 2015 07:49:32 -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.108.230 with SMTP id hn6csp3128406lbb; Tue, 2 Jun 2015 07:49:31 -0700 (PDT) X-Received: by 10.70.53.99 with SMTP id a3mr50685381pdp.169.1433256570817; Tue, 02 Jun 2015 07:49:30 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hv8si26697315pdb.173.2015.06.02.07.49.30; Tue, 02 Jun 2015 07:49:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932319AbbFBOt3 (ORCPT + 2 others); Tue, 2 Jun 2015 10:49:29 -0400 Received: from mail-ob0-f175.google.com ([209.85.214.175]:36038 "EHLO mail-ob0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759332AbbFBOt2 (ORCPT ); Tue, 2 Jun 2015 10:49:28 -0400 Received: by obbea2 with SMTP id ea2so129467176obb.3 for ; Tue, 02 Jun 2015 07:49:28 -0700 (PDT) X-Received: by 10.182.129.19 with SMTP id ns19mr22708805obb.3.1433256568313; Tue, 02 Jun 2015 07:49:28 -0700 (PDT) Received: from localhost ([167.160.116.34]) by mx.google.com with ESMTPSA id t6sm9476473oek.14.2015.06.02.07.49.25 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 02 Jun 2015 07:49:27 -0700 (PDT) From: shannon.zhao@linaro.org To: stable@vger.kernel.org Cc: gregkh@linuxfoundation.org, christoffer.dall@linaro.org, shannon.zhao@linaro.org, Will Deacon , Marc Zyngier Subject: [PATCH for 3.14.y stable 07/32] KVM: ARM/arm64: fix non-const declaration of function returning const Date: Tue, 2 Jun 2015 22:48:02 +0800 Message-Id: <1433256507-7856-8-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1433256507-7856-1-git-send-email-shannon.zhao@linaro.org> References: <1433256507-7856-1-git-send-email-shannon.zhao@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: shannon.zhao@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.215.53 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Will Deacon commit 6951e48bff0b55d2a8e825a953fc1f8e3a34bf1c upstream. 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 Signed-off-by: Shannon Zhao --- 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 09af149..530f56e 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 0a1d697..518d000 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 2 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);