From patchwork Fri Apr 24 05:27:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 47525 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DF0E820553 for ; Fri, 24 Apr 2015 05:33:23 +0000 (UTC) Received: by wicmx19 with SMTP id mx19sf1558367wic.3 for ; Thu, 23 Apr 2015 22:33:23 -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=6AOjtgn0rPxi1KwQ79rN+5fLdRjhSuerbUqSNPL2XQ4=; b=BODnFpaI1OyhMfa/+cQKLjeuspBhbqHNHtFKj0M1b80YSQHHC/5ALt8pZmOGfQjqTN lJQvW534EUiQ7yvZu53h/3SahfvOUAyt4mu/oAcImQU/6InaYvziPwQJoa7yjem1RK08 df/i530zD4WciRkJvOEewQIcmlL0ganmWboU3g8brKQ9NNzdtX+54QQka/545CSjRW4s RTnq5CYLfQjlAkgOWP+ZlIDrUud+SCiaxJAwMDZcKJh+S9mefEzSMLQrs65Lj0uW3jfJ FPmQ354+lJaOAkeenBYaeX2sYeM2H1IsmgMhlpS2gqAz8xuvqmDWotU7eh7XCOwPMHgj J7ng== X-Gm-Message-State: ALoCoQnDAJ9mBs2ooxVaORE8yTWFkU8JKMbaMaIsBPexQW/jp9WFz5nwH2vpRWA1ihJuvEpgVDNR X-Received: by 10.152.26.134 with SMTP id l6mr3208524lag.10.1429853603181; Thu, 23 Apr 2015 22:33:23 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.34 with SMTP id n2ls428446laj.15.gmail; Thu, 23 Apr 2015 22:33:22 -0700 (PDT) X-Received: by 10.152.45.97 with SMTP id l1mr5548161lam.55.1429853602902; Thu, 23 Apr 2015 22:33:22 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id o2si7478019lbl.51.2015.04.23.22.33.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Apr 2015 22:33:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lbcga7 with SMTP id ga7so28633334lbc.1 for ; Thu, 23 Apr 2015 22:33:22 -0700 (PDT) X-Received: by 10.152.205.6 with SMTP id lc6mr2865098lac.73.1429853602820; Thu, 23 Apr 2015 22:33:22 -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 l1csp978388lbt; Thu, 23 Apr 2015 22:33:22 -0700 (PDT) X-Received: by 10.66.221.34 with SMTP id qb2mr11700085pac.42.1429853601072; Thu, 23 Apr 2015 22:33:21 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bd10si15800741pdb.178.2015.04.23.22.33.20; Thu, 23 Apr 2015 22:33:21 -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 S1754551AbbDXFdT (ORCPT + 2 others); Fri, 24 Apr 2015 01:33:19 -0400 Received: from mail-ob0-f172.google.com ([209.85.214.172]:36476 "EHLO mail-ob0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754545AbbDXFdT (ORCPT ); Fri, 24 Apr 2015 01:33:19 -0400 Received: by obbeb7 with SMTP id eb7so30148724obb.3 for ; Thu, 23 Apr 2015 22:33:19 -0700 (PDT) X-Received: by 10.182.216.168 with SMTP id or8mr3741174obc.31.1429853598953; Thu, 23 Apr 2015 22:33:18 -0700 (PDT) Received: from localhost ([167.160.116.36]) by mx.google.com with ESMTPSA id k7sm6076491oig.26.2015.04.23.22.33.16 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 23 Apr 2015 22:33:18 -0700 (PDT) From: shannon.zhao@linaro.org To: stable@vger.kernel.org Cc: jslaby@suse.cz, christoffer.dall@linaro.org, shannon.zhao@linaro.org, Will Deacon , Marc Zyngier Subject: [PATCH for 3.12.y stable 40/63] KVM: ARM/arm64: fix non-const declaration of function returning const Date: Fri, 24 Apr 2015 13:27:38 +0800 Message-Id: <1429853281-6136-41-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1429853281-6136-1-git-send-email-shannon.zhao@linaro.org> References: <1429853281-6136-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.178 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 361765c..2e247b6 100644 --- a/arch/arm/include/asm/kvm_host.h +++ b/arch/arm/include/asm/kvm_host.h @@ -47,7 +47,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 0859a4d..11059f1 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -42,7 +42,7 @@ #define KVM_PAGES_PER_HPAGE(x) (1UL<<31) 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);