summaryrefslogtreecommitdiffstats
path: root/block/blk-lib.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-07-13 07:53:10 +0200
committerJens Axboe <axboe@kernel.dk>2022-07-14 10:27:56 -0600
commit02ff3dd20f512cf811ae8028c44fdb212b5f2bf7 (patch)
tree758348c115cc7bac4bc360f85e4850f2084a4bf0 /block/blk-lib.c
parent5bf83e9a14ddae994d783dee96b91bf46f04839c (diff)
downloadlinux-stable-02ff3dd20f512cf811ae8028c44fdb212b5f2bf7.tar.gz
linux-stable-02ff3dd20f512cf811ae8028c44fdb212b5f2bf7.tar.bz2
linux-stable-02ff3dd20f512cf811ae8028c44fdb212b5f2bf7.zip
block: stop using bdevname in __blkdev_issue_discard
Just use the %pg format specifier instead. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Link: https://lore.kernel.org/r/20220713055317.1888500-3-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-lib.c')
-rw-r--r--block/blk-lib.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/block/blk-lib.c b/block/blk-lib.c
index 09b7e1200c0f..67e6dbc1ae81 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -48,10 +48,8 @@ int __blkdev_issue_discard(struct block_device *bdev, sector_t sector,
/* In case the discard granularity isn't set by buggy device driver */
if (WARN_ON_ONCE(!bdev_discard_granularity(bdev))) {
- char dev_name[BDEVNAME_SIZE];
-
- bdevname(bdev, dev_name);
- pr_err_ratelimited("%s: Error: discard_granularity is 0.\n", dev_name);
+ pr_err_ratelimited("%pg: Error: discard_granularity is 0.\n",
+ bdev);
return -EOPNOTSUPP;
}