@@ -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,
@@ -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,
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(-)