pktcdvd: stop using bdevname in pkt_new_dev
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-6-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
fa070a3b50
commit
beecf70ee8
@ -2519,7 +2519,6 @@ static int pkt_seq_show(struct seq_file *m, void *p)
|
|||||||
static int pkt_new_dev(struct pktcdvd_device *pd, dev_t dev)
|
static int pkt_new_dev(struct pktcdvd_device *pd, dev_t dev)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char b[BDEVNAME_SIZE];
|
|
||||||
struct block_device *bdev;
|
struct block_device *bdev;
|
||||||
struct scsi_device *sdev;
|
struct scsi_device *sdev;
|
||||||
|
|
||||||
@ -2532,8 +2531,7 @@ static int pkt_new_dev(struct pktcdvd_device *pd, dev_t dev)
|
|||||||
if (!pd2)
|
if (!pd2)
|
||||||
continue;
|
continue;
|
||||||
if (pd2->bdev->bd_dev == dev) {
|
if (pd2->bdev->bd_dev == dev) {
|
||||||
pkt_err(pd, "%s already setup\n",
|
pkt_err(pd, "%pg already setup\n", pd2->bdev);
|
||||||
bdevname(pd2->bdev, b));
|
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
if (pd2->pkt_dev == dev) {
|
if (pd2->pkt_dev == dev) {
|
||||||
@ -2568,7 +2566,7 @@ static int pkt_new_dev(struct pktcdvd_device *pd, dev_t dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc_create_single_data(pd->name, 0, pkt_proc, pkt_seq_show, pd);
|
proc_create_single_data(pd->name, 0, pkt_proc, pkt_seq_show, pd);
|
||||||
pkt_dbg(1, pd, "writer mapped to %s\n", bdevname(bdev, b));
|
pkt_dbg(1, pd, "writer mapped to %pg\n", bdev);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out_mem:
|
out_mem:
|
||||||
|
Loading…
Reference in New Issue
Block a user