diff options
author | Christoph Hellwig <hch@lst.de> | 2022-03-01 11:38:14 +0300 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2022-03-02 20:15:35 +0300 |
commit | 977ff73e64151d94811f4ba905419c90573f63e1 (patch) | |
tree | 1a3bc32bfd97c8af94304e39f8ac56205190221b /drivers | |
parent | f5b4aee10c024a35901cc2f1b9b4d80986a93937 (diff) | |
download | linux-977ff73e64151d94811f4ba905419c90573f63e1.tar.xz |
dm-zoned: remove the ->name field in struct dmz_dev
Just use the %pg format specifier to print the block device name
directly.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/dm-zoned-metadata.c | 4 | ||||
-rw-r--r-- | drivers/md/dm-zoned-target.c | 1 | ||||
-rw-r--r-- | drivers/md/dm-zoned.h | 9 |
3 files changed, 6 insertions, 8 deletions
diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c index e5f1eb27ce2e..d1ea66114d14 100644 --- a/drivers/md/dm-zoned-metadata.c +++ b/drivers/md/dm-zoned-metadata.c @@ -1101,8 +1101,8 @@ static int dmz_check_sb(struct dmz_metadata *zmd, struct dmz_sb *dsb, */ static int dmz_read_sb(struct dmz_metadata *zmd, struct dmz_sb *sb, int set) { - dmz_zmd_debug(zmd, "read superblock set %d dev %s block %llu", - set, sb->dev->name, sb->block); + dmz_zmd_debug(zmd, "read superblock set %d dev %pg block %llu", + set, sb->dev->bdev, sb->block); return dmz_rdwr_block(sb->dev, REQ_OP_READ, sb->block, sb->mblk->page); diff --git a/drivers/md/dm-zoned-target.c b/drivers/md/dm-zoned-target.c index a3f6d3ef3817..cac295cc8840 100644 --- a/drivers/md/dm-zoned-target.c +++ b/drivers/md/dm-zoned-target.c @@ -730,7 +730,6 @@ static int dmz_get_zoned_device(struct dm_target *ti, char *path, } dev->bdev = bdev; dev->dev_idx = idx; - (void)bdevname(dev->bdev, dev->name); dev->capacity = bdev_nr_sectors(bdev); if (ti->begin) { diff --git a/drivers/md/dm-zoned.h b/drivers/md/dm-zoned.h index 22f11440b423..a02744a0846c 100644 --- a/drivers/md/dm-zoned.h +++ b/drivers/md/dm-zoned.h @@ -56,7 +56,6 @@ struct dmz_dev { struct dmz_metadata *metadata; struct dmz_reclaim *reclaim; - char name[BDEVNAME_SIZE]; uuid_t uuid; sector_t capacity; @@ -176,16 +175,16 @@ enum { * Message functions. */ #define dmz_dev_info(dev, format, args...) \ - DMINFO("(%s): " format, (dev)->name, ## args) + DMINFO("(%pg): " format, (dev)->bdev, ## args) #define dmz_dev_err(dev, format, args...) \ - DMERR("(%s): " format, (dev)->name, ## args) + DMERR("(%pg): " format, (dev)->bdev, ## args) #define dmz_dev_warn(dev, format, args...) \ - DMWARN("(%s): " format, (dev)->name, ## args) + DMWARN("(%pg): " format, (dev)->bdev, ## args) #define dmz_dev_debug(dev, format, args...) \ - DMDEBUG("(%s): " format, (dev)->name, ## args) + DMDEBUG("(%pg): " format, (dev)->bdev, ## args) /* * Functions defined in dm-zoned-metadata.c |