[RFC PATCH 2/8] block: fix return type of bio_add_pc_page()

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

 



Fix bio_add_pc_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         | 5 +++--
 include/linux/bio.h | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/block/bio.c b/block/bio.c
index 531dbf15c0d9..803a0b5894bc 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -799,8 +799,9 @@ unsigned int bio_add_hw_page(struct request_queue *q, struct bio *bio,
  *
  * This should only be used by passthrough bios.
  */
-int bio_add_pc_page(struct request_queue *q, struct bio *bio,
-		struct page *page, unsigned int len, unsigned int offset)
+unsigned int bio_add_pc_page(struct request_queue *q, struct bio *bio,
+			     struct page *page, unsigned int len,
+			     unsigned int offset)
 {
 	bool same_page = false;
 	return bio_add_hw_page(q, bio, page, len, offset,
diff --git a/include/linux/bio.h b/include/linux/bio.h
index a0b4cfdf62a4..72b28d06064c 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -467,8 +467,8 @@ 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);
-extern int bio_add_pc_page(struct request_queue *, 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);
 int bio_add_zone_append_page(struct bio *bio, struct page *page,
 			     unsigned int len, unsigned int offset);
 bool __bio_try_merge_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