RDMA/netlink: Add __maybe_unused to static inline in C file
authorLeon Romanovsky <leonro@nvidia.com>
Sun, 7 Nov 2021 06:40:47 +0000 (08:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Nov 2021 09:39:21 +0000 (10:39 +0100)
commit1ae0d59c4f5ed1555d99e139cb68b8e87a5e13eb
treea14b2be1140ef30fb8964c2e585e4f829fc4213e
parent40bc831ab5f630431010d1ff867390b07418a7ee
RDMA/netlink: Add __maybe_unused to static inline in C file

commit 83dde7498fefeb920b1def317421262317d178e5 upstream.

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: e3bf14bdc17a ("rdma: Autoload netlink client modules")
Link: https://lore.kernel.org/r/4a8101919b765e01d7fde6f27fd572c958deeb4a.1636267207.git.leonro@nvidia.com
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/rdma/rdma_netlink.h