diff options
author | Christoph Hellwig <hch@lst.de> | 2022-07-13 08:53:14 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-07-14 19:27:56 +0300 |
commit | 6e880cf59932a14bca128fc8e8faae0554932942 (patch) | |
tree | 44602fe48c6e998a10704d2775abc97217b36e18 /drivers/block/rnbd/rnbd-srv-sysfs.c | |
parent | beecf70ee84363e92f3bf783b74da5f26e765d8d (diff) | |
download | linux-6e880cf59932a14bca128fc8e8faae0554932942.tar.xz |
rnbd-srv: remove the name field from struct rnbd_dev
Just print the block device name directly using the %pg format specifier.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Jack Wang <jinpu.wang@ionos.com>
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-7-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/rnbd/rnbd-srv-sysfs.c')
-rw-r--r-- | drivers/block/rnbd/rnbd-srv-sysfs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/block/rnbd/rnbd-srv-sysfs.c b/drivers/block/rnbd/rnbd-srv-sysfs.c index feaa76c5a342..297a6924ff4e 100644 --- a/drivers/block/rnbd/rnbd-srv-sysfs.c +++ b/drivers/block/rnbd/rnbd-srv-sysfs.c @@ -38,14 +38,13 @@ static struct kobj_type dev_ktype = { }; int rnbd_srv_create_dev_sysfs(struct rnbd_srv_dev *dev, - struct block_device *bdev, - const char *dev_name) + struct block_device *bdev) { struct kobject *bdev_kobj; int ret; ret = kobject_init_and_add(&dev->dev_kobj, &dev_ktype, - rnbd_devs_kobj, dev_name); + rnbd_devs_kobj, "%pg", bdev); if (ret) { kobject_put(&dev->dev_kobj); return ret; |