]> bbs.cooldavid.org Git - net-next-2.6.git/commit
block: fix an address space warning in blk-map.c
authorNamhyung Kim <namhyung@gmail.com>
Wed, 15 Sep 2010 11:08:27 +0000 (13:08 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Wed, 15 Sep 2010 11:08:27 +0000 (13:08 +0200)
commit144177991ca624841ddbd1e7edff958fc0f6d1fe
tree793a42427d46585c0acfcfe97d23e604174a2c10
parent8dcbdc742fec9e6c542ff9cb599d2ee620753d07
block: fix an address space warning in blk-map.c

Change type of 2nd parameter of blk_rq_aligned() into unsigned long
and remove unnecessary casting. Now we can call it with 'uaddr'
instead of 'ubuf' in __blk_rq_map_user() so that it can remove
following warnings from sparse:

 block/blk-map.c:57:31: warning: incorrect type in argument 2 (different address spaces)
 block/blk-map.c:57:31:    expected void *addr
 block/blk-map.c:57:31:    got void [noderef] <asn:1>*ubuf

However blk_rq_map_kern() needs one more local variable to handle it.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block/blk-map.c
include/linux/blkdev.h