qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH REBASE/RESEND 1/4] qdev: Add a description field


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH REBASE/RESEND 1/4] qdev: Add a description field for qdev properties for documentation
Date: Tue, 15 Feb 2011 10:43:42 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Lightning/1.0b1 Thunderbird/3.0.10

On 02/04/2011 12:18 AM, Amit Shah wrote:
Add a 'description' along with each qdev property to document the input
each qdev property takes.

Signed-off-by: Amit Shah<address@hidden>
Acked-by: Markus Armbruster<address@hidden>
---
  block_int.h             |   14 ++++----
  hw/a9mpcore.c           |    2 +-
  hw/acpi_piix4.c         |    2 +-
  hw/apic.c               |    4 +-
  hw/applesmc.c           |    4 +-
  hw/arm11mpcore.c        |    4 +-
  hw/arm_sysctl.c         |    4 +-
  hw/armv7m.c             |    2 +-
  hw/cs4231a.c            |    6 ++--
  hw/debugcon.c           |    6 ++--
  hw/eccmemctl.c          |    2 +-
  hw/escc.c               |   16 +++++-----
  hw/etraxfs_pic.c        |    3 +-
  hw/fdc.c                |   14 ++++----
  hw/fw_cfg.c             |    4 +-
  hw/grlib_apbuart.c      |    2 +-
  hw/grlib_gptimer.c      |    6 ++--
  hw/grlib_irqmp.c        |    4 +-
  hw/gus.c                |    8 ++--
  hw/hda-audio.c          |    2 +-
  hw/hpet.c               |    4 +-
  hw/i2c.c                |    2 +-
  hw/ide/cmd646.c         |    2 +-
  hw/ide/isa.c            |    6 ++--
  hw/ide/qdev.c           |    6 ++--
  hw/integratorcp.c       |    2 +-
  hw/intel-hda.c          |    6 ++--
  hw/ioh3420.c            |    8 ++--
  hw/ivshmem.c            |   15 +++++----
  hw/lance.c              |    2 +-
  hw/m48t59.c             |   12 ++++----
  hw/mc146818rtc.c        |    2 +-
  hw/ne2000-isa.c         |    4 +-
  hw/parallel.c           |    8 ++--
  hw/pci.c                |   10 +++---
  hw/pxa2xx_gpio.c        |    4 +-
  hw/qdev-addr.h          |    4 +-
  hw/qdev.c               |    3 +-
  hw/qdev.h               |   75 +++++++++++++++++++++++++----------------------
  hw/s390-virtio-bus.c    |    2 +-
  hw/sb16.c               |   10 +++---
  hw/scsi-bus.c           |    2 +-
  hw/scsi-disk.c          |    9 ++++--
  hw/serial.c             |    8 ++--
  hw/slavio_timer.c       |    2 +-
  hw/smbus_eeprom.c       |    2 +-
  hw/sparc32_dma.c        |    4 +-
  hw/spitz.c              |    5 ++-
  hw/sun4m.c              |    2 +-
  hw/sun4m_iommu.c        |    2 +-
  hw/sun4u.c              |    2 +-
  hw/syborg_fb.c          |    4 +-
  hw/syborg_interrupt.c   |    2 +-
  hw/syborg_keyboard.c    |    2 +-
  hw/syborg_pointer.c     |    4 +-
  hw/syborg_serial.c      |    2 +-
  hw/syborg_timer.c       |    2 +-
  hw/syborg_virtio.c      |    6 ++--
  hw/tcx.c                |   10 +++---
  hw/usb-bus.c            |    2 +-
  hw/usb-msd.c            |    2 +-
  hw/usb-ohci.c           |    4 +-
  hw/usb-serial.c         |    4 +-
  hw/virtio-blk.h         |    4 +-
  hw/virtio-console.c     |   16 +++++----
  hw/virtio-net.h         |   51 ++++++++++++++++++++-----------
  hw/virtio-pci.c         |   26 ++++++++--------
  hw/virtio.h             |    2 +-
  hw/vt82c686.c           |    2 +-
  hw/xilinx_ethlite.c     |    6 ++-
  hw/xilinx_intc.c        |    3 +-
  hw/xilinx_timer.c       |    4 +-
  hw/xio3130_downstream.c |    8 ++--
  hw/xio3130_upstream.c   |    4 +-
  net.h                   |    8 ++--
  usb-linux.c             |    8 ++--
  76 files changed, 276 insertions(+), 244 deletions(-)

diff --git a/block_int.h b/block_int.h
index 6ebdc3e..fdde005 100644
--- a/block_int.h
+++ b/block_int.h
@@ -250,15 +250,15 @@ static inline unsigned int 
get_physical_block_exp(BlockConf *conf)
  }

  #define DEFINE_BLOCK_PROPERTIES(_state, _conf)                          \
-    DEFINE_PROP_DRIVE("drive", _state, _conf.bs),                       \
+    DEFINE_PROP_DRIVE("drive", _state, _conf.bs, ""),                   \
      DEFINE_PROP_UINT16("logical_block_size", _state,                    \
-                       _conf.logical_block_size, 512),                  \
+                       _conf.logical_block_size, 512, ""),              \
      DEFINE_PROP_UINT16("physical_block_size", _state,                   \
-                       _conf.physical_block_size, 512),                 \
-    DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0),  \
-    DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0),    \
-    DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1),        \
+                       _conf.physical_block_size, 512, ""),             \
+    DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0, ""), \
+    DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0, ""), \
+        DEFINE_PROP_INT32("bootindex", _state, _conf.bootindex, -1, ""), \
      DEFINE_PROP_UINT32("discard_granularity", _state, \
-                       _conf.discard_granularity, 0)
+                       _conf.discard_granularity, 0, "")

This is pretty horribly ugly. If we were going this, we should at least introduce new defines that include a documentation field and not just add empty documentation fields.

Regards,

Anthony Liguori



reply via email to

[Prev in Thread] Current Thread [Next in Thread]