[PATCH -mm] i386 cpuid_count: Fix argument signedness warnings

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linux Kernel Mailing List <linux-kernel@...>
Cc: Andi Kleen <ak@...>, Andrew Morton <akpm@...>
Date: Sunday, September 2, 2007 - 4:24 pm

These build warnings:

In file included from include/asm/thread_info.h:16,
from include/linux/thread_info.h:21,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:49,
from include/linux/vmalloc.h:4,
from arch/i386/boot/compressed/misc.c:14:
include/asm/processor.h: In function $B!F(Jcpuid_count$B!G(J:
include/asm/processor.h:615: warning: pointer targets in passing argument 1 of $B!F(Jnative_cpuid$B!G(J differ in signedness
include/asm/processor.h:615: warning: pointer targets in passing argument 2 of $B!F(Jnative_cpuid$B!G(J differ in signedness
include/asm/processor.h:615: warning: pointer targets in passing argument 3 of $B!F(Jnative_cpuid$B!G(J differ in signedness
include/asm/processor.h:615: warning: pointer targets in passing argument 4 of $B!F(Jnative_cpuid$B!G(J differ in signedness

come because the arguments have been specified as pointers to (signed) int
types, not unsigned. So let's specify those as unsigned. Do some codingstyle
here and there while at it.

Signed-off-by: Satyam Sharma <satyam@infradead.org>

---

 include/asm-i386/processor.h |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--- linux-2.6.23-rc4-mm1/include/asm-i386/processor.h~fix	2007-09-02 23:54:23.000000000 +0530
+++ linux-2.6.23-rc4-mm1/include/asm-i386/processor.h	2007-09-02 23:57:46.000000000 +0530
@@ -599,7 +599,9 @@ static inline void load_esp0(struct tss_
  * clear %ecx since some cpus (Cyrix MII) do not set or clear %ecx
  * resulting in stale register contents being returned.
  */
-static inline void cpuid(unsigned int op, unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx)
+static inline void cpuid(unsigned int op,
+			 unsigned int *eax, unsigned int *ebx,
+			 unsigned int *ecx, unsigned int *edx)
 {
 	*eax = op;
 	*ecx = 0;
@@ -607,8 +609,9 @@ static inline void cpuid(unsigned int op
 }
 
 /* Some CPUID calls want 'count' to be placed in ecx */
-static inline void cpuid_count(int op, int count, int *eax, int *ebx, int *ecx,
-			       int *edx)
+static inline void cpuid_count(unsigned int op, int count,
+			       unsigned int *eax, unsigned int *ebx,
+			       unsigned int *ecx, unsigned int *edx)
 {
 	*eax = op;
 	*ecx = count;
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[-mm patchset] War on warnings, Satyam Sharma, (Sun Sep 2, 4:02 pm)
[PATCH -mm] i386 cpuid_count: Fix argument signedness warnings, Satyam Sharma, (Sun Sep 2, 4:24 pm)
[PATCH -mm] net/wireless/sysfs.c: Shut up build warning, Satyam Sharma, (Sun Sep 2, 4:11 pm)
[PATCH -mm] sisusbvga: Fix bug and build warnings, Satyam Sharma, (Sun Sep 2, 4:07 pm)
Re: [PATCH -mm] sisusbvga: Fix bug and build warnings, Satyam Sharma, (Sun Sep 2, 4:32 pm)
Re: [-mm patchset] War on warnings, Jesper Juhl, (Sun Sep 2, 4:04 pm)
Re: [-mm patchset] War on warnings, Satyam Sharma, (Sun Sep 2, 4:39 pm)