summaryrefslogtreecommitdiff
path: root/net/lapb/lapb_timer.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2025-03-24 16:39:29 +0200
committerJakub Kicinski <kuba@kernel.org>2025-03-25 14:35:31 -0700
commit2c5ac026fd1421cf6a78770b48570b2563ef40b7 (patch)
treea25b1d2966353cfebf5d21e47ac565e2516ae106 /net/lapb/lapb_timer.c
parent4f74a45c6b1906574669999b9748feb1a92bee84 (diff)
net: phy: Introduce PHY_ID_SIZE — minimum size for PHY ID string
The PHY_ID_FMT defines the format specifier "%s:%02x" to form the PHY ID string, where the maximum of the first part is defined in MII_BUS_ID_SIZE, including NUL terminator, and the second part is implied to be 3 as the maximum address is limited to 32, meaning that 2 hex digits is more than enough, plus ':' (colon) delimiter. However, some drivers, which are using PHY_ID_FMT, customise buffer size and do that incorrectly. Introduce a new constant PHY_ID_SIZE that makes the minimum required size explicit, so drivers are encouraged to use it. Suggested-by: "Russell King (Oracle)" <linux@armlinux.org.uk> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/20250324144751.1271761-2-andriy.shevchenko@linux.intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions