block/mq-deadline: Improve the sysfs show and store macros
authorBart Van Assche <bvanassche@acm.org>
Fri, 18 Jun 2021 00:44:50 +0000 (17:44 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 21 Jun 2021 21:03:40 +0000 (15:03 -0600)
commitd6d7f013d65491eaff477b9bd83b80111f5be9e4
treec46f71bb44d9ad64258542b106d0a74b127a3e2d
parent004a26b327c2e1ea88b2638cf16c0e30e82f297e
block/mq-deadline: Improve the sysfs show and store macros

Define separate macros for integers and jiffies to improve readability.
Use sysfs_emit() and kstrtoint() instead of sprintf() and simple_strtol().
The former functions are the recommended functions.

Cc: Damien Le Moal <damien.lemoal@wdc.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20210618004456.7280-11-bvanassche@acm.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/mq-deadline.c