From: David Ahern <dsahern@gmail.com>
To: Yajun Deng <yajun.deng@linux.dev>,
davem@davemloft.net, yoshfuji@linux-ipv6.org, dsahern@kernel.org,
kuba@kernel.org, mathew.j.martineau@linux.intel.com,
matthieu.baerts@tessares.net, pablo@netfilter.org,
kadlec@netfilter.org, fw@strlen.de, vyasevich@gmail.com,
nhorman@tuxdriver.com, marcelo.leitner@gmail.com,
johannes.berg@intel.com, ast@kernel.org, yhs@fb.com,
0x7f454c46@gmail.com, aahringo@redhat.com, rdunlap@infradead.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
mptcp@lists.linux.dev, netfilter-devel@vger.kernel.org,
coreteam@netfilter.org, linux-sctp@vger.kernel.org
Subject: Re: [PATCH v2] net: Use nlmsg_unicast() instead of netlink_unicast()
Date: Tue, 13 Jul 2021 10:24:19 -0600 [thread overview]
Message-ID: <55d96ad0-f9e3-ce17-0f7d-5e4c57faeac3@gmail.com> (raw)
In-Reply-To: <20210713024824.14359-1-yajun.deng@linux.dev>
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>
next prev parent reply other threads:[~2021-07-13 16:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-13 2:48 [PATCH v2] net: Use nlmsg_unicast() instead of netlink_unicast() Yajun Deng
2021-07-13 16:24 ` David Ahern [this message]
2021-07-13 16:40 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55d96ad0-f9e3-ce17-0f7d-5e4c57faeac3@gmail.com \
--to=dsahern@gmail.com \
--cc=0x7f454c46@gmail.com \
--cc=aahringo@redhat.com \
--cc=ast@kernel.org \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=fw@strlen.de \
--cc=johannes.berg@intel.com \
--cc=kadlec@netfilter.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sctp@vger.kernel.org \
--cc=marcelo.leitner@gmail.com \
--cc=mathew.j.martineau@linux.intel.com \
--cc=matthieu.baerts@tessares.net \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=pablo@netfilter.org \
--cc=rdunlap@infradead.org \
--cc=vyasevich@gmail.com \
--cc=yajun.deng@linux.dev \
--cc=yhs@fb.com \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).