summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2024-09-16 15:24:34 +0200
committerLeon Romanovsky <leon@kernel.org>2024-09-16 19:28:40 +0200
commit7acad3c442df6d5158c5b732a7a0ccf3a01d9b30 (patch)
treeb3d97394ddc8b59a53874edcd9e3d12a57acdcad /drivers/infiniband
parentRDMA/irdma: fix error message in irdma_modify_qp_roce() (diff)
downloadlinux-7acad3c442df6d5158c5b732a7a0ccf3a01d9b30.tar.xz
linux-7acad3c442df6d5158c5b732a7a0ccf3a01d9b30.zip
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: 9cbed5aab5ae ("RDMA/nldev: Add support for RDMA monitoring") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Link: https://patch.msgid.link/20240916-rdma-fix-clang-fallthrough-nl_notify_err_msg-v1-1-89de6a7423f1@kernel.org Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/nldev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c
index 10b1411ac53d..39f89a4b8649 100644
--- a/drivers/infiniband/core/nldev.c
+++ b/drivers/infiniband/core/nldev.c
@@ -2792,6 +2792,7 @@ static void rdma_nl_notify_err_msg(struct ib_device *device, u32 port_num,
dev_warn_ratelimited(&device->dev,
"Failed to send RDMA monitor netdev detach event: port %d\n",
port_num);
+ break;
default:
break;
}