[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/59] hw/net/imx_fec: Rewrite fall through comments
From: |
Paolo Bonzini |
Subject: |
[PULL 09/59] hw/net/imx_fec: Rewrite fall through comments |
Date: |
Thu, 23 Jan 2020 14:49:59 +0100 |
From: Philippe Mathieu-Daudé <address@hidden>
GCC9 is confused by this comment when building with CFLAG
-Wimplicit-fallthrough=2:
hw/net/imx_fec.c: In function ‘imx_eth_write’:
hw/net/imx_fec.c:906:12: error: this statement may fall through
[-Werror=implicit-fallthrough=]
906 | if (unlikely(single_tx_ring)) {
| ^
hw/net/imx_fec.c:912:5: note: here
912 | case ENET_TDAR: /* FALLTHROUGH */
| ^~~~
cc1: all warnings being treated as errors
Rewrite the comments in the correct place, using 'fall through'
which is recognized by GCC and static analyzers.
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Aleksandar Markovic <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/net/imx_fec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c
index bd99236..c01ce4f 100644
--- a/hw/net/imx_fec.c
+++ b/hw/net/imx_fec.c
@@ -909,7 +909,8 @@ static void imx_eth_write(void *opaque, hwaddr offset,
uint64_t value,
TYPE_IMX_FEC, __func__);
return;
}
- case ENET_TDAR: /* FALLTHROUGH */
+ /* fall through */
+ case ENET_TDAR:
if (s->regs[ENET_ECR] & ENET_ECR_ETHEREN) {
s->regs[index] = ENET_TDAR_TDAR;
imx_eth_do_tx(s, index);
--
1.8.3.1
- [PULL v2 00/59] Misc (x86 and QOM) patches for 2020-01-23, Paolo Bonzini, 2020/01/23
- [PULL 01/59] cpu: Introduce cpu_class_set_parent_reset(), Paolo Bonzini, 2020/01/23
- [PULL 02/59] cpu: Use cpu_class_set_parent_reset(), Paolo Bonzini, 2020/01/23
- [PULL 03/59] pvpanic: introduce crashloaded for pvpanic, Paolo Bonzini, 2020/01/23
- [PULL 04/59] pvpanic: implement crashloaded event handling, Paolo Bonzini, 2020/01/23
- [PULL 05/59] qom/object: Display more helpful message when an interface is missing, Paolo Bonzini, 2020/01/23
- [PULL 07/59] hw/display/tcx: Add missing fall through comments, Paolo Bonzini, 2020/01/23
- [PULL 06/59] audio/audio: Add missing fall through comment, Paolo Bonzini, 2020/01/23
- [PULL 08/59] hw/timer/aspeed_timer: Add a fall through comment, Paolo Bonzini, 2020/01/23
- [PULL 09/59] hw/net/imx_fec: Rewrite fall through comments,
Paolo Bonzini <=
- [PULL 10/59] hw/net/imx_fec: Remove unuseful FALLTHROUGH comments, Paolo Bonzini, 2020/01/23
- [PULL 11/59] hw/pci-host/designware: Remove unuseful FALLTHROUGH comment, Paolo Bonzini, 2020/01/23
- [PULL 13/59] Makefile: Clarify all the codebase requires qom/ objects, Paolo Bonzini, 2020/01/23
- [PULL 12/59] configure: Do not build libfdt if not required, Paolo Bonzini, 2020/01/23
- [PULL 15/59] Makefile: Remove unhelpful comment, Paolo Bonzini, 2020/01/23
- [PULL 14/59] Makefile: Restrict system emulation and tools objects, Paolo Bonzini, 2020/01/23
- [PULL 16/59] hw/core: Restrict reset handlers API to system-mode, Paolo Bonzini, 2020/01/23
- [PULL 17/59] hw/core/Makefile: Group generic objects versus system-mode objects, Paolo Bonzini, 2020/01/23
- [PULL 19/59] target/i386: add a ucode-rev property, Paolo Bonzini, 2020/01/23
- [PULL 18/59] target/i386: kvm: initialize feature MSRs very early, Paolo Bonzini, 2020/01/23