mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Luck, Tony" <tony.luck@intel.com>
To: len.brown@intel.com
Cc: linux-kernel@vger.kernel.org
Subject: 3 warnings from drivers/acpi/processor_idle.c
Date: Wed, 29 Dec 2004 15:57:54 -0800	[thread overview]
Message-ID: <200412292357.iBTNvs521605@unix-os.sc.intel.com> (raw)

Compiling on ia64 I see:
drivers/acpi/processor_idle.c:846: warning: int format, different type arg (arg 3)
drivers/acpi/processor_idle.c:877: warning: int format, different type arg (arg 3)
drivers/acpi/processor_idle.c:884: warning: int format, different type arg (arg 3)

This is the result of using "%d" to print the difference between two pointers.

Use "%zd" instead.

Signed-off-by: Tony Luck <tony.luck@intel.com>

===== drivers/acpi/processor_idle.c 1.15 vs edited =====
--- 1.15/drivers/acpi/processor_idle.c	2004-12-23 05:39:58 -08:00
+++ edited/drivers/acpi/processor_idle.c	2004-12-29 15:45:49 -08:00
@@ -838,7 +838,7 @@
 	if (!pr)
 		goto end;
 
-	seq_printf(seq, "active state:            C%d\n"
+	seq_printf(seq, "active state:            C%zd\n"
 			"max_cstate:              C%d\n"
 			"bus master activity:     %08x\n",
 			pr->power.state ? pr->power.state - pr->power.states : 0,
@@ -872,14 +872,14 @@
 		}
 
 		if (pr->power.states[i].promotion.state)
-			seq_printf(seq, "promotion[C%d] ",
+			seq_printf(seq, "promotion[C%zd] ",
 				(pr->power.states[i].promotion.state -
 				 pr->power.states));
 		else
 			seq_puts(seq, "promotion[--] ");
 
 		if (pr->power.states[i].demotion.state)
-			seq_printf(seq, "demotion[C%d] ",
+			seq_printf(seq, "demotion[C%zd] ",
 				(pr->power.states[i].demotion.state -
 				 pr->power.states));
 		else

                 reply	other threads:[~2004-12-29 23:57 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=200412292357.iBTNvs521605@unix-os.sc.intel.com \
    --to=tony.luck@intel.com \
    --cc=len.brown@intel.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®