From patchwork Thu Nov 15 02:12:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 199105 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9AEE52C0087 for ; Thu, 15 Nov 2012 13:10:54 +1100 (EST) Received: from localhost ([::1]:52227 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYouq-0006P7-LA for incoming@patchwork.ozlabs.org; Wed, 14 Nov 2012 21:10:52 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYoug-0006Oy-Ii for qemu-devel@nongnu.org; Wed, 14 Nov 2012 21:10:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYoud-0006vC-C4 for qemu-devel@nongnu.org; Wed, 14 Nov 2012 21:10:42 -0500 Received: from ozlabs.org ([203.10.76.45]:33452) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYoud-0006uy-1B for qemu-devel@nongnu.org; Wed, 14 Nov 2012 21:10:39 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id B75B22C0087; Thu, 15 Nov 2012 13:10:36 +1100 (EST) From: David Gibson To: kwolf@redhat.com Date: Thu, 15 Nov 2012 13:12:14 +1100 Message-Id: <1352945534-20257-1-git-send-email-david@gibson.dropbear.id.au> X-Mailer: git-send-email 1.7.10.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 203.10.76.45 Cc: Anthony Liguori , Paul 'Rusty' Russell , qemu-devel@nongnu.org, David Gibson Subject: [Qemu-devel] [PATCH] virtio-blk: Remove duplicate property definition X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org For the virtio-blk device (via virtio-pci) the property "config-wce" is defined in two places. First, it's defined from the DEFINE_VIRTIO_BLK_FEATURES macro, second it's defined directly in virtio-pci, just two lines above the call to that macro. The direct definition in virtio-pci.c is broken, since it operates on the 'config_wce' field of VirtIOBlkConf, which is never used anywhere else. Therefore, this patch removes both the extra property definition and the redundant field it works on. Cc: Kevin Wolf Cc: Anthony Liguori Cc: Paul 'Rusty' Russell Signed-off-by: David Gibson Reviewed-by: Stefan Hajnoczi --- hw/virtio-blk.h | 1 - hw/virtio-pci.c | 1 - 2 files changed, 2 deletions(-) diff --git a/hw/virtio-blk.h b/hw/virtio-blk.h index f0740d0..651a000 100644 --- a/hw/virtio-blk.h +++ b/hw/virtio-blk.h @@ -104,7 +104,6 @@ struct VirtIOBlkConf BlockConf conf; char *serial; uint32_t scsi; - uint32_t config_wce; }; #define DEFINE_VIRTIO_BLK_FEATURES(_state, _field) \ diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index 9603150..e8ee651 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -860,7 +860,6 @@ static Property virtio_blk_properties[] = { #ifdef __linux__ DEFINE_PROP_BIT("scsi", VirtIOPCIProxy, blk.scsi, 0, true), #endif - DEFINE_PROP_BIT("config-wce", VirtIOPCIProxy, blk.config_wce, 0, true), DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true), DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2), DEFINE_VIRTIO_BLK_FEATURES(VirtIOPCIProxy, host_features),