[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55d96ad0-f9e3-ce17-0f7d-5e4c57faeac3@gmail.com>
Date: Tue, 13 Jul 2021 10:24:19 -0600
From: David Ahern <dsahern@...il.com>
To: Yajun Deng <yajun.deng@...ux.dev>, davem@...emloft.net,
yoshfuji@...ux-ipv6.org, dsahern@...nel.org, kuba@...nel.org,
mathew.j.martineau@...ux.intel.com, matthieu.baerts@...sares.net,
pablo@...filter.org, kadlec@...filter.org, fw@...len.de,
vyasevich@...il.com, nhorman@...driver.com,
marcelo.leitner@...il.com, johannes.berg@...el.com, ast@...nel.org,
yhs@...com, 0x7f454c46@...il.com, aahringo@...hat.com,
rdunlap@...radead.org
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
mptcp@...ts.linux.dev, netfilter-devel@...r.kernel.org,
coreteam@...filter.org, linux-sctp@...r.kernel.org
Subject: Re: [PATCH v2] net: Use nlmsg_unicast() instead of netlink_unicast()
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@...nel.org>
Powered by blists - more mailing lists