Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

memory: bt1-l2-ctl: replace scnprintf() with sysfs_emit()

Documentation/filesystems/sysfs.rst mentions that show() should only
use sysfs_emit() or sysfs_emit_at() when formating the value to be
returned to user space. So replace scnprintf() with sysfs_emit().

Signed-off-by: Salah Triki <salah.triki@gmail.com>
Link: https://lore.kernel.org/r/aBkw_p9GkH2fm2UJ@pc
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

authored by

Salah Triki and committed by
Krzysztof Kozlowski
59e9910e bd4f5f6c

+1 -1
+1 -1
drivers/memory/bt1-l2-ctl.c
··· 222 222 if (ret) 223 223 return ret; 224 224 225 - return scnprintf(buf, PAGE_SIZE, "%u\n", data); 225 + return sysfs_emit(buf, "%u\n", data); 226 226 } 227 227 228 228 static ssize_t l2_ctl_latency_store(struct device *dev,