Commit 7acad3c
RDMA/nldev: Add missing break in rdma_nl_notify_err_msg()
Clang warns (or errors with CONFIG_WERROR=y):
drivers/infiniband/core/nldev.c:2795:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
2795 | default:
| ^
Clang is a little more pedantic than GCC, which does not warn when
falling through to a case that is just break or return. Clang's version
is more in line with the kernel's own stance in deprecated.rst, which
states that all switch/case blocks must end in either break,
fallthrough, continue, goto, or return. Add the missing break to silence
the warning.
Fixes: 9cbed5a ("RDMA/nldev: Add support for RDMA monitoring")
Signed-off-by: Nathan Chancellor <[email protected]>
Link: https://patch.msgid.link/20240916-rdma-fix-clang-fallthrough-nl_notify_err_msg-v1-1-89de6a7423f1@kernel.org
Signed-off-by: Leon Romanovsky <[email protected]>1 parent 9f0eafe commit 7acad3c
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2792 | 2792 | | |
2793 | 2793 | | |
2794 | 2794 | | |
| 2795 | + | |
2795 | 2796 | | |
2796 | 2797 | | |
2797 | 2798 | | |
| |||
0 commit comments