diff options
| author | Thomas Graf <tgraf@suug.ch> | 2005-11-09 20:25:52 -0500 |
|---|---|---|
| committer | Thomas Graf <tgr@axs.localdomain> | 2005-11-09 20:26:40 -0500 |
| commit | a8f74b228826eef1cbe04a05647d61e896f5fd63 (patch) | |
| tree | 6abffeafca83f1aa342ed905367fab1f5a1ac554 /net/xfrm/xfrm_user.c | |
| parent | bfa83a9e03cf8d501c6272999843470afecb32ed (diff) | |
[NETLINK]: Make netlink_callback->done() optional
Most netlink families make no use of the done() callback, making
it optional gets rid of all unnecessary dummy implementations.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm/xfrm_user.c')
| -rw-r--r-- | net/xfrm/xfrm_user.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index c35336a0f71b..6996b7e85665 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
| @@ -948,11 +948,6 @@ static struct xfrm_link { | |||
| 948 | [XFRM_MSG_FLUSHPOLICY - XFRM_MSG_BASE] = { .doit = xfrm_flush_policy }, | 948 | [XFRM_MSG_FLUSHPOLICY - XFRM_MSG_BASE] = { .doit = xfrm_flush_policy }, |
| 949 | }; | 949 | }; |
| 950 | 950 | ||
| 951 | static int xfrm_done(struct netlink_callback *cb) | ||
| 952 | { | ||
| 953 | return 0; | ||
| 954 | } | ||
| 955 | |||
| 956 | static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, int *errp) | 951 | static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, int *errp) |
| 957 | { | 952 | { |
| 958 | struct rtattr *xfrma[XFRMA_MAX]; | 953 | struct rtattr *xfrma[XFRMA_MAX]; |
| @@ -990,8 +985,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, int *err | |||
| 990 | goto err_einval; | 985 | goto err_einval; |
| 991 | 986 | ||
| 992 | if ((*errp = netlink_dump_start(xfrm_nl, skb, nlh, | 987 | if ((*errp = netlink_dump_start(xfrm_nl, skb, nlh, |
| 993 | link->dump, | 988 | link->dump, NULL)) != 0) { |
| 994 | xfrm_done)) != 0) { | ||
| 995 | return -1; | 989 | return -1; |
| 996 | } | 990 | } |
| 997 | rlen = NLMSG_ALIGN(nlh->nlmsg_len); | 991 | rlen = NLMSG_ALIGN(nlh->nlmsg_len); |
