Skip to content

Commit 75618ac

Browse files
Anuj Guptaaxboe
authored andcommitted
block: remove unused parameter 'q' parameter in __blk_rq_map_sg()
request_queue param is no longer used by blk_rq_map_sg and __blk_rq_map_sg. Remove it. Signed-off-by: Anuj Gupta <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 017ff37 commit 75618ac

File tree

18 files changed

+22
-26
lines changed

18 files changed

+22
-26
lines changed

block/blk-merge.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,8 +551,8 @@ static inline struct scatterlist *blk_next_sg(struct scatterlist **sg,
551551
* Map a request to scatterlist, return number of sg entries setup. Caller
552552
* must make sure sg can hold rq->nr_phys_segments entries.
553553
*/
554-
int __blk_rq_map_sg(struct request_queue *q, struct request *rq,
555-
struct scatterlist *sglist, struct scatterlist **last_sg)
554+
int __blk_rq_map_sg(struct request *rq, struct scatterlist *sglist,
555+
struct scatterlist **last_sg)
556556
{
557557
struct req_iterator iter = {
558558
.bio = rq->bio,

block/bsg-lib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ static int bsg_map_buffer(struct bsg_buffer *buf, struct request *req)
219219
if (!buf->sg_list)
220220
return -ENOMEM;
221221
sg_init_table(buf->sg_list, req->nr_phys_segments);
222-
buf->sg_cnt = blk_rq_map_sg(req->q, req, buf->sg_list);
222+
buf->sg_cnt = blk_rq_map_sg(req, buf->sg_list);
223223
buf->payload_len = blk_rq_bytes(req);
224224
return 0;
225225
}

drivers/block/mtip32xx/mtip32xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2056,7 +2056,7 @@ static void mtip_hw_submit_io(struct driver_data *dd, struct request *rq,
20562056
unsigned int nents;
20572057

20582058
/* Map the scatter list for DMA access */
2059-
nents = blk_rq_map_sg(hctx->queue, rq, command->sg);
2059+
nents = blk_rq_map_sg(rq, command->sg);
20602060
nents = dma_map_sg(&dd->pdev->dev, command->sg, nents, dma_dir);
20612061

20622062
prefetch(&port->flags);

drivers/block/rnbd/rnbd-clt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ static int rnbd_client_xfer_request(struct rnbd_clt_dev *dev,
10101010
* See queue limits.
10111011
*/
10121012
if ((req_op(rq) != REQ_OP_DISCARD) && (req_op(rq) != REQ_OP_WRITE_ZEROES))
1013-
sg_cnt = blk_rq_map_sg(dev->queue, rq, iu->sgt.sgl);
1013+
sg_cnt = blk_rq_map_sg(rq, iu->sgt.sgl);
10141014

10151015
if (sg_cnt == 0)
10161016
sg_mark_end(&iu->sgt.sgl[0]);

drivers/block/sunvdc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ static int __send_request(struct request *req)
485485
}
486486

487487
sg_init_table(sg, port->ring_cookies);
488-
nsg = blk_rq_map_sg(req->q, req, sg);
488+
nsg = blk_rq_map_sg(req, sg);
489489

490490
len = 0;
491491
for (i = 0; i < nsg; i++)

drivers/block/virtio_blk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ static int virtblk_map_data(struct blk_mq_hw_ctx *hctx, struct request *req,
226226
if (unlikely(err))
227227
return -ENOMEM;
228228

229-
return blk_rq_map_sg(hctx->queue, req, vbr->sg_table.sgl);
229+
return blk_rq_map_sg(req, vbr->sg_table.sgl);
230230
}
231231

232232
static void virtblk_cleanup_cmd(struct request *req)

drivers/block/xen-blkfront.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ static int blkif_queue_rw_req(struct request *req, struct blkfront_ring_info *ri
751751
id = blkif_ring_get_request(rinfo, req, &final_ring_req);
752752
ring_req = &rinfo->shadow[id].req;
753753

754-
num_sg = blk_rq_map_sg(req->q, req, rinfo->shadow[id].sg);
754+
num_sg = blk_rq_map_sg(req, rinfo->shadow[id].sg);
755755
num_grant = 0;
756756
/* Calculate the number of grant used */
757757
for_each_sg(rinfo->shadow[id].sg, sg, num_sg, i)

drivers/memstick/core/ms_block.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1904,7 +1904,7 @@ static void msb_io_work(struct work_struct *work)
19041904

19051905
/* process the request */
19061906
dbg_verbose("IO: processing new request");
1907-
blk_rq_map_sg(msb->queue, req, sg);
1907+
blk_rq_map_sg(req, sg);
19081908

19091909
lba = blk_rq_pos(req);
19101910

drivers/memstick/core/mspro_block.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -627,9 +627,7 @@ static int mspro_block_issue_req(struct memstick_dev *card)
627627
while (true) {
628628
msb->current_page = 0;
629629
msb->current_seg = 0;
630-
msb->seg_count = blk_rq_map_sg(msb->block_req->q,
631-
msb->block_req,
632-
msb->req_sg);
630+
msb->seg_count = blk_rq_map_sg(msb->block_req, msb->req_sg);
633631

634632
if (!msb->seg_count) {
635633
unsigned int bytes = blk_rq_cur_bytes(msb->block_req);

drivers/mmc/core/queue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,5 +523,5 @@ unsigned int mmc_queue_map_sg(struct mmc_queue *mq, struct mmc_queue_req *mqrq)
523523
{
524524
struct request *req = mmc_queue_req_to_req(mqrq);
525525

526-
return blk_rq_map_sg(mq->queue, req, mqrq->sg);
526+
return blk_rq_map_sg(req, mqrq->sg);
527527
}

0 commit comments

Comments
 (0)