From patchwork Mon May 4 01:52:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 47959 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 46DCB2121F for ; Mon, 4 May 2015 01:55:14 +0000 (UTC) Received: by laat2 with SMTP id t2sf42175246laa.2 for ; Sun, 03 May 2015 18:55: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: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=WqUwGkNSVLJEZQ1YAviE/T7yOKZ2KYrmceN5mh3tHScf+71cMFkv2kFeljOmso0cdc q1nqvkGf3gJK0qoKvtP7P3xXl9U1HF63OSy2SysVKLEZVc3/fJOoniz3GAAhE3YqXm0A qHuGwzUvLPLMrnMTbEBHSvJ0E6XZpcAAaEA01IX02hjkWT0vKzjABP/Ayw58j0/f8txX 7gY8GTK0nBeRSM18m7Ni2FR7NJ5BdKBk/MbkXQvfKsK4iJVV6esVtcvnVfocZRP//+12 s/0rG4Poa9gB1B55M609v7ai0efetgWYCJeP4vyY3JDteOJCcIW2BRJU7MoYpquveThc lMKA== X-Gm-Message-State: ALoCoQmti+ZzSkuF4xc5l3cPVNT+sGa/VLRT5/0ncyV24F4OSxnA3fAENp0/cGpH7e8oXWfx7dMs X-Received: by 10.194.143.98 with SMTP id sd2mr16947220wjb.6.1430704513256; Sun, 03 May 2015 18:55:13 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.169 with SMTP id r9ls642615laj.86.gmail; Sun, 03 May 2015 18:55:13 -0700 (PDT) X-Received: by 10.152.206.103 with SMTP id ln7mr17719968lac.40.1430704513065; Sun, 03 May 2015 18:55:13 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id ca5si9101343lad.28.2015.05.03.18.55.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 May 2015 18:55:12 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by lbbqq2 with SMTP id qq2so95596100lbb.3 for ; Sun, 03 May 2015 18:55:12 -0700 (PDT) X-Received: by 10.112.222.133 with SMTP id qm5mr17659130lbc.86.1430704512796; Sun, 03 May 2015 18:55:12 -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.67.65 with SMTP id l1csp1412869lbt; Sun, 3 May 2015 18:55:12 -0700 (PDT) X-Received: by 10.66.142.76 with SMTP id ru12mr34307605pab.142.1430704511816; Sun, 03 May 2015 18:55:11 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ix6si17838787pac.46.2015.05.03.18.55.11; Sun, 03 May 2015 18:55:11 -0700 (PDT) Received-SPF: none (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751909AbbEDBzK (ORCPT + 2 others); Sun, 3 May 2015 21:55:10 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:36673 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751923AbbEDBzJ (ORCPT ); Sun, 3 May 2015 21:55:09 -0400 Received: by pabsx10 with SMTP id sx10so147768760pab.3 for ; Sun, 03 May 2015 18:55:09 -0700 (PDT) X-Received: by 10.68.191.229 with SMTP id hb5mr37907538pbc.126.1430704509312; Sun, 03 May 2015 18:55:09 -0700 (PDT) Received: from localhost ([180.150.153.1]) by mx.google.com with ESMTPSA id ax2sm11057361pac.21.2015.05.03.18.55.07 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 03 May 2015 18:55:08 -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 22/47] KVM: ARM/arm64: fix non-const declaration of function returning const Date: Mon, 4 May 2015 09:52:17 +0800 Message-Id: <1430704362-6292-23-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1430704362-6292-1-git-send-email-shannon.zhao@linaro.org> References: <1430704362-6292-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.217.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 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);