Re: [PATCH] laptop-mode-2.6.0 version 5

From: Jens Axboe
Date: Sun Jan 04 2004 - 05:32:34 EST


On Sun, Jan 04 2004, Peter Chubb wrote:
> >>>>> "Jens" == Jens Axboe <axboe@xxxxxxx> writes:
>
> Jens> The dump printk() needs to be changed anyways, the rw
> Jens> deciphering is not correct. Something like this is more
> Jens> appropriate:
>
> Jens> if (unlikely(block_dump)) {
> Jens> char b[BDEVNAME_SIZE];
> Jens> printk("%s(%d): %s block %Lu on %s\n", current->comm, current-> pid, (rw & WRITE) ? "WRITE" : "READ",
> Jens> (u64) bio->bi_sector, bdevname(bio->bi_bdev, b));
> Jens> }
>
> Please cast to (unsigned long long) not (u64) because on 64-bit
> architectures u64 is unsigned long, and you'll get a compiler warning.

Yeah Andrew noted the same thing, my bad.

--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/