From: Laurent Vivier <laurent@vivier.eu>
To: Chen Qun <kuhn.chenqun@huawei.com>,
qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Cc: peter.maydell@linaro.org, "Euler Robot" <euler.robot@huawei.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
zhang.zhanghailiang@huawei.com,
"Gerd Hoffmann" <kraxel@redhat.com>
Subject: Re: [PATCH v3 11/12] usb/hcd-ehci: Remove redundant statements
Date: Mon, 9 Mar 2020 13:42:58 +0100 [thread overview]
Message-ID: <e786f342-7ba6-1c25-dea7-a34372a4ff81@vivier.eu> (raw)
In-Reply-To: <20200302130715.29440-13-kuhn.chenqun@huawei.com>
Le 02/03/2020 à 14:07, Chen Qun a écrit :
> 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>
> ---
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Philippe Mathieu-Daudé <philmd@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 56ab2f457f..29d49c2d7e 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) {
>
Applied to my trivial-patches branch.
Thanks,
Laurent
next prev parent reply other threads:[~2020-03-09 12:44 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-02 13:07 [PATCH v3 00/12] redundant code: Fix warnings reported by Clang static code analyzer Chen Qun
2020-03-02 13:07 ` Chen Qun
2020-03-02 13:07 ` [PATCH v3 01/12] block/stream: Remove redundant statement in stream_run() Chen Qun
2020-03-09 12:13 ` Laurent Vivier
2020-03-02 13:07 ` [PATCH v3 02/12] block/iscsi:Remove redundant statement in iscsi_open() Chen Qun
2020-03-10 14:26 ` Kevin Wolf
2020-03-10 15:02 ` Laurent Vivier
2020-03-11 2:04 ` Chenqun (kuhn)
2020-03-02 13:07 ` [PATCH v3 03/12] block/file-posix: Remove redundant statement in raw_handle_perm_lock() Chen Qun
2020-03-09 12:18 ` Laurent Vivier
2020-03-02 13:07 ` [PATCH v3 04/12] scsi/esp-pci: Remove redundant statement in esp_pci_io_write() Chen Qun
2020-03-09 12:21 ` Laurent Vivier
2020-03-10 11:52 ` Chenqun (kuhn)
2020-03-10 13:00 ` Laurent Vivier
2020-03-02 13:07 ` [PATCH v3 05/12] scsi/scsi-disk: Remove redundant statement in scsi_disk_emulate_command() Chen Qun
2020-03-09 12:30 ` Laurent Vivier
2020-03-09 12:52 ` Laurent Vivier
2020-03-02 13:07 ` [PATCH v3 06/12] display/pxa2xx_lcd: Remove redundant statement in pxa2xx_palette_parse() Chen Qun
2020-03-09 12:32 ` Laurent Vivier
2020-03-09 12:53 ` Laurent Vivier
2020-03-02 13:07 ` [PATCH v3 07/12] display/exynos4210_fimd: Remove redundant statement in exynos4210_fimd_update() Chen Qun
2020-03-09 12:35 ` Laurent Vivier
2020-03-09 12:54 ` Laurent Vivier
2020-03-02 13:07 ` [PATCH v3 08/12] display/blizzard: Remove redundant statement in blizzard_draw_line16_32() Chen Qun
2020-03-02 13:07 ` [PATCH v3 09/12] dma/xlnx-zdma: Remove redundant statement in zdma_write_dst() Chen Qun
2020-03-02 14:19 ` Edgar E. Iglesias
2020-03-09 12:38 ` Laurent Vivier
2020-03-02 13:07 ` [PATCH v3 10/12] timer/exynos4210_mct: Remove redundant statement in exynos4210_mct_write() Chen Qun
2020-03-02 13:07 ` [PATCH v3 11/12] usb/hcd-ehci: Remove redundant statements Chen Qun
2020-03-03 10:28 ` Gerd Hoffmann
2020-03-09 12:42 ` Laurent Vivier [this message]
2020-03-09 12:52 ` Chenqun (kuhn)
2020-03-09 12:55 ` Laurent Vivier
2020-03-02 13:07 ` [PATCH v3 12/12] monitor/hmp-cmds: Remove redundant statement in hmp_rocker_of_dpa_groups() Chen Qun
2020-03-09 12:50 ` Laurent Vivier
2020-03-09 12:58 ` Laurent Vivier
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=e786f342-7ba6-1c25-dea7-a34372a4ff81@vivier.eu \
--to=laurent@vivier.eu \
--cc=euler.robot@huawei.com \
--cc=kraxel@redhat.com \
--cc=kuhn.chenqun@huawei.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=zhang.zhanghailiang@huawei.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).