RDMA/netlink: Remove redundant owner option for netlink callbacks
authorLeon Romanovsky <leonro@mellanox.com>
Tue, 30 May 2017 08:29:56 +0000 (11:29 +0300)
committerLeon Romanovsky <leon@kernel.org>
Thu, 10 Aug 2017 10:15:41 +0000 (13:15 +0300)
Owner field is not needed to be set because netlink is part of ib_core
which will be unloaded last after all other modules are unloaded.

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
drivers/infiniband/core/cma.c
drivers/infiniband/core/netlink.c
include/rdma/rdma_netlink.h

index 2a16a55..0c85f14 100644 (file)
@@ -4459,8 +4459,7 @@ out:
 }
 
 static const struct ibnl_client_cbs cma_cb_table[] = {
-       [RDMA_NL_RDMA_CM_ID_STATS] = { .dump = cma_get_id_stats,
-                                      .module = THIS_MODULE },
+       [RDMA_NL_RDMA_CM_ID_STATS] = { .dump = cma_get_id_stats},
 };
 
 static int cma_init_net(struct net *net)
index 06f7ba3..cd9b7e7 100644 (file)
@@ -180,12 +180,10 @@ static int ibnl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,
                cb.skb = skb;
                cb.nlh = nlh;
                cb.dump = rdma_nl_types[index].cb_table[op].dump;
-               cb.module = rdma_nl_types[index].cb_table[op].module;
                return cb.dump(skb, &cb);
        }
 
        c.dump = rdma_nl_types[index].cb_table[op].dump;
-       c.module = rdma_nl_types[index].cb_table[op].module;
        return netlink_dump_start(nls, skb, nlh, &c);
 }
 
index aadf0ab..c124d8e 100644 (file)
@@ -7,7 +7,6 @@
 
 struct ibnl_client_cbs {
        int (*dump)(struct sk_buff *skb, struct netlink_callback *nlcb);
-       struct module *module;
 };
 
 /**