[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 40/42] vhost-scsi: move qdev properties into vhost-sc
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 40/42] vhost-scsi: move qdev properties into vhost-scsi.c |
Date: |
Thu, 11 Jun 2015 14:01:33 +0200 |
From: Shannon Zhao <address@hidden>
As only one place in vhost-scsi.c uses DEFINE_VHOST_SCSI_PROPERTIES,
there is no need to expose it. Inline it into vhost-scsi.c to avoid
wrongly use.
Signed-off-by: Shannon Zhao <address@hidden>
Signed-off-by: Shannon Zhao <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Acked-by: Cornelia Huck <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
include/hw/virtio/vhost-scsi.h | 9 ---------
hw/scsi/vhost-scsi.c | 9 ++++++++-
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/include/hw/virtio/vhost-scsi.h b/include/hw/virtio/vhost-scsi.h
index dea0075..701bfee 100644
--- a/include/hw/virtio/vhost-scsi.h
+++ b/include/hw/virtio/vhost-scsi.h
@@ -66,13 +66,4 @@ typedef struct VHostSCSI {
int lun;
} VHostSCSI;
-#define DEFINE_VHOST_SCSI_PROPERTIES(_state, _conf_field) \
- DEFINE_PROP_STRING("vhostfd", _state, _conf_field.vhostfd), \
- DEFINE_PROP_STRING("wwpn", _state, _conf_field.wwpn), \
- DEFINE_PROP_UINT32("boot_tpgt", _state, _conf_field.boot_tpgt, 0), \
- DEFINE_PROP_UINT32("num_queues", _state, _conf_field.num_queues, 1), \
- DEFINE_PROP_UINT32("max_sectors", _state, _conf_field.max_sectors,
0xFFFF), \
- DEFINE_PROP_UINT32("cmd_per_lun", _state, _conf_field.cmd_per_lun, 128)
-
-
#endif
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index 9c76486..1941aa1 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -294,7 +294,14 @@ static char *vhost_scsi_get_fw_dev_path(FWPathProvider *p,
BusState *bus,
}
static Property vhost_scsi_properties[] = {
- DEFINE_VHOST_SCSI_PROPERTIES(VHostSCSI, parent_obj.conf),
+ DEFINE_PROP_STRING("vhostfd", VHostSCSI, parent_obj.conf.vhostfd),
+ DEFINE_PROP_STRING("wwpn", VHostSCSI, parent_obj.conf.wwpn),
+ DEFINE_PROP_UINT32("boot_tpgt", VHostSCSI, parent_obj.conf.boot_tpgt, 0),
+ DEFINE_PROP_UINT32("num_queues", VHostSCSI, parent_obj.conf.num_queues, 1),
+ DEFINE_PROP_UINT32("max_sectors", VHostSCSI, parent_obj.conf.max_sectors,
+ 0xFFFF),
+ DEFINE_PROP_UINT32("cmd_per_lun", VHostSCSI, parent_obj.conf.cmd_per_lun,
+ 128),
DEFINE_PROP_END_OF_LIST(),
};
--
MST
- [Qemu-devel] [PULL 31/42] pci: add PCI_CLASS_INPUT_*, (continued)
- [Qemu-devel] [PULL 31/42] pci: add PCI_CLASS_INPUT_*, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 30/42] virtio-pci: fill VirtIOPCIRegions early., Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 32/42] virtio-input: core code & base class [pci], Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 34/42] virtio-net: move qdev properties into virtio-net.c, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 33/42] virtio-input: emulated devices [pci], Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 35/42] virtio-net.h: Remove unsed DEFINE_VIRTIO_NET_PROPERTIES, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 36/42] virtio-scsi: move qdev properties into virtio-scsi.c, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 37/42] virtio-rng: move qdev properties into virtio-rng.c, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 39/42] virtio-9p-device: move qdev properties into virtio-9p-device.c, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 38/42] virtio-serial-bus: move qdev properties into virtio-serial-bus.c, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 40/42] vhost-scsi: move qdev properties into vhost-scsi.c,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 41/42] i386/acpi-build: more traditional _UID and _HID for PXB root buses, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 42/42] i386/acpi-build: fix PXB workarounds for unsupported BIOSes, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 21/42] virtio-pci: correctly set host notifiers for modern bar, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 20/42] virtio-pci: make modern bar 64bit + prefetchable, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 19/42] virtio-pci: change & document virtio pci bar layout., Michael S. Tsirkin, 2015/06/11
- Re: [Qemu-devel] [PULL 00/42] pc, acpi, virtio, Peter Maydell, 2015/06/11