From: David Ahern <dsahern@gmail.com>
To: yuan linyu <cugyly@163.com>, netdev@vger.kernel.org
Cc: "David S . Miller" <davem@davemloft.net>,
yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>
Subject: Re: [net-next] net: ipv6: fix code style error and warning of ndisc.c
Date: Sun, 21 May 2017 10:16:18 -0600 [thread overview]
Message-ID: <7824ba0b-9723-03f0-562a-4e41289381cf@gmail.com> (raw)
In-Reply-To: <1495253813-17168-1-git-send-email-cugyly@163.com>
On 5/19/17 10:16 PM, yuan linyu wrote:
> @@ -240,13 +240,15 @@ struct ndisc_options *ndisc_parse_options(const struct net_device *dev,
> "%s: duplicated ND6 option found: type=%d\n",
> __func__, nd_opt->nd_opt_type);
> } else {
> - ndopts->nd_opt_array[nd_opt->nd_opt_type] = nd_opt;
> + ndopts->nd_opt_array[nd_opt->nd_opt_type] =
> + nd_opt;
> }
> break;
> case ND_OPT_PREFIX_INFO:
> ndopts->nd_opts_pi_end = nd_opt;
> if (!ndopts->nd_opt_array[nd_opt->nd_opt_type])
> - ndopts->nd_opt_array[nd_opt->nd_opt_type] = nd_opt;
> + ndopts->nd_opt_array[nd_opt->nd_opt_type] =
> + nd_opt;
> break;
> #ifdef CONFIG_IPV6_ROUTE_INFO
> case ND_OPT_ROUTE_INFO:
This makes the code less readable. Readability needs to trump rigid
80-column coding style.
> @@ -512,7 +513,8 @@ void ndisc_send_na(struct net_device *dev, const struct in6_addr *daddr,
> in6_ifa_put(ifp);
> } else {
> if (ipv6_dev_get_saddr(dev_net(dev), dev, daddr,
> - inet6_sk(dev_net(dev)->ipv6.ndisc_sk)->srcprefs,
> + inet6_sk(dev_net(dev)->ipv6.ndisc_sk)->
> + srcprefs,
again here
I did not finish out this really long patch, but in general the
80-column rule can not be applied so rigidly.
prev parent reply other threads:[~2017-05-21 16:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-20 4:16 [net-next] net: ipv6: fix code style error and warning of ndisc.c yuan linyu
2017-05-21 16:16 ` David Ahern [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=7824ba0b-9723-03f0-562a-4e41289381cf@gmail.com \
--to=dsahern@gmail.com \
--cc=Linyu.Yuan@alcatel-sbell.com.cn \
--cc=cugyly@163.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.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