Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1519737 > unrolled thread

[PATCH 03/12] block: floppy: use bio_add_page()

Started byMing Lei <tom.leiming@gmail.com>
First post2016-11-11 13:10 +0100
Last post2016-11-12 19:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 03/12] block: floppy: use bio_add_page() Ming Lei <tom.leiming@gmail.com> - 2016-11-11 13:10 +0100
    Re: [PATCH 03/12] block: floppy: use bio_add_page() Christoph Hellwig <hch@infradead.org> - 2016-11-12 19:10 +0100

#1519737 — [PATCH 03/12] block: floppy: use bio_add_page()

FromMing Lei <tom.leiming@gmail.com>
Date2016-11-11 13:10 +0100
Subject[PATCH 03/12] block: floppy: use bio_add_page()
Message-ID<sCiOC-48t-1@gated-at.bofh.it>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
 drivers/block/floppy.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 6a3ff2b2e3ae..a391a3cfb3fe 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -3807,12 +3807,9 @@ static int __floppy_read_block_0(struct block_device *bdev, int drive)
 	cbdata.drive = drive;
 
 	bio_init(&bio, &bio_vec, 1);
-	bio_vec.bv_page = page;
-	bio_vec.bv_len = size;
-	bio_vec.bv_offset = 0;
-	bio.bi_vcnt = 1;
-	bio.bi_iter.bi_size = size;
 	bio.bi_bdev = bdev;
+	bio_add_page(&bio, page, size, 0);
+
 	bio.bi_iter.bi_sector = 0;
 	bio.bi_flags |= (1 << BIO_QUIET);
 	bio.bi_private = &cbdata;
-- 
2.7.4

[toc] | [next] | [standalone]


#1520313

FromChristoph Hellwig <hch@infradead.org>
Date2016-11-12 19:10 +0100
Message-ID<sCKUx-5C9-9@gated-at.bofh.it>
In reply to#1519737
Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web