[PATCH] cast arguments to pr_debug() properly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This does not show up unless you #define DEBUG in the file, which most
people wouldn't do. On PPC405, at least, "sector_t" is unsigned long,
which doesn't match %llx/%llu. Since sector# may well be >32 bits,
promote the value to match the format.

Signed-off-by: Michael Richardson <[email protected]>

diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 449522f..0e1e0dd 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -190,7 +190,7 @@ static ide_startstop_t __ide_do_rw_disk(
 		if (lba48) {
 			task_ioreg_t tasklets[10];
 
-			pr_debug("%s: LBA=0x%012llx\n", drive->name, block);
+			pr_debug("%s: LBA=0x%012llx\n", drive->name, (unsigned long long)block);
 
 			tasklets[0] = 0;
 			tasklets[1] = 0;
@@ -317,7 +317,7 @@ static ide_startstop_t ide_do_rw_disk (i
 
 	pr_debug("%s: %sing: block=%llu, sectors=%lu, buffer=0x%08lx\n",
 		 drive->name, rq_data_dir(rq) == READ ? "read" : "writ",
-		 block, rq->nr_sectors, (unsigned long)rq->buffer);
+		 (unsigned long long)block, rq->nr_sectors, (unsigned long)rq->buffer);
 
 	if (hwif->rw_disk)
 		hwif->rw_disk(drive, rq);

Attachment: pgpWxjYsrvtfZ.pgp
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux