[RFC PATCH 4/8] block: fix return type of bio_add_page()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix bio_add_page() return type to unsigned int as it returns the
length which is of type unsigned int and not int.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
---
 block/bio.c         | 4 ++--
 include/linux/bio.h | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/block/bio.c b/block/bio.c
index bc0e6e93ed58..346909d35bd1 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -921,8 +921,8 @@ EXPORT_SYMBOL_GPL(__bio_add_page);
  *	Attempt to add page(s) to the bio_vec maplist. This will only fail
  *	if either bio->bi_vcnt == bio->bi_max_vecs or it's a cloned bio.
  */
-int bio_add_page(struct bio *bio, struct page *page,
-		 unsigned int len, unsigned int offset)
+unsigned int bio_add_page(struct bio *bio, struct page *page,
+			  unsigned int len, unsigned int offset)
 {
 	bool same_page = false;
 
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 548d6a3342c3..f4f0b19b2ef3 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -466,7 +466,8 @@ extern void bio_uninit(struct bio *);
 extern void bio_reset(struct bio *);
 void bio_chain(struct bio *, struct bio *);
 
-extern int bio_add_page(struct bio *, struct page *, unsigned int,unsigned int);
+unsigned int bio_add_page(struct bio *, struct page *, unsigned int,
+			   unsigned int);
 unsigned int bio_add_pc_page(struct request_queue *, struct bio *,
 			     struct page *, unsigned int, unsigned int);
 unsigned int bio_add_zone_append_page(struct bio *bio, struct page *page,
-- 
2.24.0




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux