From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=35411 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpO0f-0004o2-Om for qemu-devel@nongnu.org; Tue, 15 Feb 2011 11:44:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PpO0d-0002r3-84 for qemu-devel@nongnu.org; Tue, 15 Feb 2011 11:44:16 -0500 Received: from mail-qw0-f45.google.com ([209.85.216.45]:49422) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PpO0d-0002qn-2S for qemu-devel@nongnu.org; Tue, 15 Feb 2011 11:44:15 -0500 Received: by qwk4 with SMTP id 4so294742qwk.4 for ; Tue, 15 Feb 2011 08:44:14 -0800 (PST) Message-ID: <4D5AAD3E.6010201@codemonkey.ws> Date: Tue, 15 Feb 2011 10:43:42 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH REBASE/RESEND 1/4] qdev: Add a description field for qdev properties for documentation References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: qemu list , Markus Armbruster 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 > Acked-by: Markus Armbruster > --- > 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