提交 e1fbd921 编写于 作者: G Geert Uytterhoeven 提交者: Jens Axboe

drivers/block/z2ram.c: correct printing of sector_t

If CONFIG_LBDAF=y, `sector_t' becomes `u64' instead of `unsigned long':

drivers/block/z2ram.c: In function ¡do_z2_request¢:
drivers/block/z2ram.c:83: warning: format %lu expects type `long unsigned int', but argument 2 has type `sector_t'

Hence always cast it to `unsigned long long' for printing.  Also do the
pr_err() dance, while we're at it.
Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
上级 5ad21a33
...@@ -80,8 +80,10 @@ static void do_z2_request(struct request_queue *q) ...@@ -80,8 +80,10 @@ static void do_z2_request(struct request_queue *q)
int err = 0; int err = 0;
if (start + len > z2ram_size) { if (start + len > z2ram_size) {
printk( KERN_ERR DEVICE_NAME ": bad access: block=%lu, count=%u\n", pr_err(DEVICE_NAME ": bad access: block=%llu, "
blk_rq_pos(req), blk_rq_cur_sectors(req)); "count=%u\n",
(unsigned long long)blk_rq_pos(req),
blk_rq_cur_sectors(req));
err = -EIO; err = -EIO;
goto done; goto done;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册