Skip to content

Commit 83dde74

Browse files
rleonjgunthorpe
authored andcommitted
RDMA/netlink: Add __maybe_unused to static inline in C file
Like other commits in the tree add __maybe_unused to a static inline in a C file because some clang compilers will complain about unused code: >> drivers/infiniband/core/nldev.c:2543:1: warning: unused function '__chk_RDMA_NL_NLDEV' MODULE_ALIAS_RDMA_NETLINK(RDMA_NL_NLDEV, 5); ^ Fixes: e3bf14b ("rdma: Autoload netlink client modules") Link: https://lore.kernel.org/r/4a8101919b765e01d7fde6f27fd572c958deeb4a.1636267207.git.leonro@nvidia.com Reported-by: kernel test robot <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent fa55b7d commit 83dde74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/rdma/rdma_netlink.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ enum rdma_nl_flags {
3030
* constant as well and the compiler checks they are the same.
3131
*/
3232
#define MODULE_ALIAS_RDMA_NETLINK(_index, _val) \
33-
static inline void __chk_##_index(void) \
33+
static inline void __maybe_unused __chk_##_index(void) \
3434
{ \
3535
BUILD_BUG_ON(_index != _val); \
3636
} \

0 commit comments

Comments
 (0)