linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: christoffer.dall@linaro.org (Christoffer Dall)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 03/27] KVM: ARM/arm64: fix non-const declaration of function returning const
Date: Fri, 26 Sep 2014 15:16:36 +0200	[thread overview]
Message-ID: <1411737420-9063-4-git-send-email-christoffer.dall@linaro.org> (raw)
In-Reply-To: <1411737420-9063-1-git-send-email-christoffer.dall@linaro.org>

From: Will Deacon <will.deacon@arm.com>

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 <christoffer.dall@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
---
 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);
 
-- 
2.0.0

  parent reply	other threads:[~2014-09-26 13:16 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26 13:16 [PATCH 00/27] Changes for arm/arm64 KVM for 3.18 Christoffer Dall
2014-09-26 13:16 ` [PATCH 01/27] KVM: Introduce gfn_to_hva_memslot_prot Christoffer Dall
2014-09-26 13:16 ` [PATCH 02/27] arm/arm64: KVM: Support KVM_CAP_READONLY_MEM Christoffer Dall
2014-09-26 13:16 ` Christoffer Dall [this message]
2014-09-26 13:16 ` [PATCH 04/27] KVM: ARM/arm64: fix broken __percpu annotation Christoffer Dall
2014-09-26 13:16 ` [PATCH 05/27] KVM: ARM/arm64: avoid returning negative error code as bool Christoffer Dall
2014-09-26 13:16 ` [PATCH 06/27] KVM: ARM/arm64: return -EFAULT if copy_from_user fails in set_timer_reg Christoffer Dall
2014-09-26 13:16 ` [PATCH 07/27] KVM: vgic: return int instead of bool when checking I/O ranges Christoffer Dall
2014-09-26 13:16 ` [PATCH 08/27] KVM: vgic: declare probe function pointer as const Christoffer Dall
2014-09-26 13:16 ` [PATCH 09/27] ARM/arm64: KVM: fix use of WnR bit in kvm_is_write_fault() Christoffer Dall
2014-09-26 13:16 ` [PATCH 10/27] KVM: EVENTFD: remove inclusion of irq.h Christoffer Dall
2014-09-26 13:16 ` [PATCH 11/27] arm/arm64: KVM: Rename irq_state to irq_pending Christoffer Dall
2014-09-26 13:16 ` [PATCH 12/27] arm/arm64: KVM: Rename irq_active to irq_queued Christoffer Dall
2014-09-26 13:16 ` [PATCH 13/27] arm/arm64: KVM: vgic: Clear queued flags on unqueue Christoffer Dall
2014-09-26 13:16 ` [PATCH 14/27] arm/arm64: KVM: vgic: Improve handling of GICD_I{CS}PENDRn Christoffer Dall
2014-09-26 13:16 ` [PATCH 15/27] arm/arm64: KVM: vgic: Fix SGI writes to GICD_I{CS}PENDR0 Christoffer Dall
2014-09-26 13:16 ` [PATCH 16/27] arm/arm64: KVM: vgic: Clarify and correct vgic documentation Christoffer Dall
2014-09-26 13:16 ` [PATCH 17/27] KVM: ARM: vgic: plug irq injection race Christoffer Dall
2014-09-26 13:16 ` [PATCH 18/27] arm/arm64: KVM: vgic: switch to dynamic allocation Christoffer Dall
2014-09-26 13:16 ` [PATCH 19/27] arm/arm64: KVM: vgic: Parametrize VGIC_NR_SHARED_IRQS Christoffer Dall
2014-09-26 13:16 ` [PATCH 20/27] arm/arm64: KVM: vgic: kill VGIC_MAX_CPUS Christoffer Dall
2014-09-26 13:16 ` [PATCH 21/27] arm/arm64: KVM: vgic: handle out-of-range MMIO accesses Christoffer Dall
2014-09-26 13:16 ` [PATCH 22/27] arm/arm64: KVM: vgic: kill VGIC_NR_IRQS Christoffer Dall
2014-09-26 13:16 ` [PATCH 23/27] arm/arm64: KVM: vgic: delay vgic allocation until init time Christoffer Dall
2014-09-26 13:16 ` [PATCH 24/27] arm/arm64: KVM: vgic: make number of irqs a configurable attribute Christoffer Dall
2014-09-26 13:16 ` [PATCH 25/27] arm/arm64: KVM: Fix set_clear_sgi_pend_reg offset Christoffer Dall
2014-09-26 13:16 ` [PATCH 26/27] arm/arm64: KVM: Fix VTTBR_BADDR_MASK and pgd alloc Christoffer Dall
2014-09-26 13:17 ` [PATCH 27/27] arm/arm64: KVM: Report correct FSC for unsupported fault types Christoffer Dall
2014-09-27 19:33 ` [PATCH 00/27] Changes for arm/arm64 KVM for 3.18 Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1411737420-9063-4-git-send-email-christoffer.dall@linaro.org \
    --to=christoffer.dall@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).