Skip to contentSkip to conversation

KVM: PPC: Book3S PR: Fix -Werror=return-type build failure

PATCH In review David Michael 2 participants 2 messages Jan 26, 2020 – Jan 30, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: PPC: Book3S PR: Fix -Werror=return-type build failure

---

Hi,

I attempted to build 5.4.15 for PPC with KVM enabled using GCC 9.2.0 (on Gentoo), and compilation fails due to no return statement in a non-void function.

Can this fix be applied?

Thanks.

David

 arch/powerpc/kvm/book3s_pr.c | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/kvm/book3s_pr.c +1 -0
index ce4fcf76e..eb86a2f26 100644
@@ -2030,6 +2030,7 @@ static int kvm_vm_ioctl_get_smmu_info_pr(struct kvm *kvm,
 {
 	/* We should not get called */
 	BUG();
+	return 0;
 }
 #endif /* CONFIG_PPC64 */
 
Signature · 1 line
2.21.1
#1 lore raw
Quoted 10 lines · David Michael

---

Hi,

I attempted to build 5.4.15 for PPC with KVM enabled using GCC 9.2.0 (on Gentoo), and compilation fails due to no return statement in a non-void function.

Can this fix be applied?

Thanks, patch applied to my kvm-ppc-next branch.

Paul.