“d619d7f11670f5b1cfca30e6645e44c8a6014820”上不存在“arch/sparc/include/asm/pstate.h”
提交 16dc16d9 编写于 作者: Y ye xingchen 提交者: Jakub Kicinski

net: ethernet: use sysfs_emit() to instead of scnprintf()

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.
Signed-off-by: Nye xingchen <ye.xingchen@zte.com.cn>
Reviewed-by: NLeon Romanovsky <leonro@nvidia.com>
Link: https://lore.kernel.org/r/202212051918564721658@zte.com.cnSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 cfbf877a
...@@ -398,7 +398,7 @@ EXPORT_SYMBOL(alloc_etherdev_mqs); ...@@ -398,7 +398,7 @@ EXPORT_SYMBOL(alloc_etherdev_mqs);
ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len) 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); EXPORT_SYMBOL(sysfs_format_mac);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册