diff mbox series

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

Message ID 20210520062255.4908-3-chaitanya.kulkarni@wdc.com
State New
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_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@wdc.com>
---
 block/bio.c         | 5 +++--
 include/linux/bio.h | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)
diff mbox series

Patch

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,