summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorJohn Garry <john.g.garry@oracle.com>2024-05-24 10:48:29 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2024-05-31 02:22:15 +0200
commit41b757425203a73ba5aa401cf00feeccc1555f0c (patch)
tree23c26ef5dd397143010da0bb812d39e7996d9757 /block
parentscsi: core: Pass sdev to blk_mq_alloc_queue() (diff)
downloadlinux-41b757425203a73ba5aa401cf00feeccc1555f0c.tar.xz
linux-41b757425203a73ba5aa401cf00feeccc1555f0c.zip
scsi: bsg: Pass dev to blk_mq_alloc_queue()
When calling bsg_setup_queue() -> blk_mq_alloc_queue(), we don't pass the dev as the queuedata, but rather manually set it afterwards. Just pass dev to blk_mq_alloc_queue() to have automatically set. Signed-off-by: John Garry <john.g.garry@oracle.com> Link: https://lore.kernel.org/r/20240524084829.2132555-3-john.g.garry@oracle.com Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Tested-by: Himanshu Madhani <himanshu.madhani@oracle.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'block')
-rw-r--r--block/bsg-lib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block/bsg-lib.c b/block/bsg-lib.c
index ee738d129a9f..32da4a4429ce 100644
--- a/block/bsg-lib.c
+++ b/block/bsg-lib.c
@@ -385,13 +385,12 @@ struct request_queue *bsg_setup_queue(struct device *dev, const char *name,
if (blk_mq_alloc_tag_set(set))
goto out_tag_set;
- q = blk_mq_alloc_queue(set, lim, NULL);
+ q = blk_mq_alloc_queue(set, lim, dev);
if (IS_ERR(q)) {
ret = PTR_ERR(q);
goto out_queue;
}
- q->queuedata = dev;
blk_queue_rq_timeout(q, BLK_DEFAULT_SG_TIMEOUT);
bset->bd = bsg_register_queue(q, dev, name, bsg_transport_sg_io_fn);