Commit 5661f33e authored by Jens Axboe's avatar Jens Axboe Committed by Linus Torvalds

[PATCH] Fix sparse warning in bio.c

Signed-off-by: default avatarJens Axboe <axboe@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 56d08216
...@@ -497,7 +497,7 @@ struct bio *bio_copy_user(request_queue_t *q, unsigned long uaddr, ...@@ -497,7 +497,7 @@ struct bio *bio_copy_user(request_queue_t *q, unsigned long uaddr,
* success * success
*/ */
if (!write_to_vm) { if (!write_to_vm) {
unsigned long p = uaddr; char __user *p = (char __user *) uaddr;
/* /*
* for a write, copy in data to kernel pages * for a write, copy in data to kernel pages
...@@ -506,7 +506,7 @@ struct bio *bio_copy_user(request_queue_t *q, unsigned long uaddr, ...@@ -506,7 +506,7 @@ struct bio *bio_copy_user(request_queue_t *q, unsigned long uaddr,
bio_for_each_segment(bvec, bio, i) { bio_for_each_segment(bvec, bio, i) {
char *addr = page_address(bvec->bv_page); char *addr = page_address(bvec->bv_page);
if (copy_from_user(addr, (char *) p, bvec->bv_len)) if (copy_from_user(addr, p, bvec->bv_len))
goto cleanup; goto cleanup;
p += bvec->bv_len; p += bvec->bv_len;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment