From: Liang Li Date: Tue, 9 Aug 2016 00:30:42 +0000 (+0800) Subject: virtio-balloon: Remove needless precompiled directive X-Git-Tag: v2.8.0-rc0~86^2~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=17871f71fd2ff5d76196051470e9604bfb6f0c09;p=thirdparty%2Fqemu.git virtio-balloon: Remove needless precompiled directive 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 Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 49a2f4aade1..eb572e6cdbf 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[] = {