]> www.infradead.org Git - users/dwmw2/linux.git/commit
block: Replace sprintf() with sysfs_emit()
authorzhangguopeng <zhangguopeng@kylinos.cn>
Thu, 7 Nov 2024 10:42:58 +0000 (18:42 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 7 Nov 2024 22:30:30 +0000 (15:30 -0700)
commit8e71afb94d6ed59055b67dadbc423c70104f21a9
tree2ef5e642071f313ad55c62e1d30d2b0d7fd43b07
parent4122fef16b172f7c1838fcf74340268c86ed96db
block: Replace sprintf() with sysfs_emit()

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

No functional change intended.

Signed-off-by: zhangguopeng <zhangguopeng@kylinos.cn>
Suggested-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20241107104258.29742-1-zhangguopeng@kylinos.cn
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-sysfs.c
block/genhd.c