Re: [PATCH] [34/50] i386: Fix argument signedness warnings

2007-09-22 Thread Randy Dunlap
On Sat, 22 Sep 2007 12:01:16 +0200 (CEST) Jan Engelhardt wrote:

> 
> On Sep 22 2007 10:36, Satyam Sharma wrote:
> >> from arch/i386/boot/compressed/misc.c:14:
> >> include/asm/processor.h: In function ‘cpuid_count’:
> >   ^^   ^^
> >> include/asm/processor.h:615: warning: pointer targets in passing
> >> argument 1 of ‘native_cpuid’ differ in signedness
> >
> >> include/asm/processor.h:615: warning: pointer targets in passing
> >> argument 2 of ‘native_cpuid’ differ in signedness
> >
> >> include/asm/processor.h:615: warning: pointer targets in passing
> >> argument 3 of ‘native_cpuid’ differ in signedness
> >
> >> include/asm/processor.h:615: warning: pointer targets in passing
> >> argument 4 of ‘native_cpuid’ differ in signedness
> >^^^^
> >
> >Yikes. My bad, I had faulty (default) alpine settings (and a sad
> >combination of LANG=en_US.UTF-8) when I made and sent out that patch.
> >Please ensure that this finally gets committed in a somewhat saner and
> >more readable state to the tree.
> 
> I am not too thrilled about gcc using non-ascii for interpunctuation
> (for Western languages)..

Ack.  I usually build with "LC_ALL=C" to make those readable.

---
‾Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [34/50] i386: Fix argument signedness warnings

2007-09-22 Thread Jan Engelhardt

On Sep 22 2007 10:36, Satyam Sharma wrote:
>> from arch/i386/boot/compressed/misc.c:14:
>> include/asm/processor.h: In function ‘cpuid_count’:
>   ^^   ^^
>> include/asm/processor.h:615: warning: pointer targets in passing
>> argument 1 of ‘native_cpuid’ differ in signedness
>
>> include/asm/processor.h:615: warning: pointer targets in passing
>> argument 2 of ‘native_cpuid’ differ in signedness
>
>> include/asm/processor.h:615: warning: pointer targets in passing
>> argument 3 of ‘native_cpuid’ differ in signedness
>
>> include/asm/processor.h:615: warning: pointer targets in passing
>> argument 4 of ‘native_cpuid’ differ in signedness
>^^^^
>
>Yikes. My bad, I had faulty (default) alpine settings (and a sad
>combination of LANG=en_US.UTF-8) when I made and sent out that patch.
>Please ensure that this finally gets committed in a somewhat saner and
>more readable state to the tree.

I am not too thrilled about gcc using non-ascii for interpunctuation
(for Western languages)..
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] [34/50] i386: Fix argument signedness warnings

2007-09-21 Thread Satyam Sharma
Hi,


On Sat, 22 Sep 2007, Andi Kleen wrote:
> 
> From: Satyam Sharma <[EMAIL PROTECTED]>
> 
> 
> 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 ‘cpuid_count’:
   ^^   ^^
> include/asm/processor.h:615: warning: pointer targets in passing
> argument 1 of ‘native_cpuid’ differ in signedness

> include/asm/processor.h:615: warning: pointer targets in passing
> argument 2 of ‘native_cpuid’ differ in signedness

> include/asm/processor.h:615: warning: pointer targets in passing
> argument 3 of ‘native_cpuid’ differ in signedness

> include/asm/processor.h:615: warning: pointer targets in passing
> argument 4 of ‘native_cpuid’ differ in signedness
^^^^

Yikes. My bad, I had faulty (default) alpine settings (and a sad
combination of LANG=en_US.UTF-8) when I made and sent out that patch.
Please ensure that this finally gets committed in a somewhat saner and
more readable state to the tree.

Thanks,

Satyam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] [34/50] i386: Fix argument signedness warnings

2007-09-21 Thread Andi Kleen

From: Satyam Sharma <[EMAIL PROTECTED]>


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 ‘cpuid_count’:
include/asm/processor.h:615: warning: pointer targets in passing argument 1 of 
‘native_cpuid’ differ in signedness
include/asm/processor.h:615: warning: pointer targets in passing argument 2 of 
‘native_cpuid’ differ in signedness
include/asm/processor.h:615: warning: pointer targets in passing argument 3 of 
‘native_cpuid’ differ in signedness
include/asm/processor.h:615: warning: pointer targets in passing argument 4 of 
‘native_cpuid’ 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 <[EMAIL PROTECTED]>
Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>

---

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

Index: linux/include/asm-i386/processor.h
===
--- linux.orig/include/asm-i386/processor.h
+++ linux/include/asm-i386/processor.h
@@ -595,7 +595,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;
@@ -603,8 +605,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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/