drivers/block/z2ram.c: correct printing of sector_t
authorGeert Uytterhoeven <geert@linux-m68k.org>
Thu, 28 Oct 2010 12:15:26 +0000 (06:15 -0600)
committerJens Axboe <jaxboe@fusionio.com>
Thu, 28 Oct 2010 12:15:26 +0000 (06:15 -0600)
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: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
drivers/block/z2ram.c

index dcd4cfc..a22e3f8 100644 (file)
@@ -80,8 +80,10 @@ static void do_z2_request(struct request_queue *q)
                int err = 0;
 
                if (start + len > z2ram_size) {
-                       printk( KERN_ERR DEVICE_NAME ": bad access: block=%lu, count=%u\n",
-                               blk_rq_pos(req), blk_rq_cur_sectors(req));
+                       pr_err(DEVICE_NAME ": bad access: block=%llu, "
+                              "count=%u\n",
+                              (unsigned long long)blk_rq_pos(req),
+                              blk_rq_cur_sectors(req));
                        err = -EIO;
                        goto done;
                }