From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>,
Gerd Hoffmann <kraxel@redhat.com>,
Chen Qun <kuhn.chenqun@huawei.com>
Subject: [PULL 2/2] usb/hcd-ehci: Remove redundant statements
Date: Tue, 10 Mar 2020 09:24:02 +0100 [thread overview]
Message-ID: <20200310082402.22839-3-kraxel@redhat.com> (raw)
In-Reply-To: <20200310082402.22839-1-kraxel@redhat.com>
From: Chen Qun <kuhn.chenqun@huawei.com>
The "again" assignment is meaningless before g_assert_not_reached.
In addition, the break statements no longer needs to be after
g_assert_not_reached.
Clang static code analyzer show warning:
hw/usb/hcd-ehci.c:2108:13: warning: Value stored to 'again' is never read
again = -1;
^ ~~
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200226084647.20636-13-kuhn.chenqun@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb/hcd-ehci.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index 56ab2f457f4c..29d49c2d7e68 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -1301,7 +1301,6 @@ static void ehci_execute_complete(EHCIQueue *q)
/* should not be triggerable */
fprintf(stderr, "USB invalid response %d\n", p->packet.status);
g_assert_not_reached();
- break;
}
/* TODO check 4.12 for splits */
@@ -2105,9 +2104,7 @@ static void ehci_advance_state(EHCIState *ehci, int async)
default:
fprintf(stderr, "Bad state!\n");
- again = -1;
g_assert_not_reached();
- break;
}
if (again < 0 || itd_count > 16) {
--
2.18.2
next prev parent reply other threads:[~2020-03-10 8:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 8:24 [PULL 0/2] Usb 20200310 patches Gerd Hoffmann
2020-03-10 8:24 ` [PULL 1/2] usb-serial: wakeup device on input Gerd Hoffmann
2020-03-10 8:24 ` Gerd Hoffmann [this message]
2020-03-10 8:58 ` [PULL 0/2] Usb 20200310 patches no-reply
2020-03-10 16:50 ` Peter Maydell
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=20200310082402.22839-3-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=kuhn.chenqun@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=samuel.thibault@ens-lyon.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 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).