net: ethernet: use sysfs_emit() to instead of scnprintf()
Subsystems (2)
PATCH 1/1 net: ethernet: use sysfs_emit() to instead of scnprintf()
From: ye xingchen <[email protected]>
Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space.
--- net/ethernet/eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ethernet/eth.c +1 -1
@@ -398,7 +398,7 @@ EXPORT_SYMBOL(alloc_etherdev_mqs);ssize_t sysfs_format_mac (char *buf,const unsigned char *addr,int len) { -return scnprintf (buf,PAGE_SIZE ,"%*phC\n" , len, addr); +return sysfs_emit (buf,"%*phC\n" , len, addr); }EXPORT_SYMBOL (sysfs_format_mac);
Signature · 1 line
2.25.1
Quoted 11 lines · On Mon, Dec 05, 2022 at 07:18:56PM +0800, [email protected] wrote:
From: ye xingchen <[email protected]>
Follow the advice of the
Documentation/filesystems/sysfs.rstandshow()should only usesysfs_emit()orsysfs_emit_at()when formatting the value to be returned to user space.Signed-off-by ye xingchen <[email protected]>--- net/ethernet/eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks,
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Mon, 5 Dec 2022 19:18:56 +0800 (CST) you wrote:
From: ye xingchen <[email protected]>
Follow the advice of the
Documentation/filesystems/sysfs.rstandshow()should only usesysfs_emit()orsysfs_emit_at()when formatting the value to be returned to user space.Signed-off-by ye xingchen <[email protected]>[...]
Here is the summary with links:
- [net-next] net: ethernet: use sysfs_emit() to instead of scnprintf()
https://git.kernel.org/netdev/net-next/c/16dc16d9f058
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html