net: ethernet: use sysfs_emit() to instead of scnprintf()
authorye xingchen <ye.xingchen@zte.com.cn>
Mon, 5 Dec 2022 11:18:56 +0000 (19:18 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 8 Dec 2022 04:02:44 +0000 (20:02 -0800)
commit16dc16d9f058dce7031ee8b850f10622b8b5fb14
treeb7e53a2082666e47ed2c5a9dc57161573db7aa0d
parentcfbf877a338c202ace114f309a6dc0ef5cfb4ad1
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: ye xingchen <ye.xingchen@zte.com.cn>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Link: https://lore.kernel.org/r/202212051918564721658@zte.com.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ethernet/eth.c