netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2 0/2] net: phy: Fix potential string cut when using PHY_ID_FMT
@ 2025-03-19 10:54 Andy Shevchenko
  2025-03-19 10:54 ` [PATCH net v2 1/2] net: phy: Fix formatting specifier to avoid potential string cuts Andy Shevchenko
  2025-03-19 10:54 ` [PATCH net v2 2/2] net: usb: asix: ax88772: Increase phy_name size Andy Shevchenko
  0 siblings, 2 replies; 14+ messages in thread
From: Andy Shevchenko @ 2025-03-19 10:54 UTC (permalink / raw)
  To: Andy Shevchenko, linux-usb, netdev, linux-kernel
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Heiner Kallweit, Russell King

The agreement and also PHY_MAX_ADDR limit suggests that the PHY id can't occupy
more than 2 hex digits. In some cases GCC complains about potential string cut.
Avoid that by limiting specifier to print only 2 hex digits (patch 1).
With that, fix the ASIX driver that triggers GCC and use agreed + 3 in the size
of the phy_name (patch 2).

In v2:
- added first patch
- added a conditional to the ASIX driver (Andrew)

Andy Shevchenko (2):
  net: phy: Fix formatting specifier to avoid potential string cuts
  net: usb: asix: ax88772: Increase phy_name size

 drivers/net/usb/ax88172a.c | 9 ++++++---
 include/linux/phy.h        | 2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)

-- 
2.47.2


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-03-19 18:36 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-19 10:54 [PATCH net v2 0/2] net: phy: Fix potential string cut when using PHY_ID_FMT Andy Shevchenko
2025-03-19 10:54 ` [PATCH net v2 1/2] net: phy: Fix formatting specifier to avoid potential string cuts Andy Shevchenko
2025-03-19 11:21   ` Andy Shevchenko
2025-03-19 15:37   ` kernel test robot
2025-03-19 15:52     ` Andy Shevchenko
2025-03-19 15:46   ` Russell King (Oracle)
2025-03-19 16:16     ` Andy Shevchenko
2025-03-19 17:27   ` kernel test robot
2025-03-19 10:54 ` [PATCH net v2 2/2] net: usb: asix: ax88772: Increase phy_name size Andy Shevchenko
2025-03-19 11:26   ` Andy Shevchenko
2025-03-19 14:43   ` Russell King (Oracle)
2025-03-19 16:22     ` Andy Shevchenko
2025-03-19 17:13       ` Russell King (Oracle)
2025-03-19 18:36         ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).