[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 10/44] hw/net/can: Add missing fallthrough statements
From: |
Laurent Vivier |
Subject: |
[PULL 10/44] hw/net/can: Add missing fallthrough statements |
Date: |
Tue, 1 Sep 2020 16:09:20 +0200 |
From: Thomas Huth <thuth@redhat.com>
Add fallthrough annotations to be able to compile the code without
warnings when using -Wimplicit-fallthrough in our CFLAGS. Looking
at the code, it seems like the fallthrough is indeed intended here,
so the comments should be appropriate.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Message-Id: <20200630075520.29825-1-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
hw/net/can/can_sja1000.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/net/can/can_sja1000.c b/hw/net/can/can_sja1000.c
index ea915a023a51..299932998a6f 100644
--- a/hw/net/can/can_sja1000.c
+++ b/hw/net/can/can_sja1000.c
@@ -523,6 +523,7 @@ void can_sja_mem_write(CanSJA1000State *s, hwaddr addr,
uint64_t val,
break;
case 16: /* RX frame information addr16-28. */
s->status_pel |= (1 << 5); /* Set transmit status. */
+ /* fallthrough */
case 17 ... 28:
if (s->mode & 0x01) { /* Reset mode */
if (addr < 24) {
@@ -620,6 +621,7 @@ void can_sja_mem_write(CanSJA1000State *s, hwaddr addr,
uint64_t val,
break;
case 10:
s->status_bas |= (1 << 5); /* Set transmit status. */
+ /* fallthrough */
case 11 ... 19:
if ((s->control & 0x01) == 0) { /* Operation mode */
s->tx_buff[addr - 10] = val; /* Store to TX buffer directly. */
--
2.26.2
- [PULL 00/44] Trivial branch for 5.2 patches, Laurent Vivier, 2020/09/01
- [PULL 00/44] Trivial branch for 5.2 patches, Laurent Vivier, 2020/09/01
- [PULL 01/44] hw/register: Document register_init_block @memory_size, Laurent Vivier, 2020/09/01
- [PULL 03/44] target/ppc: Remove superfluous breaks, Laurent Vivier, 2020/09/01
- [PULL 10/44] hw/net/can: Add missing fallthrough statements,
Laurent Vivier <=
- [PULL 13/44] stubs/cmos: Use correct include, Laurent Vivier, 2020/09/01
- [PULL 04/44] scsi: Remove superfluous breaks, Laurent Vivier, 2020/09/01
- [PULL 12/44] hw/isa/isa-superio: Fix IDE controller realization, Laurent Vivier, 2020/09/01
- [PULL 15/44] hw/core/sysbus: Fix a typo, Laurent Vivier, 2020/09/01
- [PULL 16/44] hw/core/sysbus: Assert memory region index is in range, Laurent Vivier, 2020/09/01
- [PULL 18/44] docs: Fix broken links, Laurent Vivier, 2020/09/01
- [PULL 17/44] Revert "mailmap: Update philmd email address", Laurent Vivier, 2020/09/01
- [PULL 20/44] hw/i2c: Fix typo in description, Laurent Vivier, 2020/09/01
- [PULL 02/44] target/arm/kvm: Remove superfluous break, Laurent Vivier, 2020/09/01
- [PULL 23/44] mailmap: Add entry for Greg Kurz, Laurent Vivier, 2020/09/01