]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mm/memory-failure: replace sprintf() with sysfs_emit()
authorzhangguopeng <zhangguopeng@kylinos.cn>
Tue, 29 Oct 2024 10:18:53 +0000 (18:18 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 11 Nov 2024 08:26:46 +0000 (00:26 -0800)
commit408a8dc6232294ac83f233f869f425725765d2e1
tree85793e8fdc56a11053eca6cceecaf4c40771a9b9
parentf914ac96ee8828368f5a24553e75216d76da0b42
mm/memory-failure: replace sprintf() with sysfs_emit()

As Documentation/filesystems/sysfs.rst suggested, show() should only use
sysfs_emit() or sysfs_emit_at() when formatting the value to be returned
to user space.

Link: https://lkml.kernel.org/r/20241029101853.37890-1-zhangguopeng@kylinos.cn
Signed-off-by: zhangguopeng <zhangguopeng@kylinos.cn>
Acked-by: Miaohe Lin <linmiaohe@huawei.com>
Cc: Naoya Horiguchi <nao.horiguchi@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memory-failure.c