From patchwork Tue Feb 13 07:10:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christian Zigotzky X-Patchwork-Id: 10215261 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1F21160467 for ; Tue, 13 Feb 2018 07:13:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E3BA28E4B for ; Tue, 13 Feb 2018 07:13:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0299128E52; Tue, 13 Feb 2018 07:13:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MIME_QP_LONG_LINE, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC46028E4B for ; Tue, 13 Feb 2018 07:13:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933539AbeBMHNv (ORCPT ); Tue, 13 Feb 2018 02:13:51 -0500 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.217]:21790 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933536AbeBMHNu (ORCPT ); Tue, 13 Feb 2018 02:13:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1518506028; s=strato-dkim-0002; d=xenosoft.de; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date: In-Reply-To:From:Subject:Content-Type:X-RZG-CLASS-ID:X-RZG-AUTH; bh=Jr2ltrtBiG7TZfRQ7eKNd1/DMUet7Pw+gPXD4yhodDk=; b=HiQO442fIC5tv58Cudlznl25hIzdAbwn/vhSuhSPQBTjIW2NPRzpbYTJwjMcCTo7pA sn4aoeWvVj9jnVrfRk8YrUgSUY9szbdBF9srxv49kPcNZ6DLqweovz5s5/PlknHYdtS3 ldPQyVlibknCLuqP6oBk5XclOvKy7RFoj/AkC0f7ApoifvaeWVnvHxSBsX8itZAddJdh 70wElW81mW0c5JmFrVnsPLEujZeODKzClCRvUqGlO8Dyn4pItPS9qC37TmLcya0G1Jv5 Wo7mFy+pCpY6MJpdPcFnhgVNDGV1ZwmkTKppmZqiirohqjB5mvbseg4YF17ACbh7na8r jt/Q== X-RZG-AUTH: :L2QefEenb+UdBJSdRCXu93KJ1bmSGnhMdmOod1DhGN0rBVhd9dFr6KxrfO5Oh7R7bGd52rpjwXa4G7rkTMKfJmHh/iDqwE8jFc3+2W+c X-RZG-CLASS-ID: mo00 Mime-Version: 1.0 (1.0) Subject: Re: [PATCH 1/2] KVM: PPC: Fix compile error that occurs when CONFIG_ALTIVEC=n From: Christian Zigotzky X-Mailer: iPhone Mail (15C202) In-Reply-To: <20180213045130.r35rdy24uokzixho@oak.ozlabs.ibm.com> Date: Tue, 13 Feb 2018 08:10:41 +0100 Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Message-Id: References: <20180213045130.r35rdy24uokzixho@oak.ozlabs.ibm.com> To: Paul Mackerras Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Thank you. — Christian Sent from my iPhone On 13. Feb 2018, at 05:51, Paul Mackerras wrote: Commit accb757d798c ("KVM: Move vcpu_load to arch-specific kvm_arch_vcpu_ioctl_run", 2017-12-04) added a "goto out" statement and an "out:" label to kvm_arch_vcpu_ioctl_run(). Since the only "goto out" is inside a CONFIG_VSX block, compiling with CONFIG_VSX=n gives a warning that label "out" is defined but not used, and because arch/powerpc is compiled with -Werror, that becomes a compile error that makes the kernel build fail. Merge commit 1ab03c072feb ("Merge tag 'kvm-ppc-next-4.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc", 2018-02-09) added a similar block of code inside a #ifdef CONFIG_ALTIVEC, with a "goto out" statement. In order to make the build succeed, this adds a #ifdef around the "out:" label. This is a minimal, ugly fix, to be replaced later by a refactoring of the code. Since CONFIG_VSX depends on CONFIG_ALTIVEC, it is sufficient to use #ifdef CONFIG_ALTIVEC here. Fixes: accb757d798c ("KVM: Move vcpu_load to arch-specific kvm_arch_vcpu_ioctl_run") Reported-by: Christian Zigotzky Signed-off-by: Paul Mackerras --- arch/powerpc/kvm/powerpc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 403e642c78f5..0083142c2f84 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -1608,7 +1608,9 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run) kvm_sigset_deactivate(vcpu); +#ifdef CONFIG_ALTIVEC out: +#endif vcpu_put(vcpu); return r; }