All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/6] Clean up use of qdev_init()
@ 2009-09-11 20:19 Markus Armbruster
  2009-09-11 20:19 ` [Qemu-devel] [PATCH 1/6] Move function definitions out of xilinx.h Markus Armbruster
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Markus Armbruster @ 2009-09-11 20:19 UTC (permalink / raw)
  To: qemu-devel

qdev_init() can fail since commit 81a322d4.  Most callers don't bother
to check.  This is less serious than it sounds, because they typically
work with devices for which qdev_init() never fails.  It's still
unclean.

The last patch makes the compiler warn when the value of qdev_init()
isn't used.  If that warning triggers after merging this series, more
unchecked calls have crept in since the base of this series (commit
2637c754).  Feel free to ask me for a respin then.

Markus Armbruster (6):
  Move function definitions out of xilinx.h
  Make qdev_init() destroy the device on failure
  Check return value of qdev_init()
  New qdev_init_nofail()
  Make isa_create() terminate program on failure
  Warn if value of qdev_init() isn't checked

 hw/apb_pci.c        |    2 +-
 hw/arm_sysctl.c     |    2 +-
 hw/armv7m.c         |    6 ++--
 hw/axis_dev88.c     |    2 +-
 hw/escc.c           |    4 +-
 hw/esp.c            |    2 +-
 hw/etraxfs.c        |    2 +-
 hw/fdc.c            |    4 +-
 hw/grackle_pci.c    |    2 +-
 hw/i2c.c            |    2 +-
 hw/integratorcp.c   |    2 +-
 hw/isa-bus.c        |   11 +++------
 hw/m48t59.c         |    2 +-
 hw/mc146818rtc.c    |    2 +-
 hw/mips_malta.c     |    2 +-
 hw/musicpal.c       |    4 +-
 hw/ne2000-isa.c     |    2 +-
 hw/pc.c             |    2 +-
 hw/pci-hotplug.c    |    4 +-
 hw/pci.c            |    9 ++++---
 hw/piix_pci.c       |    2 +-
 hw/qdev.c           |   26 +++++++++++++++++++---
 hw/qdev.h           |    3 +-
 hw/scsi-bus.c       |    4 ++-
 hw/smc91c111.c      |    2 +-
 hw/ssi.c            |    2 +-
 hw/stellaris.c      |    2 +-
 hw/sun4m.c          |   28 ++++++++++++------------
 hw/sun4u.c          |    4 +-
 hw/syborg.c         |    4 +-
 hw/sysbus.c         |    2 +-
 hw/unin_pci.c       |    2 +-
 hw/usb-bus.c        |    2 +-
 hw/usb-msd.c        |    3 +-
 hw/vga-pci.c        |    2 +-
 hw/xilinx.h         |   58 ++++++++------------------------------------------
 hw/xilinx_ethlite.c |   19 ++++++++++++++++
 hw/xilinx_intc.c    |   14 ++++++++++++
 hw/xilinx_timer.c   |   15 +++++++++++++
 usb-linux.c         |    4 +-
 40 files changed, 148 insertions(+), 118 deletions(-)

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-09-14 19:24 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-11 20:19 [Qemu-devel] [PATCH 0/6] Clean up use of qdev_init() Markus Armbruster
2009-09-11 20:19 ` [Qemu-devel] [PATCH 1/6] Move function definitions out of xilinx.h Markus Armbruster
2009-09-12  6:04   ` Blue Swirl
2009-09-12 10:10     ` Edgar E. Iglesias
2009-09-14  8:57       ` Gerd Hoffmann
2009-09-14  9:15         ` Edgar E. Iglesias
2009-09-14 16:18           ` Blue Swirl
2009-09-14 18:59             ` Markus Armbruster
2009-09-14 19:24               ` Blue Swirl
2009-09-11 20:19 ` [Qemu-devel] [PATCH 2/6] Make qdev_init() destroy the device on failure Markus Armbruster
2009-09-11 20:19 ` [Qemu-devel] [PATCH 3/6] Check return value of qdev_init() Markus Armbruster
2009-09-11 20:19 ` [Qemu-devel] [PATCH 4/6] New qdev_init_nofail() Markus Armbruster
2009-09-11 20:19 ` [Qemu-devel] [PATCH 5/6] Make isa_create() terminate program on failure Markus Armbruster
2009-09-11 20:19 ` [Qemu-devel] [PATCH 6/6] Warn if value of qdev_init() isn't checked Markus Armbruster
2009-09-14  8:43 ` [Qemu-devel] [PATCH 0/6] Clean up use of qdev_init() Gerd Hoffmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.