From patchwork Wed Feb 28 02:31:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: simon X-Patchwork-Id: 10246543 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 7C58F60362 for ; Wed, 28 Feb 2018 02:32:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B811289E9 for ; Wed, 28 Feb 2018 02:32:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F30F28AAF; Wed, 28 Feb 2018 02:32:01 +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, FREEMAIL_FROM, 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 04111289E9 for ; Wed, 28 Feb 2018 02:32:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751713AbeB1Cb6 (ORCPT ); Tue, 27 Feb 2018 21:31:58 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:32819 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751628AbeB1Cb5 (ORCPT ); Tue, 27 Feb 2018 21:31:57 -0500 Received: by mail-pg0-f68.google.com with SMTP id g12so406118pgs.0; Tue, 27 Feb 2018 18:31:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=jDE8pTQJYsrUdQq7HROFA8qzn0moT581Sssze1gd7ng=; b=u8WzbsgeiZaXKTTJD/UDDJNKr4GYmoxrY+HvftK+39yuKpdWJ3srRqFw92ASZl/lp0 L1EclgGkZ1JJLvcsd+3r1Kr+7krcAUWplE+x16raz5WWawlTuYP0DF4HDi3kvu/Ej4n1 rHaPrecqLTayBzmR5UCkDyusKvwX/sI26YxOejtzMOaXLeLI2uZ84dLk0+3VBeFrsJXO nSXhe0/YDBBwAv51XuniTIb/t+wh7Ph4noFOuOgWkc3N9+FXIj2I5XeaHHZvP2cprOGi /hbbMfBtCwkW24s/+VhgtmloIYwCriPsgfxNycSs0+2kpCrgNoorSyVvdfj14aWc9/41 WKsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=jDE8pTQJYsrUdQq7HROFA8qzn0moT581Sssze1gd7ng=; b=GKyzKYAUD99DZNUIqz6/erNMFngXKDx+0bBRfD55B/HTA3ORB7kP+N4XbKgsRP80Nk gMH86LvTvJewvKtdw3i2cGRKfH/BnIuk7y4cbhqmM4AZjUnDd/S8wAzpl24JYlQCBFMF ATEJa5RJ30WNSHWKhPWDjfm0FRyGpdjlofpOypD42uzmRS7XGAU7yVmp3Rdf9emfNgYS V6D0N//BeDwT8Zf9sHACGTQbva1z1TCVIg7ltJUf8oTHjupf+JBeFYhophHNlTK8jJK+ iDCuFIOIJdLCY1bnmVQPkE+bMzA70sp3QbKA6nEoniR04bPo0WDwgZJqY0na572/FJyx v4Tg== X-Gm-Message-State: APf1xPCgzD5s0rlYhhGny7Y06XsTsmLOfriC0EZH9pK2sSXW6a5+fguI nbWZ84V9TuPsdI5z8R7jdEfFPw== X-Google-Smtp-Source: AH8x226iFus/miQUgX+4R4SHgqs2O8wUqrc7sWPuBdTgvjKKuBauGggKbbxzS0JX/N44iPihnUX8UQ== X-Received: by 10.98.210.70 with SMTP id c67mr16032822pfg.164.1519785116882; Tue, 27 Feb 2018 18:31:56 -0800 (PST) Received: from simonLocalRHEL7.cn.ibm.com ([112.73.0.86]) by smtp.gmail.com with ESMTPSA id i1sm714154pfi.116.2018.02.27.18.31.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Feb 2018 18:31:56 -0800 (PST) From: wei.guo.simon@gmail.com To: kvm@vger.kernel.org Cc: linux-s390@vger.kernel.org, linux-mips@linux-mips.org, linuxppc-dev@lists.ozlabs.org, Paolo Bonzini , Simon Guo Subject: [PATCH] KVM: surround kvm_arch_vcpu_async_ioctl() with #ifdef Date: Wed, 28 Feb 2018 10:31:39 +0800 Message-Id: <1519785099-13808-1-git-send-email-wei.guo.simon@gmail.com> X-Mailer: git-send-email 1.8.3.1 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Simon Guo Although CONFIG_HAVE_KVM_VCPU_ASYNC_IOCTL is usually on, logically kvm_arch_vcpu_async_ioctl() definition should be wrapped with CONFIG_HAVE_KVM_VCPU_ASYNC_IOCTL #ifdef. This patch adds the #ifdef surround. Signed-off-by: Simon Guo --- arch/mips/kvm/mips.c | 2 ++ arch/powerpc/kvm/powerpc.c | 2 ++ arch/s390/kvm/kvm-s390.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c index 2549fdd..4d593e5 100644 --- a/arch/mips/kvm/mips.c +++ b/arch/mips/kvm/mips.c @@ -903,6 +903,7 @@ static int kvm_vcpu_ioctl_enable_cap(struct kvm_vcpu *vcpu, return r; } +#ifdef CONFIG_HAVE_KVM_VCPU_ASYNC_IOCTL long kvm_arch_vcpu_async_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) { @@ -922,6 +923,7 @@ long kvm_arch_vcpu_async_ioctl(struct file *filp, unsigned int ioctl, return -ENOIOCTLCMD; } +#endif long kvm_arch_vcpu_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 403e642..2adca3c 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -1757,6 +1757,7 @@ int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu, return -EINVAL; } +#ifdef CONFIG_HAVE_KVM_VCPU_ASYNC_IOCTL long kvm_arch_vcpu_async_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) { @@ -1771,6 +1772,7 @@ long kvm_arch_vcpu_async_ioctl(struct file *filp, } return -ENOIOCTLCMD; } +#endif long kvm_arch_vcpu_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 77d7818..c499396 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -3784,6 +3784,7 @@ static long kvm_s390_guest_mem_op(struct kvm_vcpu *vcpu, return r; } +#ifdef CONFIG_HAVE_KVM_VCPU_ASYNC_IOCTL long kvm_arch_vcpu_async_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) { @@ -3811,6 +3812,7 @@ long kvm_arch_vcpu_async_ioctl(struct file *filp, } return -ENOIOCTLCMD; } +#endif long kvm_arch_vcpu_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg)