aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/unix_bpf.c
diff options
context:
space:
mode:
authorAndy Shevchenko <[email protected]>2025-03-24 14:39:29 +0000
committerJakub Kicinski <[email protected]>2025-03-25 21:35:31 +0000
commit2c5ac026fd1421cf6a78770b48570b2563ef40b7 (patch)
treea25b1d2966353cfebf5d21e47ac565e2516ae106 /net/unix/unix_bpf.c
parentMerge tag 'for-net-next-2025-03-25' of git://git.kernel.org/pub/scm/linux/ker... (diff)
downloadkernel-2c5ac026fd1421cf6a78770b48570b2563ef40b7.tar.gz
kernel-2c5ac026fd1421cf6a78770b48570b2563ef40b7.zip
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)" <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/unix/unix_bpf.c')
0 files changed, 0 insertions, 0 deletions