All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org,
	target-devel@vger.kernel.org, linux-btrfs@vger.kernel.org
Cc: axboe@kernel.dk, mb@lightnvm.io, martin.petersen@oracle.com,
	clm@fb.com, josef@toxicpanda.com, dsterba@suse.com,
	johannes.thumshirn@wdc.com, ming.lei@redhat.com, osandov@fb.com,
	willy@infradead.org, jefflexu@linux.alibaba.com, hch@lst.de,
	Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Subject: [RFC PATCH 1/8] block: fix return type of bio_add_hw_page()
Date: Wed, 19 May 2021 23:22:48 -0700	[thread overview]
Message-ID: <20210520062255.4908-2-chaitanya.kulkarni@wdc.com> (raw)
In-Reply-To: <20210520062255.4908-1-chaitanya.kulkarni@wdc.com>

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 --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 */
-- 
2.24.0


  reply	other threads:[~2021-05-20  6:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20  6:22 [RFC PATCH 0/8] block: fix bio_add_XXX_page() return type Chaitanya Kulkarni
2021-05-20  6:22 ` Chaitanya Kulkarni [this message]
2021-05-20  6:22 ` [RFC PATCH 2/8] block: fix return type of bio_add_pc_page() Chaitanya Kulkarni
2021-05-20  6:22 ` [RFC PATCH 3/8] block: fix return type of bio_add_zone_append_page Chaitanya Kulkarni
2021-05-20  6:22 ` [RFC PATCH 4/8] block: fix return type of bio_add_page() Chaitanya Kulkarni
2021-05-20  6:22 ` [RFC PATCH 5/8] lightnvm: fix variable type pblk-core Chaitanya Kulkarni
2021-05-20  6:22 ` [RFC PATCH 6/8] pscsi: fix variable type pscsi_map_sg Chaitanya Kulkarni
2021-05-20  6:22 ` [RFC PATCH 7/8] btrfs: fix variable type in btrfs_bio_add_page Chaitanya Kulkarni
2021-05-20  6:22 ` [RFC PATCH 8/8] block: fix variable type for zero pages Chaitanya Kulkarni
2021-05-21 10:25 ` [RFC PATCH 0/8] block: fix bio_add_XXX_page() return type Johannes Thumshirn
2021-05-21 21:37   ` Chaitanya Kulkarni
2021-05-21 22:37     ` Omar Sandoval
2021-05-21 23:25       ` Chaitanya Kulkarni
2021-05-21 11:30 ` Matthew Wilcox
2021-05-21 21:51   ` Chaitanya Kulkarni
2021-05-24  7:35   ` Christoph Hellwig
2021-05-24 13:29     ` Matthew Wilcox
2021-05-26  2:55     ` Chaitanya Kulkarni
2021-05-27 11:43       ` Christoph Hellwig
2021-05-27 17:43         ` Chaitanya Kulkarni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210520062255.4908-2-chaitanya.kulkarni@wdc.com \
    --to=chaitanya.kulkarni@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=hch@lst.de \
    --cc=jefflexu@linux.alibaba.com \
    --cc=johannes.thumshirn@wdc.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mb@lightnvm.io \
    --cc=ming.lei@redhat.com \
    --cc=osandov@fb.com \
    --cc=target-devel@vger.kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.