From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: linux-usb@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@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>
Subject: Re: [PATCH net v1 1/1] net: usb: asix: ax88772: Increase phy_name size
Date: Tue, 18 Mar 2025 18:54:48 +0200 [thread overview]
Message-ID: <Z9mlWNdvWXohc6aM@smile.fi.intel.com> (raw)
In-Reply-To: <481268aa-c8e9-4475-bd5c-8d0f82a6652a@lunn.ch>
On Tue, Mar 18, 2025 at 05:49:05PM +0100, Andrew Lunn wrote:
...
> > - char phy_name[20];
> > + char phy_name[MII_BUS_ID_SIZE + 5];
>
> Could you explain the + 5?
>
> https://elixir.bootlin.com/linux/v6.13.7/source/drivers/net/ethernet/davicom/dm9051.c#L1156
> https://elixir.bootlin.com/linux/v6.13.7/source/drivers/net/ethernet/freescale/fec_main.c#L2454
> https://elixir.bootlin.com/linux/v6.13.7/source/drivers/net/ethernet/xilinx/ll_temac.h#L348
>
> The consensus seems to be + 3.
u16, gcc can't proove the range, it assumes 65536 is the maximum.
include/linux/phy.h:312:20: note: directive argument in the range [0, 65535]
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-03-18 16:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 16:17 [PATCH net v1 1/1] net: usb: asix: ax88772: Increase phy_name size Andy Shevchenko
2025-03-18 16:49 ` Andrew Lunn
2025-03-18 16:54 ` Andy Shevchenko [this message]
2025-03-18 17:09 ` Andrew Lunn
2025-03-19 10:35 ` Andy Shevchenko
2025-03-19 10:49 ` Andy Shevchenko
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=Z9mlWNdvWXohc6aM@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--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.