diff options
author | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2022-04-20 09:57:17 +0900 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-05-04 05:24:58 -0600 |
commit | db060f54e0c53af66d72aacd13a2550f1e24c90b (patch) | |
tree | ddd29593517b9ae3d0044beda36cdc357ae95f05 /drivers/block/null_blk/main.c | |
parent | b3a0a73e8a79eab6ec74139b505f4c6d6781aae9 (diff) | |
download | linux-stable-db060f54e0c53af66d72aacd13a2550f1e24c90b.tar.gz linux-stable-db060f54e0c53af66d72aacd13a2550f1e24c90b.tar.bz2 linux-stable-db060f54e0c53af66d72aacd13a2550f1e24c90b.zip |
block: null_blk: Cleanup messages
Use the pr_fmt() macro to prefix all null_blk pr_xxx() messages with
"null_blk:" to clarify which module is printing the messages. Also add
a pr_info() message in null_add_dev() to print the name of a newly
created disk.
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20220420005718.3780004-4-damien.lemoal@opensource.wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/null_blk/main.c')
-rw-r--r-- | drivers/block/null_blk/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c index b0841f1d0832..5de83b62cf7d 100644 --- a/drivers/block/null_blk/main.c +++ b/drivers/block/null_blk/main.c @@ -11,6 +11,9 @@ #include <linux/init.h> #include "null_blk.h" +#undef pr_fmt +#define pr_fmt(fmt) "null_blk: " fmt + #define FREE_BATCH 16 #define TICKS_PER_SEC 50ULL @@ -2069,6 +2072,8 @@ static int null_add_dev(struct nullb_device *dev) list_add_tail(&nullb->list, &nullb_list); mutex_unlock(&lock); + pr_info("disk %s created\n", nullb->disk_name); + return 0; out_cleanup_zone: null_free_zoned_dev(dev); |