]> www.infradead.org Git - users/jedix/linux-maple.git/commit
w1: core: use sysfs_emit() instead of sprintf()
authorzhangheng <zhangheng@kylinos.cn>
Fri, 20 Dec 2024 10:23:37 +0000 (18:23 +0800)
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Sun, 22 Dec 2024 14:42:15 +0000 (15:42 +0100)
commit419a40cc2bdda0eadd643de55b70f212354761a2
tree617eb6ddf5ee840004d6935216c307f7ada37c0b
parent0f28374e99a46bfb5ece60af0791ccc840a6aa89
w1: core: use sysfs_emit() instead of sprintf()

Follow the advice in Documentation/filesystems/sysfs.rst:
show() should only use sysfs_emit() or sysfs_emit_at() when formatting
the value to be returned to user space.

Signed-off-by: zhangheng <zhangheng@kylinos.cn>
Link: https://lore.kernel.org/r/20241220102337.295864-1-zhangheng@kylinos.cn
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
drivers/w1/slaves/w1_ds28e17.c