diff mbox series

[RFC,1/8] block: fix return type of bio_add_hw_page()

Message ID 20210520062255.4908-2-chaitanya.kulkarni@wdc.com (mailing list archive)
State Not Applicable
Headers show
Series block: fix bio_add_XXX_page() return type | expand

Commit Message

Chaitanya Kulkarni May 20, 2021, 6:22 a.m. UTC
Fix bio_add_hw_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@wdc.com>
---
 block/bio.c | 7 ++++---
 block/blk.h | 7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/block/bio.c b/block/bio.c
index 44205dfb6b60..531dbf15c0d9 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -743,9 +743,10 @@  static bool bio_try_merge_hw_seg(struct request_queue *q, struct bio *bio,
  * Add a page to a bio while respecting the hardware max_sectors, max_segment
  * and gap limitations.
  */
-int bio_add_hw_page(struct request_queue *q, struct bio *bio,
-		struct page *page, unsigned int len, unsigned int offset,
-		unsigned int max_sectors, bool *same_page)
+unsigned int bio_add_hw_page(struct request_queue *q, struct bio *bio,
+			     struct page *page, unsigned int len,
+			     unsigned int offset, unsigned int max_sectors,
+			     bool *same_page)
 {
 	struct bio_vec *bvec;
 
diff --git a/block/blk.h b/block/blk.h
index 8b3591aee0a5..a8930ecd4a5e 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -355,8 +355,9 @@  int bdev_del_partition(struct block_device *bdev, int partno);
 int bdev_resize_partition(struct block_device *bdev, int partno,
 		sector_t start, sector_t length);
 
-int bio_add_hw_page(struct request_queue *q, struct bio *bio,
-		struct page *page, unsigned int len, unsigned int offset,
-		unsigned int max_sectors, bool *same_page);
+unsigned int bio_add_hw_page(struct request_queue *q, struct bio *bio,
+			     struct page *page, unsigned int len,
+			     unsigned int offset, unsigned int max_sectors,
+			     bool *same_page);
 
 #endif /* BLK_INTERNAL_H */