Re: [RFC] net:yt6801: Add Motorcomm yt6801 PCIe driver

From: Andrew Lunn
Date: Fri Sep 20 2024 - 19:23:10 EST


> > +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