* [Qemu-devel] [PATCH] virtio-blk: Remove duplicate property definition
@ 2012-11-15 2:12 David Gibson
2012-11-16 12:21 ` Stefan Hajnoczi
2012-11-19 11:38 ` Stefan Hajnoczi
0 siblings, 2 replies; 3+ messages in thread
From: David Gibson @ 2012-11-15 2:12 UTC (permalink / raw)
To: kwolf
Cc: Anthony Liguori, Paul 'Rusty' Russell, qemu-devel,
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 <kwolf@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>
Cc: Paul 'Rusty' Russell <rusty@rustcorp.com.au>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
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),
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] virtio-blk: Remove duplicate property definition
2012-11-15 2:12 [Qemu-devel] [PATCH] virtio-blk: Remove duplicate property definition David Gibson
@ 2012-11-16 12:21 ` Stefan Hajnoczi
2012-11-19 11:38 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2012-11-16 12:21 UTC (permalink / raw)
To: David Gibson
Cc: kwolf, Anthony Liguori, Paul 'Rusty' Russell, qemu-devel
On Thu, Nov 15, 2012 at 01:12:14PM +1100, David Gibson wrote:
> 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 <kwolf@redhat.com>
> Cc: Anthony Liguori <aliguori@us.ibm.com>
> Cc: Paul 'Rusty' Russell <rusty@rustcorp.com.au>
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> hw/virtio-blk.h | 1 -
> hw/virtio-pci.c | 1 -
> 2 files changed, 2 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] virtio-blk: Remove duplicate property definition
2012-11-15 2:12 [Qemu-devel] [PATCH] virtio-blk: Remove duplicate property definition David Gibson
2012-11-16 12:21 ` Stefan Hajnoczi
@ 2012-11-19 11:38 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2012-11-19 11:38 UTC (permalink / raw)
To: David Gibson
Cc: kwolf, Anthony Liguori, Paul 'Rusty' Russell, qemu-devel
On Thu, Nov 15, 2012 at 01:12:14PM +1100, David Gibson wrote:
> 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 <kwolf@redhat.com>
> Cc: Anthony Liguori <aliguori@us.ibm.com>
> Cc: Paul 'Rusty' Russell <rusty@rustcorp.com.au>
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-19 11:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-15 2:12 [Qemu-devel] [PATCH] virtio-blk: Remove duplicate property definition David Gibson
2012-11-16 12:21 ` Stefan Hajnoczi
2012-11-19 11:38 ` Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).