summaryrefslogtreecommitdiffstats
path: root/drivers/block/null_blk.h
diff options
context:
space:
mode:
authorAndré Almeida <andrealmeid@collabora.com>2019-09-16 11:07:59 -0300
committerJens Axboe <axboe@kernel.dk>2019-09-16 08:38:29 -0600
commit9c7eddf1b080f98fed1aadb74fe784f29bf77a08 (patch)
tree1dd29f996855e9356732584b72b1e841f19c35fb /drivers/block/null_blk.h
parent701dfc42884790e44073fcd4b131a0d6e2299cf3 (diff)
downloadlinux-9c7eddf1b080f98fed1aadb74fe784f29bf77a08.tar.bz2
null_blk: format pr_* logs with pr_fmt
Instead of writing "null_blk: " at the beginning of each pr_err/info/warn log message, format messages using pr_fmt() macro. Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by: André Almeida <andrealmeid@collabora.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/null_blk.h')
-rw-r--r--drivers/block/null_blk.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/block/null_blk.h b/drivers/block/null_blk.h
index 6fa3c07af63a..a235c45e22a7 100644
--- a/drivers/block/null_blk.h
+++ b/drivers/block/null_blk.h
@@ -2,6 +2,9 @@
#ifndef __BLK_NULL_BLK_H
#define __BLK_NULL_BLK_H
+#undef pr_fmt
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/blkdev.h>
#include <linux/slab.h>
#include <linux/blk-mq.h>
@@ -96,7 +99,7 @@ blk_status_t null_handle_zoned(struct nullb_cmd *cmd,
#else
static inline int null_zone_init(struct nullb_device *dev)
{
- pr_err("null_blk: CONFIG_BLK_DEV_ZONED not enabled\n");
+ pr_err("CONFIG_BLK_DEV_ZONED not enabled\n");
return -EINVAL;
}
static inline void null_zone_exit(struct nullb_device *dev) {}