From patchwork Tue Aug 9 00:30:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liang Li X-Patchwork-Id: 9270035 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 951C660754 for ; Tue, 9 Aug 2016 00:38:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 872B5280DE for ; Tue, 9 Aug 2016 00:38:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C3002837F; Tue, 9 Aug 2016 00:38:45 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0C397280DE for ; Tue, 9 Aug 2016 00:38:44 +0000 (UTC) Received: from localhost ([::1]:32779 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWv47-00073P-H6 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 08 Aug 2016 20:38:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWv3r-00073C-M1 for qemu-devel@nongnu.org; Mon, 08 Aug 2016 20:38:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bWv3n-0006rv-HX for qemu-devel@nongnu.org; Mon, 08 Aug 2016 20:38:26 -0400 Received: from mga04.intel.com ([192.55.52.120]:44103) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWv3n-0006rE-Bw for qemu-devel@nongnu.org; Mon, 08 Aug 2016 20:38:23 -0400 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP; 08 Aug 2016 17:38:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,492,1464678000"; d="scan'208";a="862023245" Received: from ll.sh.intel.com (HELO localhost) ([10.239.13.123]) by orsmga003.jf.intel.com with ESMTP; 08 Aug 2016 17:38:19 -0700 From: Liang Li To: qemu-devel@nongnu.org Date: Tue, 9 Aug 2016 08:30:42 +0800 Message-Id: <1470702642-24580-1-git-send-email-liang.z.li@intel.com> X-Mailer: git-send-email 1.9.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.120 Subject: [Qemu-devel] [PATCH repost] virtio-balloon: Remove needless precompiled directive X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, Liang Li , dgilbert@redhat.com, mst@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Since there in wrapper around madvise(), the virtio-balloon code is able to work without the precompiled directive, the directive can be removed. Signed-off-by: Liang Li Suggested-by: Thomas Huth Reviewd-by: Dr. David Alan Gilbert --- hw/virtio/virtio-balloon.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 5af429a..61325f2 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -34,13 +34,11 @@ static void balloon_page(void *addr, int deflate) { -#if defined(__linux__) if (!qemu_balloon_is_inhibited() && (!kvm_enabled() || kvm_has_sync_mmu())) { qemu_madvise(addr, BALLOON_PAGE_SIZE, deflate ? QEMU_MADV_WILLNEED : QEMU_MADV_DONTNEED); } -#endif } static const char *balloon_stat_names[] = {