@@ -159,7 +159,7 @@ static int xen_block_parse_request(XenBlockRequest *request)
if (!request->req.nr_segments) {
return 0;
}
- /* fall through */
+ fallthrough;
case BLKIF_OP_WRITE:
break;
case BLKIF_OP_DISCARD:
@@ -299,7 +299,7 @@ static void xen_block_complete_aio(void *opaque, int ret)
if (!request->req.nr_segments) {
break;
}
- /* fall through */
+ fallthrough;
case BLKIF_OP_READ:
if (request->status == BLKIF_RSP_OKAY) {
block_acct_done(blk_get_stats(dataplane->blk), &request->acct);
@@ -1462,7 +1462,7 @@ static void decode_new_cmd(Flash *s, uint32_t value)
s->state = STATE_COLLECTING_DATA;
break;
}
- /* Fallthrough */
+ fallthrough;
default:
s->pos = 0;
@@ -564,7 +564,7 @@ static void onenand_command(OneNANDState *s)
break;
case 0x95: /* Multi-block erase */
qemu_irq_pulse(s->intr);
- /* Fall through. */
+ fallthrough;
case 0x94: /* Block erase */
sec = ((s->addr[ONEN_BUF_BLOCK] & 0xfff) |
(s->addr[ONEN_BUF_BLOCK] >> 15 ? s->density_mask : 0))
@@ -276,6 +276,7 @@ static uint32_t pflash_read(PFlashCFI01 *pfl, hwaddr offset,
*/
pfl->cmd = 0x00;
/* fall through to read code */
+ fallthrough;
case 0x00: /* This model reset value for READ_ARRAY (not CFI compliant) */
/* Flash area read */
ret = pflash_data_read(pfl, offset, width, be);
@@ -328,6 +328,7 @@ static uint64_t pflash_read(void *opaque, hwaddr offset, unsigned int width)
trace_pflash_read_unknown_state(pfl->name, pfl->cmd);
pflash_reset_state_machine(pfl);
/* fall through to the read code */
+ fallthrough;
case 0x80: /* Erase (unlock) */
/* We accept reads during second unlock sequence... */
case 0x00:
@@ -359,6 +360,7 @@ static uint64_t pflash_read(void *opaque, hwaddr offset, unsigned int width)
break;
}
/* Fall through to data read. */
+ fallthrough;
default:
ret = pflash_data_read(pfl, offset, width);
}
@@ -368,7 +370,7 @@ static uint64_t pflash_read(void *opaque, hwaddr offset, unsigned int width)
case 0x30: /* Sector Erase */
/* Toggle bit 2 during erase, but not program. */
toggle_dq2(pfl);
- /* fall through */
+ fallthrough;
case 0xA0: /* Program */
/* Toggle bit 6 */
toggle_dq6(pfl);
@@ -582,7 +584,7 @@ static void pflash_write(void *opaque, hwaddr offset, uint64_t value,
pfl->cmd = 0x98;
return;
}
- /* fall through */
+ fallthrough;
default:
trace_pflash_write_invalid(pfl->name, pfl->cmd);
goto reset_flash;
In preparation of raising -Wimplicit-fallthrough to 5, replace all fall-through comments with the fallthrough attribute pseudo-keyword. Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> --- hw/block/dataplane/xen-block.c | 4 ++-- hw/block/m25p80.c | 2 +- hw/block/onenand.c | 2 +- hw/block/pflash_cfi01.c | 1 + hw/block/pflash_cfi02.c | 6 ++++-- 5 files changed, 9 insertions(+), 6 deletions(-)