scsi: st: Fix fall-through warning for Clang
authorGustavo A. R. Silva <gustavoars@kernel.org>
Mon, 13 Sep 2021 22:08:48 +0000 (17:08 -0500)
committerGustavo A. R. Silva <gustavoars@kernel.org>
Wed, 13 Oct 2021 19:47:33 +0000 (14:47 -0500)
Fix the following fallthrough warning:

drivers/scsi/st.c:3826:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
drivers/scsi/st.c:3826:2: note: insert 'break;' to avoid fall-through

This helps with the ongoing efforts to globally enable
-Wimplicit-fallthrough for Clang.

Link: https://github.com/KSPP/linux/issues/115
Link: https://lore.kernel.org/linux-mm/202109070707.4pPukuYB-lkp@intel.com/
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
drivers/scsi/st.c

index 9d04929..ae8636d 100644 (file)
@@ -3823,6 +3823,7 @@ static long st_ioctl(struct file *file, unsigned int cmd_in, unsigned long arg)
        case CDROM_SEND_PACKET:
                if (!capable(CAP_SYS_RAWIO))
                        return -EPERM;
+               break;
        default:
                break;
        }