bcache: replace snprintf in show functions with sysfs_emit
authorQing Wang <wangqing@vivo.com>
Fri, 29 Oct 2021 06:09:30 +0000 (14:09 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 29 Oct 2021 12:43:21 +0000 (06:43 -0600)
commit1b86db5f4e025840e0bf7cef2b10e84531954386
tree125977979d9d84e879d63bd866b9d5cfcb8bc134
parentcf2197ca4b8c199d188593ca6800ea1827c42171
bcache: replace snprintf in show functions with sysfs_emit

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

Fix the following coccicheck warning:
drivers/md/bcache/sysfs.h:54:12-20: WARNING: use scnprintf or sprintf.

Implement sysfs_print() by sysfs_emit() and remove snprint() since no one
uses it any more.

Suggested-by: Coly Li <colyli@suse.de>
Signed-off-by: Qing Wang <wangqing@vivo.com>
Signed-off-by: Coly Li <colyli@suse.de>
Link: https://lore.kernel.org/r/20211029060930.119923-3-colyli@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/bcache/sysfs.h
drivers/md/bcache/util.h