]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
cifs: Fix fall-through warnings for Clang
authorGustavo A. R. Silva <gustavoars@kernel.org>
Fri, 20 Nov 2020 18:24:14 +0000 (12:24 -0600)
committerSteve French <stfrench@microsoft.com>
Mon, 14 Dec 2020 01:12:07 +0000 (19:12 -0600)
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
warnings by explicitly adding multiple break/goto statements instead of
just letting the code fall through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/inode.c
fs/cifs/sess.c
fs/cifs/smbdirect.c

index 9ee5f304592f1316803bfb8436a5e134fb823d0e..ac01f9684b39cb6d9826ca0a27077fa1a9e2354f 100644 (file)
@@ -771,6 +771,7 @@ cifs_get_file_info(struct file *filp)
                 */
                rc = 0;
                CIFS_I(inode)->time = 0;
+               goto cgfi_exit;
        default:
                goto cgfi_exit;
        }
index de564368a887c23d4de9c6c84ad8de272482d65c..6c2c42f8d893ebf7d978195b5856050491f8cc9f 100644 (file)
@@ -812,6 +812,7 @@ cifs_select_sectype(struct TCP_Server_Info *server, enum securityEnum requested)
                                return NTLMv2;
                        if (global_secflags & CIFSSEC_MAY_NTLM)
                                return NTLM;
+                       break;
                default:
                        break;
                }
index b029ed31ef916d979bde6d3523973c1b14e3276d..10dfe50067920b96924ea8fc4892ac2b2efc7fda 100644 (file)
@@ -246,6 +246,7 @@ smbd_qp_async_error_upcall(struct ib_event *event, void *context)
        case IB_EVENT_CQ_ERR:
        case IB_EVENT_QP_FATAL:
                smbd_disconnect_rdma_connection(info);
+               break;
 
        default:
                break;