All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 0/7] Clean up use of qdev_init()
Date: Wed,  7 Oct 2009 01:15:54 +0200	[thread overview]
Message-ID: <cover.1254867902.git.armbru@redhat.com> (raw)

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 second to 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.

Changes since v1:

* Drop cleanup of xilinx.h

* Fix a bug that crept into usb-linux since v1

* Cover new uses of qdev_init()

* Clean up test for qdev_init() failure

Markus Armbruster (7):
  Unbreak USB autoconnect filters
  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
  Clean up test for qdev_init() failure

 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          |    8 +++-----
 hw/grackle_pci.c  |    2 +-
 hw/i2c.c          |    2 +-
 hw/ide/isa.c      |    2 +-
 hw/ide/pci.c      |    2 +-
 hw/ide/qdev.c     |    2 +-
 hw/integratorcp.c |    2 +-
 hw/isa-bus.c      |   11 ++++-------
 hw/m48t59.c       |    4 ++--
 hw/mc146818rtc.c  |    2 +-
 hw/mips_malta.c   |    2 +-
 hw/musicpal.c     |    4 ++--
 hw/ne2000-isa.c   |    2 +-
 hw/parallel.c     |    2 +-
 hw/pc.c           |    2 +-
 hw/pci-hotplug.c  |    4 ++--
 hw/pci.c          |    5 +++--
 hw/piix_pci.c     |    2 +-
 hw/qdev.c         |   26 ++++++++++++++++++++++----
 hw/qdev.h         |    3 ++-
 hw/scsi-bus.c     |    4 +++-
 hw/serial.c       |    2 +-
 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       |    6 +++---
 usb-linux.c       |    8 ++++----
 42 files changed, 100 insertions(+), 82 deletions(-)

             reply	other threads:[~2009-10-06 23:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-06 23:15 Markus Armbruster [this message]
2009-10-06 23:15 ` [Qemu-devel] [PATCH 1/7] Unbreak USB autoconnect filters Markus Armbruster
2009-10-06 23:15 ` [Qemu-devel] [PATCH 2/7] Make qdev_init() destroy the device on failure Markus Armbruster
2009-10-06 23:15 ` [Qemu-devel] [PATCH 3/7] Check return value of qdev_init() Markus Armbruster
2009-10-06 23:15 ` [Qemu-devel] [PATCH 4/7] New qdev_init_nofail() Markus Armbruster
2009-10-06 23:15 ` [Qemu-devel] [PATCH 5/7] Make isa_create() terminate program on failure Markus Armbruster
2009-10-06 23:16 ` [Qemu-devel] [PATCH 6/7] Warn if value of qdev_init() isn't checked Markus Armbruster
2009-10-06 23:16 ` [Qemu-devel] [PATCH 7/7] Clean up test for qdev_init() failure Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1254867902.git.armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.