Netdev List
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Frank Sae <Frank.Sae@motor-comm.com>,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, xiaogang.fan@motor-comm.com,
	fei.zhang@motor-comm.com, hua.sun@motor-comm.com
Subject: Re: [RFC] net:yt6801: Add Motorcomm yt6801 PCIe driver
Date: Sat, 21 Sep 2024 01:22:44 +0200	[thread overview]
Message-ID: <8dad36e2-88c0-4c10-a629-be032353fac2@lunn.ch> (raw)
In-Reply-To: <20240920230534.GA1071655@bhelgaas>

> > +static int fxgmac_change_mtu(struct net_device *netdev, int mtu)
> > +{
> > +	struct fxgmac_pdata *pdata = netdev_priv(netdev);
> > +	int old_mtu = netdev->mtu;
> > +	int ret, max_mtu;
> > +
> > +	max_mtu = FXGMAC_JUMBO_PACKET_MTU - ETH_HLEN;
> > +	if (mtu > max_mtu) {
> > +		yt_err(pdata, "MTU exceeds maximum supported value\n");
> 
> Always nice to include the offending value (mtu) instead of just a
> constant string with no real information other than "we were here".

This is actually pointless, the core will do this check and never
actually call this function if the MTU is out of range.

FYI: Networking people have not taken any sort of serious look at the
code, it needs breaking up into smaller patches.

Feel free to review PCI parts, but i suggest you ignore networking
for the moment.

	Andrew

      reply	other threads:[~2024-09-20 23:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-13 13:00 [RFC] net:yt6801: Add Motorcomm yt6801 PCIe driver Frank Sae
2024-09-13 17:02 ` Andrew Lunn
2024-09-20 23:05 ` Bjorn Helgaas
2024-09-20 23:22   ` Andrew Lunn [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=8dad36e2-88c0-4c10-a629-be032353fac2@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Frank.Sae@motor-comm.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fei.zhang@motor-comm.com \
    --cc=helgaas@kernel.org \
    --cc=hua.sun@motor-comm.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=xiaogang.fan@motor-comm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox