lkml.org 
[lkml]   [2021]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] net: Use nlmsg_unicast() instead of netlink_unicast()
From
Date
On 7/12/21 8:48 PM, Yajun Deng wrote:
> diff --git a/net/ipv4/raw_diag.c b/net/ipv4/raw_diag.c
> index 1b5b8af27aaf..ccacbde30a2c 100644
> --- a/net/ipv4/raw_diag.c
> +++ b/net/ipv4/raw_diag.c
> @@ -119,11 +119,8 @@ static int raw_diag_dump_one(struct netlink_callback *cb,
> return err;
> }
>
> - err = netlink_unicast(net->diag_nlsk, rep,
> - NETLINK_CB(in_skb).portid,
> - MSG_DONTWAIT);
> - if (err > 0)
> - err = 0;
> + err = nlmsg_unicast(net->diag_nlsk, rep, NETLINK_CB(in_skb).portid);
> +
> return err;

can be shortened to:

return nlmsg_unicast(net->diag_nlsk, rep, NETLINK_CB(in_skb).portid);



other than that it's a good cleanup:

Reviewed-by: David Ahern <dsahern@kernel.org>

\
 
 \ /
  Last update: 2021-07-13 18:25    [W:0.029 / U:23.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site