OSDN Git Service

RDMA/uverbs: Fix -Wunused-function warning
authorYueHaibing <yuehaibing@huawei.com>
Thu, 1 Apr 2021 02:10:28 +0000 (10:10 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 1 Apr 2021 18:28:49 +0000 (15:28 -0300)
commitdbb3e9db8267dd8979b39bb15d70887ad0699e2c
tree8fe3a6108e81095c5d98c6d9d8d61f699a01752c
parentf91696f2f05326d9837b4088118c938e805be942
RDMA/uverbs: Fix -Wunused-function warning

make W=1 warns this:

In file included from drivers/infiniband/sw/rdmavt/mmap.c:51:0:
./include/rdma/uverbs_ioctl.h:937:1:
 warning: ‘_uverbs_get_const_unsigned’ defined but not used [-Wunused-function]
 _uverbs_get_const_unsigned(u64 *to,
 ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/rdma/uverbs_ioctl.h:930:1:
 warning: ‘_uverbs_get_const_signed’ defined but not used [-Wunused-function]
 _uverbs_get_const_signed(s64 *to, const struct uverbs_attr_bundle *attrs_bundle,
 ^~~~~~~~~~~~~~~~~~~~~~~~

Make these functions inline to fix this warnings.

Fixes: 2904bb37b35d ("IB/core: Split uverbs_get_const/default to consider target type")
Link: https://lore.kernel.org/r/20210401021028.25720-1-yuehaibing@huawei.com
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
include/rdma/uverbs_ioctl.h