]> git.ipfire.org Git - thirdparty/linux.git/commit
block: zram: replace scnprintf() with sysfs_emit() in *_show() functions
authorRahul Kumar <rk0006818@gmail.com>
Fri, 27 Jun 2025 03:52:56 +0000 (09:22 +0530)
committerJens Axboe <axboe@kernel.dk>
Fri, 4 Jul 2025 01:56:51 +0000 (19:56 -0600)
commit264a3fdab2365395e43d3a0b40162a29e61ffa22
tree033c1280594c6ae40086383df55a82f5a8d5bc74
parent39107ccbc6967461ed8471e5a7a881e4429ecf31
block: zram: replace scnprintf() with sysfs_emit() in *_show() functions

Replace scnprintf() with sysfs_emit() or sysfs_emit_at() in sysfs
*_show() functions in zram_drv.c to follow the kernel's guidelines
from Documentation/filesystems/sysfs.rst.

This improves consistency, safety, and makes the code easier to
maintain and update in the future.

Signed-off-by: Rahul Kumar <rk0006818@gmail.com>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Link: https://lore.kernel.org/r/20250627035256.1120740-1-rk0006818@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/zram/zram_drv.c