summaryrefslogtreecommitdiff
path: root/scripts/stackusage
diff options
context:
space:
mode:
authorSean Chang <seanwascoding@gmail.com>2026-03-02 17:29:31 +0300
committerJakub Kicinski <kuba@kernel.org>2026-03-04 04:18:00 +0300
commitacd338ba2f3a33d68aa05f406407fbdf6adccfee (patch)
treebc9ebe6897b9dc2f3a31c73f251de3615a8fa46b /scripts/stackusage
parent39feb171f361f887dad8504dc5822b852871ac21 (diff)
downloadlinux-acd338ba2f3a33d68aa05f406407fbdf6adccfee.tar.xz
net: macb: use ethtool_sprintf to fill ethtool stats strings
The RISC-V toolchain triggers a stringop-truncation warning when using snprintf() with a fixed ETH_GSTRING_LEN (32 bytes) buffer. Convert the driver to use the modern ethtool_sprintf() API from linux/ethtool.h. This removes the need for manual snprintf() and memcpy() calls, handles the 32-byte padding automatically, and simplifies the logic by removing manual pointer arithmetic. Suggested-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Sean Chang <seanwascoding@gmail.com> Link: https://patch.msgid.link/20260302142931.49108-1-seanwascoding@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions