[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 12/13] usb/hcd-ehci: Remove redundant statements
From: |
kuhn.chenqun |
Subject: |
[PATCH 12/13] usb/hcd-ehci: Remove redundant statements |
Date: |
Tue, 25 Feb 2020 10:09:36 +0800 |
From: Chen Qun <address@hidden>
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>
---
Cc: Gerd Hoffmann <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) {
--
2.23.0
- [PATCH 00/13]redundant code: Fix warnings reported by Clang static code analyzer, kuhn.chenqun, 2020/02/24
- [PATCH 10/13] migration/vmstate: Remove redundant statement in vmstate_save_state_v(), kuhn.chenqun, 2020/02/24
- [PATCH 13/13] monitor/hmp-cmds: Remove redundant statement in hmp_rocker_of_dpa_groups(), kuhn.chenqun, 2020/02/24
- [PATCH 08/13] display/blizzard: Remove redundant statement in blizzard_draw_line16_32(), kuhn.chenqun, 2020/02/24
- [PATCH 03/13] block/file-posix: Remove redundant statement in raw_handle_perm_lock(), kuhn.chenqun, 2020/02/24
- [PATCH 04/13] scsi/esp-pci: Remove redundant statement in esp_pci_io_write(), kuhn.chenqun, 2020/02/24
- [PATCH 05/13] scsi/scsi-disk: Remove redundant statement in scsi_disk_emulate_command(), kuhn.chenqun, 2020/02/24
- [PATCH 07/13] display/exynos4210_fimd: Remove redundant statement in exynos4210_fimd_update(), kuhn.chenqun, 2020/02/24
- [PATCH 12/13] usb/hcd-ehci: Remove redundant statements,
kuhn.chenqun <=
- [PATCH 01/13] block/stream: Remove redundant statement in stream_run(), kuhn.chenqun, 2020/02/24
- [PATCH 09/13] dma/xlnx-zdma: Remove redundant statement in zdma_write_dst(), kuhn.chenqun, 2020/02/24
[PATCH 02/13] block/iscsi:Remove redundant statement in iscsi_open(), kuhn.chenqun, 2020/02/24
[PATCH 11/13] timer/exynos4210_mct: Remove redundant statement in exynos4210_mct_write(), kuhn.chenqun, 2020/02/24