mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
bfa83a9e03
commit
a8f74b2288
5 changed files with 8 additions and 25 deletions
|
|
@ -948,11 +948,6 @@ static struct xfrm_link {
|
|||
[XFRM_MSG_FLUSHPOLICY - XFRM_MSG_BASE] = { .doit = xfrm_flush_policy },
|
||||
};
|
||||
|
||||
static int xfrm_done(struct netlink_callback *cb)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, int *errp)
|
||||
{
|
||||
struct rtattr *xfrma[XFRMA_MAX];
|
||||
|
|
@ -990,8 +985,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, int *err
|
|||
goto err_einval;
|
||||
|
||||
if ((*errp = netlink_dump_start(xfrm_nl, skb, nlh,
|
||||
link->dump,
|
||||
xfrm_done)) != 0) {
|
||||
link->dump, NULL)) != 0) {
|
||||
return -1;
|
||||
}
|
||||
rlen = NLMSG_ALIGN(nlh->nlmsg_len);
|
||||
|
|
|
|||
Loading…
Reference in a new issue