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

From: Peter Chubb
Date: Sun Jan 04 2004 - 04:55:00 EST


>>>>> "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.

-
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/