Skip to contentSkip to conversation

virtio-blk: Remove duplicate property definition

PATCH Applied David Gibson 2 participants 3 messages Nov 15, 2012 – Nov 19, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio-blk: Remove duplicate property definition

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 <[email protected]>
Cc Anthony Liguori <[email protected]>
Cc Paul 'Rusty' Russell <[email protected]>
---
 hw/virtio-blk.h |    1 -
 hw/virtio-pci.c |    1 -
 2 files changed, 2 deletions(-)
hw/virtio-blk.h +0 -1
index f0740d0..651a000 100644
@@ -104,7 +104,6 @@ struct VirtIOBlkConf
     BlockConf conf;
     char *serial;
     uint32_t scsi;
-    uint32_t config_wce;
 };
 
 #define DEFINE_VIRTIO_BLK_FEATURES(_state, _field) \
hw/virtio-pci.c +0 -1
index 9603150..e8ee651 100644
@@ -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),
Signature · 1 line
1.7.10.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · David Gibson

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 <[email protected]>
Cc Anthony Liguori <[email protected]>
Cc Paul 'Rusty' Russell <[email protected]>
Quoted 5 lines
---
 hw/virtio-blk.h |    1 -
 hw/virtio-pci.c |    1 -
 2 files changed, 2 deletions(-)
#2 lore raw
In reply to David Gibson
Quoted 14 lines · David Gibson

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 <[email protected]>
Cc Anthony Liguori <[email protected]>
Cc Paul 'Rusty' Russell <[email protected]>
Quoted 5 lines
---
 hw/virtio-blk.h |    1 -
 hw/virtio-pci.c |    1 -
 2 files changed, 2 deletions(-)

Thanks, applied to the block-next tree:
https://github.com/stefanha/qemu/commits/block-next

Stefan