]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: st: Add missing break in switch statement in st_ioctl()
authorNathan Chancellor <nathan@kernel.org>
Tue, 17 Aug 2021 23:55:31 +0000 (16:55 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 14 Sep 2021 02:15:39 +0000 (22:15 -0400)
commit747cde591ea09efcb62c24e4ee50c74dc198fe18
tree545baa9be393fa51a2f8b4ba7649930e65e9d7ef
parentb901123b83fca756ffcd85ea50a6cd9637d66d0c
scsi: st: Add missing break in switch statement in st_ioctl()

Clang + -Wimplicit-fallthrough warns:

drivers/scsi/st.c:3831:2: warning: unannotated fall-through between
switch labels [-Wimplicit-fallthrough]
        default:
        ^
drivers/scsi/st.c:3831:2: note: insert 'break;' to avoid fall-through
        default:
        ^
        break;
1 warning generated.

Clang's -Wimplicit-fallthrough is a little bit more pedantic than GCC's,
requiring every case block to end in break, return, or fallthrough, rather
than allowing implicit fallthroughs to cases that just contain break or
return. Add a break so that there is no more warning, as has been done all
over the tree already.

Link: https://lore.kernel.org/r/20210817235531.172995-1-nathan@kernel.org
Fixes: 1f5f929441cf ("scsi: scsi_ioctl: Call scsi_cmd_ioctl() from scsi_ioctl()")
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/st.c