diff mbox series

[RFC,3/8] block: fix return type of bio_add_zone_append_page

Message ID 20210520062255.4908-4-chaitanya.kulkarni@wdc.com (mailing list archive)
State New, archived
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_zone_append_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         | 4 ++--
 include/linux/bio.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/block/bio.c b/block/bio.c
index 803a0b5894bc..bc0e6e93ed58 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -825,8 +825,8 @@  EXPORT_SYMBOL(bio_add_pc_page);
  *
  * Returns: number of bytes added to the bio, or 0 in case of a failure.
  */
-int bio_add_zone_append_page(struct bio *bio, struct page *page,
-			     unsigned int len, unsigned int offset)
+unsigned int bio_add_zone_append_page(struct bio *bio, struct page *page,
+				      unsigned int len, unsigned int offset)
 {
 	struct request_queue *q = bio->bi_bdev->bd_disk->queue;
 	bool same_page = false;
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 72b28d06064c..548d6a3342c3 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -469,8 +469,8 @@  void bio_chain(struct bio *, struct bio *);
 extern 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);
-int bio_add_zone_append_page(struct bio *bio, struct page *page,
-			     unsigned int len, unsigned int offset);
+unsigned 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,
 		unsigned int len, unsigned int off, bool *same_page);
 void __bio_add_page(struct bio *bio, struct page *page,