All of lore.kernel.org
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: cpufreq@lists.linux.org.uk
Cc: davej@codemonkey.org.uk
Subject: Re: [PATCH]add gcc printf format checking and fix wrong format in speedstep-smi.c
Date: Sun, 6 Jan 2008 21:18:05 +0100	[thread overview]
Message-ID: <200801062118.05964.deller@gmx.de> (raw)
In-Reply-To: <200801061427.01811.deller@gmx.de>

Updated patch below
==============

[PATCH] [CPUFREQ] add gcc printf format checking to cpufreq.h

ist_info.signature and the other variables in speedstep-smi.c are of type 
"unsigned int", not "unsigned long". Detected with the added printf
format check.

Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c b/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c
index f2b5a62..f0dffe9 100644
--- a/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c
+++ b/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c
@@ -368,7 +368,7 @@ static int __init speedstep_init(void)
 		return -ENODEV;
 	}
 
-	dprintk("signature:0x%.8lx, command:0x%.8lx, event:0x%.8lx, perf_level:0x%.8lx.\n",
+	dprintk("signature:0x%.8x, command:0x%.8x, event:0x%.8x, perf_level:0x%.8x.\n",
 		ist_info.signature, ist_info.command, ist_info.event, ist_info.perf_level);
 
 	/* Error if no IST-SMI BIOS or no PARM
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 23932d7..774add6 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -365,7 +365,7 @@ void cpufreq_frequency_table_put_attr(unsigned int cpu);
 #ifdef CONFIG_CPU_FREQ_DEBUG
 
 extern void cpufreq_debug_printk(unsigned int type, const char *prefix, 
-				 const char *fmt, ...);
+		const char *fmt, ...) __attribute__ ((format(printf,3,4)));
 
 #else

      reply	other threads:[~2008-01-06 20:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-06 13:27 [PATCH]add gcc printf format checking and fix wrong format in speedstep-smi.c Helge Deller
2008-01-06 20:18 ` Helge Deller [this message]

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=200801062118.05964.deller@gmx.de \
    --to=deller@gmx.de \
    --cc=cpufreq@lists.linux.org.uk \
    --cc=davej@codemonkey.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.