@@ -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;
@@ -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 */
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(-)