From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com, stefanha@linux.vnet.ibm.com,
Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>,
armbru@redhat.com, zwu.kernel@gmail.com, ryanh@us.ibm.com,
luowenj@cn.ibm.com
Subject: [Qemu-devel] [PATCH] qdev: Remove some non-run codes in qdev_walk_children().
Date: Mon, 8 Aug 2011 12:15:32 +0800 [thread overview]
Message-ID: <1312776932-15081-1-git-send-email-wuzhy@linux.vnet.ibm.com> (raw)
As you have known, qdev_reset_one() forever return a ZERO value to its caller, so some branches can not be forever covered in qdev_walk_children().
I thought that the return value for dev->info->reset(dev) can be returned, but dev->info->reset(dev) is referring to a function with void type.
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
---
hw/qdev.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/hw/qdev.c b/hw/qdev.c
index 292b52f..cbc5e02 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -513,10 +513,7 @@ int qdev_walk_children(DeviceState *dev, qdev_walkerfn *devfn,
int err;
if (devfn) {
- err = devfn(dev, opaque);
- if (err) {
- return err;
- }
+ devfn(dev, opaque);
}
QLIST_FOREACH(bus, &dev->child_bus, sibling) {
--
1.7.2.3
next reply other threads:[~2011-08-08 4:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-08 4:15 Zhi Yong Wu [this message]
2011-08-11 19:40 ` [Qemu-devel] [PATCH] qdev: Remove some non-run codes in qdev_walk_children() Anthony Liguori
2011-08-12 2:14 ` Zhi Yong Wu
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=1312776932-15081-1-git-send-email-wuzhy@linux.vnet.ibm.com \
--to=wuzhy@linux.vnet.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=armbru@redhat.com \
--cc=luowenj@cn.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=ryanh@us.ibm.com \
--cc=stefanha@linux.vnet.ibm.com \
--cc=zwu.kernel@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).