OSDN Git Service

ataflop: Mark expected switch fall-through
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Mon, 29 Jul 2019 21:10:53 +0000 (16:10 -0500)
committerJens Axboe <axboe@kernel.dk>
Mon, 29 Jul 2019 21:24:58 +0000 (15:24 -0600)
Mark switch cases where we are expecting to fall through.

This patch fixes the following warning (Building: m68k):

drivers/block/ataflop.c: In function ‘fd_locked_ioctl’:
drivers/block/ataflop.c:1728:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
   set_capacity(floppy->disk, MAX_DISK_SIZE * 2);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/block/ataflop.c:1729:2: note: here
  case FDFMTEND:
  ^~~~

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ataflop.c

index 85f20e3..bd7d3bb 100644 (file)
@@ -1726,6 +1726,7 @@ static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode,
                /* MSch: invalidate default_params */
                default_params[drive].blocks  = 0;
                set_capacity(floppy->disk, MAX_DISK_SIZE * 2);
+               /* Fall through */
        case FDFMTEND:
        case FDFLUSH:
                /* invalidate the buffer track to force a reread */