From 6a7391ed6c770634b9ef179e51a3fdbb3e9c5730 Mon Sep 17 00:00:00 2001 From: "Gustavo A. R. Silva" Date: Mon, 13 Sep 2021 17:08:48 -0500 Subject: [PATCH 1/3] scsi: st: Fix fall-through warning for Clang 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 Signed-off-by: Gustavo A. R. Silva --- drivers/scsi/st.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 9d04929f03a1..ae8636d3780b 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -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; } From 25d7b70e0202321ed284c51788764fd978bed415 Mon Sep 17 00:00:00 2001 From: "Gustavo A. R. Silva" Date: Mon, 13 Sep 2021 17:17:09 -0500 Subject: [PATCH 2/3] MIPS: Fix fall-through warnings for Clang Fix the following fallthrough warnings: arch/mips/alchemy/devboards/db1550.c:69:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] case BCSR_WHOAMI_DB1550: ^ arch/mips/alchemy/devboards/db1550.c:69:2: note: insert 'break;' to avoid fall-through case BCSR_WHOAMI_DB1550: ^ break; arch/mips/kernel/uprobes.c:176:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] default: ^ arch/mips/kernel/uprobes.c:176:2: note: insert 'break;' to avoid fall-through default: ^ break; 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/202109030839.t2llsvmc-lkp@intel.com/ Link: https://lore.kernel.org/linux-mm/202108271617.MHxFd8aX-lkp@intel.com/ Reported-by: kernel test robot Signed-off-by: Gustavo A. R. Silva --- arch/mips/alchemy/devboards/db1550.c | 1 + arch/mips/kernel/uprobes.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/mips/alchemy/devboards/db1550.c b/arch/mips/alchemy/devboards/db1550.c index 752b93d91ac9..fd91d9c9a252 100644 --- a/arch/mips/alchemy/devboards/db1550.c +++ b/arch/mips/alchemy/devboards/db1550.c @@ -66,6 +66,7 @@ int __init db1550_board_setup(void) case BCSR_WHOAMI_PB1550_DDR: bcsr_init(PB1550_BCSR_PHYS_ADDR, PB1550_BCSR_PHYS_ADDR + PB1550_BCSR_HEXLED_OFS); + break; case BCSR_WHOAMI_DB1550: break; default: diff --git a/arch/mips/kernel/uprobes.c b/arch/mips/kernel/uprobes.c index 9db2a6db5f62..6c063aa188e6 100644 --- a/arch/mips/kernel/uprobes.c +++ b/arch/mips/kernel/uprobes.c @@ -173,6 +173,7 @@ int arch_uprobe_exception_notify(struct notifier_block *self, case DIE_UPROBE_XOL: if (uprobe_post_sstep_notifier(regs)) return NOTIFY_STOP; + break; default: break; } From 02900f428d3c7acd89b77784bec33ddec7b750a4 Mon Sep 17 00:00:00 2001 From: "Gustavo A. R. Silva" Date: Mon, 13 Sep 2021 17:22:01 -0500 Subject: [PATCH 3/3] pcmcia: db1xxx_ss: Fix fall-through warning for Clang Fix the following fallthrough warning: drivers/pcmcia/db1xxx_ss.c:359:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] case 3: ^ drivers/pcmcia/db1xxx_ss.c:359:2: note: insert 'break;' to avoid fall-through case 3: ^ break; 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/202109030839.t2llsvmc-lkp@intel.com/ Reported-by: kernel test robot Signed-off-by: Gustavo A. R. Silva --- drivers/pcmcia/db1xxx_ss.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pcmcia/db1xxx_ss.c b/drivers/pcmcia/db1xxx_ss.c index a6fbc709913e..87a33ecc2cf1 100644 --- a/drivers/pcmcia/db1xxx_ss.c +++ b/drivers/pcmcia/db1xxx_ss.c @@ -356,6 +356,7 @@ static int db1x_pcmcia_get_status(struct pcmcia_socket *skt, case 0: case 2: status |= SS_3VCARD; /* 3V card */ + break; case 3: break; /* 5V card: set nothing */ default: