summaryrefslogtreecommitdiff
path: root/drivers/infiniband/core/netlink.c
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2017-06-18 15:51:16 +0300
committerLeon Romanovsky <leon@kernel.org>2017-08-10 13:19:03 +0300
commitff61c425c1c563f1d688d59caf3b18a395cbf9c4 (patch)
tree2062a53ee7ba17723c15af1fa507597acec26867 /drivers/infiniband/core/netlink.c
parent4d7f693af0c9d0d6940ff36f5adca1adfa0e7e6e (diff)
downloadlinux-ff61c425c1c563f1d688d59caf3b18a395cbf9c4.tar.xz
RDMA/netlink: Simplify and rename ibnl_chk_listeners
Make ibnl_chk_listeners function to be one line by removing unneeded comparison. Rename that function to be complaint to other functions in RDMA netlink. Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Diffstat (limited to 'drivers/infiniband/core/netlink.c')
-rw-r--r--drivers/infiniband/core/netlink.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/infiniband/core/netlink.c b/drivers/infiniband/core/netlink.c
index 5c627d1fbaa9..514959ccaf2d 100644
--- a/drivers/infiniband/core/netlink.c
+++ b/drivers/infiniband/core/netlink.c
@@ -47,12 +47,11 @@ static struct {
const struct ibnl_client_cbs *cb_table;
} rdma_nl_types[RDMA_NL_NUM_CLIENTS];
-int ibnl_chk_listeners(unsigned int group)
+int rdma_nl_chk_listeners(unsigned int group)
{
- if (netlink_has_listeners(nls, group) == 0)
- return -1;
- return 0;
+ return (netlink_has_listeners(nls, group)) ? 0 : -1;
}
+EXPORT_SYMBOL(rdma_nl_chk_listeners);
static bool is_nl_msg_valid(unsigned int type, unsigned int op)
{