mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michael Richardson" <mcr@sandelman.ottawa.on.ca>
To: alan@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] cast arguments to pr_debug() properly
Date: Sun, 05 Feb 2006 21:56:00 -0500	[thread overview]
Message-ID: <20882.1139194560@sandelman.ottawa.on.ca> (raw)

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]


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 <mcr@xelerance.com>

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 #2: Type: application/pgp-signature, Size: 480 bytes --]

                 reply	other threads:[~2006-02-06  2:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20882.1139194560@sandelman.ottawa.on.ca \
    --to=mcr@sandelman.ottawa.on.ca \
    --cc=alan@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®