]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: replace snprintf in show functions with sysfs_emit
authorQing Wang <wangqing@vivo.com>
Wed, 13 Oct 2021 03:29:04 +0000 (20:29 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 26 Oct 2021 21:04:30 +0000 (14:04 -0700)
commitf00084dab8591aeaf20c2ae0420a10eb9083109d
tree3f21c1d6c2a006347b5a329355b73a95e10491e6
parentbbc5deb958934239fd8272353af64d117d18e1b2
f2fs: replace snprintf in show functions with sysfs_emit

coccicheck complains about the use of snprintf() in sysfs show functions.

Fix the following coccicheck warning:
fs/f2fs/sysfs.c:198:12-20: WARNING: use scnprintf or sprintf.
fs/f2fs/sysfs.c:247:8-16: WARNING: use scnprintf or sprintf.

Use sysfs_emit instead of scnprintf or sprintf makes more sense.

Signed-off-by: Qing Wang <wangqing@vivo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/sysfs.c