Skip to content

Commit

Permalink
[PATCH] ide: cast arguments to pr_debug() properly
Browse files Browse the repository at this point in the history
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]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Michael Richardson authored and Linus Torvalds committed Feb 8, 2006
1 parent cbd0d51 commit c2f8311
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/ide/ide-disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
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;
Expand Down Expand Up @@ -317,7 +318,8 @@ static ide_startstop_t ide_do_rw_disk (ide_drive_t *drive, struct request *rq, s

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);
Expand Down

0 comments on commit c2f8311

Please sign in to comment.