All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: <netdev@vger.kernel.org>, <davem@davemloft.net>
Subject: Re: [PATCH net-next] netlink: add spaces around '&' in netlink_recvmsg()
Date: Mon, 7 Sep 2020 13:51:02 -0700	[thread overview]
Message-ID: <20200907135102.27e07aff@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <20200907132144.3144704-1-yangyingliang@huawei.com>

On Mon, 7 Sep 2020 21:21:44 +0800 Yang Yingliang wrote:
> Spaces preferred around '&'.

This in itself is not a sufficient justification to touch code that
pre-dates the git era.

IMHO '&' without spaces around it is particularly hard to read, and 
the code is actively used, which makes the change worth considering.

But I'm not sure why you decided to fix recvmsg but not sendmsg.

Please provide a better commit message.

> diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
> index d2d1448274f5..5a86bf4f80b1 100644
> --- a/net/netlink/af_netlink.c
> +++ b/net/netlink/af_netlink.c
> @@ -1929,12 +1929,12 @@ static int netlink_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
>  	struct scm_cookie scm;
>  	struct sock *sk = sock->sk;
>  	struct netlink_sock *nlk = nlk_sk(sk);
> -	int noblock = flags&MSG_DONTWAIT;
> +	int noblock = flags & MSG_DONTWAIT;
>  	size_t copied;
>  	struct sk_buff *skb, *data_skb;
>  	int err, ret;
>  
> -	if (flags&MSG_OOB)
> +	if (flags & MSG_OOB)
>  		return -EOPNOTSUPP;
>  
>  	copied = 0;


      reply	other threads:[~2020-09-07 20:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-07 13:21 [PATCH net-next] netlink: add spaces around '&' in netlink_recvmsg() Yang Yingliang
2020-09-07 20:51 ` Jakub Kicinski [this message]

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=20200907135102.27e07aff@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=yangyingliang@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.