From: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Wen Gu <guwen@linux.alibaba.com>,
Philo Lu <lulie@linux.alibaba.com>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Lukas Bulwahn <lukas.bulwahn@redhat.com>,
Parthiban Veerasooran <Parthiban.Veerasooran@microchip.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Alexander Duyck <alexanderduyck@fb.com>,
Dust Li <dust.li@linux.alibaba.com>
Subject: Re: [PATCH net-next] eea: Add basic driver framework for Alibaba Elastic Ethernet Adaptor
Date: Thu, 17 Jul 2025 14:55:39 +0800 [thread overview]
Message-ID: <1752735339.8483515-2-xuanzhuo@linux.alibaba.com> (raw)
In-Reply-To: <3cb1810d-377d-4988-bf8a-75274f7b8216@lunn.ch>
On Wed, 16 Jul 2025 18:32:14 +0200, Andrew Lunn <andrew@lunn.ch> wrote:
> > > > + ret = eea_adminq_submit(enet, cmd, req_addr, res_addr, req_size, res_size);
> > >
> > > Please arrange Networking code so that it is 80 columns wide or less,
> > > where that can be done without reducing readability. E.g. don't split
> > > strings across multiple lines. Do wrap lines like the one above like this:
> > >
> > > ret = eea_adminq_submit(enet, cmd, req_addr, res_addr, req_size,
> > > res_size);
> > >
> > > Note that the start of the non-whitespace portion of the 2nd line
> > > is aligned to be exactly inside the opening parentheses of the previous
> > > line.
> > >
> > > checkpatch.pl --max-line-length=80 is useful here.
> >
> > We are aware of the current limit of 100 characters, and we have been coding
> > according to that guideline. Of course, we try to keep lines within 80
> > characters where possible. However, in some cases, we find that using up to 100
> > characters improves readability, so 80 is not a strict requirement for us.
> >
> > Is there a specific rule or convention in the networking area that we should
> > follow? Sorry, I have not heard of such a rule before.
>
> That suggests to me you are not subscribed to the netdev list and are
> not reading reviews made to other drivers. This comes up every couple
> of weeks. You should be spending a little bit of time very day just
> looking at the comments other patches get, and make sure you don't
> make the same mistakes.
>
> In this particularly case, i don't think wrapping the line makes any
> difference to readability. There are some cases where it does, which
> is why you don't 100% enforce checkpatch. But in general, you should
> keep with 80 for networking.
OK, I personally also strongly prefer the 80-column limit. However, sometimes I
do think that in certain cases, keeping code on a single line can look cleaner.
Most of this patch should already follow the 80-column rule, although there
might be a few lines between 80 and 100 characters. I'll scan through again for
this issue and try to bring all lines under 80 if possible.
>
> > > > +#define EEA_NET_PT_UDPv6_EX 9
> > > > + __le16 pkt_type:10,
> > > > + reserved1:6;
> > >
> > > Sparse complains about the above. And I'm not at all sure that
> > > a __le16 bitfield works as intended on a big endian system.
> > >
> > > I would suggest some combination of: FIELD_PREP, FIELD_GET, GENMASK,
> > > cpu_to_le16() and le16_to_cpu().
> > >
> > > Also, please do make sure patches don't introduce new Sparse warnings.
> >
> > I will try.
>
> FYI: We take sparse warnings pretty seriously. So please try quite
> hard.
I will add Sparse check.
Thanks.
>
> Andrew
next prev parent reply other threads:[~2025-07-17 6:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 11:28 [PATCH net-next] eea: Add basic driver framework for Alibaba Elastic Ethernet Adaptor Xuan Zhuo
2025-07-10 13:45 ` Andrew Lunn
2025-07-16 5:47 ` Xuan Zhuo
2025-07-16 16:25 ` Andrew Lunn
2025-07-17 6:17 ` Xuan Zhuo
2025-07-17 17:27 ` Andrew Lunn
2025-07-18 1:54 ` Xuan Zhuo
2025-07-18 16:59 ` Andrew Lunn
2025-07-22 10:53 ` Xuan Zhuo
2025-07-11 10:55 ` Simon Horman
2025-07-16 6:02 ` Xuan Zhuo
2025-07-16 16:32 ` Andrew Lunn
2025-07-17 6:55 ` Xuan Zhuo [this message]
2025-07-11 11:45 ` Vadim Fedorenko
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=1752735339.8483515-2-xuanzhuo@linux.alibaba.com \
--to=xuanzhuo@linux.alibaba.com \
--cc=Parthiban.Veerasooran@microchip.com \
--cc=alexanderduyck@fb.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=dust.li@linux.alibaba.com \
--cc=edumazet@google.com \
--cc=geert+renesas@glider.be \
--cc=guwen@linux.alibaba.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=lorenzo@kernel.org \
--cc=lukas.bulwahn@redhat.com \
--cc=lulie@linux.alibaba.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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.