]> www.infradead.org Git - users/hch/misc.git/commitdiff
block: remove the unused q argument to bio_map_kern and bio_copy_kern
authorChristoph Hellwig <hch@lst.de>
Fri, 21 Mar 2025 12:54:02 +0000 (13:54 +0100)
committerChristoph Hellwig <hch@lst.de>
Fri, 21 Mar 2025 13:15:07 +0000 (14:15 +0100)
Signed-off-by: Christoph Hellwig <hch@lst.de>
block/blk-map.c

index d2f22744b3d11903f4a8dd438815e3a5b5d4332e..b365591896408a9067d18000e014b7cce7a35455 100644 (file)
@@ -319,7 +319,6 @@ static void bio_map_kern_endio(struct bio *bio)
 
 /**
  *     bio_map_kern    -       map kernel address into bio
- *     @q: the struct request_queue for the bio
  *     @data: pointer to buffer to map
  *     @len: length in bytes
  *     @gfp_mask: allocation flags for bio allocation
@@ -327,8 +326,7 @@ static void bio_map_kern_endio(struct bio *bio)
  *     Map the kernel address into a bio suitable for io to a block
  *     device. Returns an error pointer in case of error.
  */
-static struct bio *bio_map_kern(struct request_queue *q, void *data,
-               unsigned int len, gfp_t gfp_mask)
+static struct bio *bio_map_kern(void *data, unsigned int len, gfp_t gfp_mask)
 {
        unsigned long kaddr = (unsigned long)data;
        unsigned long end = (kaddr + len + PAGE_SIZE - 1) >> PAGE_SHIFT;
@@ -411,8 +409,8 @@ static void bio_copy_kern_endio_read(struct bio *bio)
  *     copy the kernel address into a bio suitable for io to a block
  *     device. Returns an error pointer in case of error.
  */
-static struct bio *bio_copy_kern(struct request_queue *q, void *data,
-               unsigned int len, gfp_t gfp_mask, int reading)
+static struct bio *bio_copy_kern(void *data, unsigned int len, gfp_t gfp_mask,
+               int reading)
 {
        unsigned long kaddr = (unsigned long)data;
        unsigned long end = (kaddr + len + PAGE_SIZE - 1) >> PAGE_SHIFT;
@@ -715,9 +713,9 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf,
 
        if (!blk_rq_aligned(q, addr, len) || object_is_on_stack(kbuf) ||
            blk_queue_may_bounce(q))
-               bio = bio_copy_kern(q, kbuf, len, gfp_mask, reading);
+               bio = bio_copy_kern(kbuf, len, gfp_mask, reading);
        else
-               bio = bio_map_kern(q, kbuf, len, gfp_mask);
+               bio = bio_map_kern(kbuf, len, gfp_mask);
 
        if (IS_ERR(bio))
                return PTR_ERR(bio);