[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 11/12] usb/hcd-ehci: Remove redundant statements
From: |
Laurent Vivier |
Subject: |
Re: [PATCH v3 11/12] usb/hcd-ehci: Remove redundant statements |
Date: |
Mon, 9 Mar 2020 13:42:58 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
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 <address@hidden>
> Signed-off-by: Chen Qun <address@hidden>
> Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> Cc: Gerd Hoffmann <address@hidden>
> Cc: Philippe Mathieu-Daudé <address@hidden>
> ---
> 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
[PATCH v3 09/12] dma/xlnx-zdma: Remove redundant statement in zdma_write_dst(), Chen Qun, 2020/03/02
[PATCH v3 05/12] scsi/scsi-disk: Remove redundant statement in scsi_disk_emulate_command(), Chen Qun, 2020/03/02
[PATCH v3 03/12] block/file-posix: Remove redundant statement in raw_handle_perm_lock(), Chen Qun, 2020/03/02