* [PATCH net-next] net: ethernet: use sysfs_emit() to instead of scnprintf()
@ 2022-12-05 11:18 ye.xingchen
2022-12-06 8:05 ` Leon Romanovsky
2022-12-08 4:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: ye.xingchen @ 2022-12-05 11:18 UTC (permalink / raw)
To: edumazet
Cc: davem, kuba, pabeni, richardbgobert, iwienand, netdev,
linux-kernel
From: ye xingchen <ye.xingchen@zte.com.cn>
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>
---
net/ethernet/eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index e02daa74e833..2edc8b796a4e 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -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);
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net-next] net: ethernet: use sysfs_emit() to instead of scnprintf()
2022-12-05 11:18 [PATCH net-next] net: ethernet: use sysfs_emit() to instead of scnprintf() ye.xingchen
@ 2022-12-06 8:05 ` Leon Romanovsky
2022-12-08 4:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Leon Romanovsky @ 2022-12-06 8:05 UTC (permalink / raw)
To: ye.xingchen
Cc: edumazet, davem, kuba, pabeni, richardbgobert, iwienand, netdev,
linux-kernel
On Mon, Dec 05, 2022 at 07:18:56PM +0800, ye.xingchen@zte.com.cn wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> 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>
> ---
> net/ethernet/eth.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: ethernet: use sysfs_emit() to instead of scnprintf()
2022-12-05 11:18 [PATCH net-next] net: ethernet: use sysfs_emit() to instead of scnprintf() ye.xingchen
2022-12-06 8:05 ` Leon Romanovsky
@ 2022-12-08 4:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-12-08 4:10 UTC (permalink / raw)
To: ye.xingchen
Cc: edumazet, davem, kuba, pabeni, richardbgobert, iwienand, netdev,
linux-kernel
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 5 Dec 2022 19:18:56 +0800 (CST) you wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> 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>
>
> [...]
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-08 4:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-05 11:18 [PATCH net-next] net: ethernet: use sysfs_emit() to instead of scnprintf() ye.xingchen
2022-12-06 8:05 ` Leon Romanovsky
2022-12-08 4:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox