diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-02-24 09:30:15 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-26 14:10:06 -0500 |
commit | 80d326fab534a5380e8f6e509a0b9076655a9670 (patch) | |
tree | 57c636de934b3f8abb7db9bcde64360ecc4eaf66 /drivers/infiniband | |
parent | 48e316bc2e045206248c6c75c0d5bbc0c9ddc32c (diff) |
netlink: add netlink_dump_control structure for netlink_dump_start()
Davem considers that the argument list of this interface is getting
out of control. This patch tries to address this issue following
his proposal:
struct netlink_dump_control c = { .dump = dump, .done = done, ... };
netlink_dump_start(..., &c);
Suggested by David S. Miller.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/core/netlink.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/infiniband/core/netlink.c b/drivers/infiniband/core/netlink.c index d1c8196d15d7..396e29370304 100644 --- a/drivers/infiniband/core/netlink.c +++ b/drivers/infiniband/core/netlink.c | |||
@@ -147,9 +147,13 @@ static int ibnl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
147 | if (op < 0 || op >= client->nops || | 147 | if (op < 0 || op >= client->nops || |
148 | !client->cb_table[RDMA_NL_GET_OP(op)].dump) | 148 | !client->cb_table[RDMA_NL_GET_OP(op)].dump) |
149 | return -EINVAL; | 149 | return -EINVAL; |
150 | return netlink_dump_start(nls, skb, nlh, | 150 | |
151 | client->cb_table[op].dump, | 151 | { |
152 | NULL, 0); | 152 | struct netlink_dump_control c = { |
153 | .dump = client->cb_table[op].dump, | ||
154 | }; | ||
155 | return netlink_dump_start(nls, skb, nlh, &c); | ||
156 | } | ||
153 | } | 157 | } |
154 | } | 158 | } |
155 | 159 | ||