mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -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
|
|
@ -724,12 +724,6 @@ done:
|
|||
return skb->len;
|
||||
}
|
||||
|
||||
static int inet_diag_dump_done(struct netlink_callback *cb)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static __inline__ int
|
||||
inet_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
{
|
||||
|
|
@ -760,8 +754,7 @@ inet_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
|
|||
goto err_inval;
|
||||
}
|
||||
return netlink_dump_start(idiagnl, skb, nlh,
|
||||
inet_diag_dump,
|
||||
inet_diag_dump_done);
|
||||
inet_diag_dump, NULL);
|
||||
} else {
|
||||
return inet_diag_get_exact(skb, nlh);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue