Skip to contentSkip to conversation

x86: e820.h fix various signedness issues in setup.c and e820.c

PATCH In review Jaswinder Singh Rajput 2 participants 3 messages Mar 22, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: e820.h fix various signedness issues in setup.c and e820.c

From: Jaswinder Singh Rajput <[email protected]>
Date: Mon, 23 Mar 2009 00:27:11 +0530
Subject: [PATCH] x86: e820.h fix various signedness issues in setup.c and e820.c

Impact: cleanup

This fixed various signedness issues in setup.c and e820.c:
arch/x86/kernel/setup.c:455:53: warning: incorrect type in argument 3 (different signedness)
arch/x86/kernel/setup.c:455:53: expected int *pnr_map
arch/x86/kernel/setup.c:455:53: got unsigned int extern [toplevel] *<noident>
arch/x86/kernel/setup.c:639:53: warning: incorrect type in argument 3 (different signedness)
arch/x86/kernel/setup.c:639:53: expected int *pnr_map
arch/x86/kernel/setup.c:639:53: got unsigned int extern [toplevel] *<noident>
arch/x86/kernel/setup.c:820:54: warning: incorrect type in argument 3 (different signedness)
arch/x86/kernel/setup.c:820:54: expected int *pnr_map
arch/x86/kernel/setup.c:820:54: got unsigned int extern [toplevel] *<noident>

arch/x86/kernel/e820.c:670:53: warning: incorrect type in argument 3 (different signedness)
arch/x86/kernel/e820.c:670:53: expected int *pnr_map
arch/x86/kernel/e820.c:670:53: got unsigned int [toplevel] *<noident>

---
 arch/x86/include/asm/e820.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/include/asm/e820.h +1 -1
index 00d41ce..a1e1c54 100644
@@ -57,7 +57,7 @@ struct e820entry {
 } __attribute__((packed));
 
 struct e820map {
-	__u32 nr_map;
+	int nr_map;
 	struct e820entry map[E820_X_MAX];
 };
 
Signature · 1 line
1.6.0.6
#1 lore raw
Quoted 32 lines · Jaswinder Singh Rajput

From: Jaswinder Singh Rajput <[email protected]>
Date: Mon, 23 Mar 2009 00:27:11 +0530
Subject: [PATCH] x86: e820.h fix various signedness issues in setup.c and e820.c

Impact: cleanup

This fixed various signedness issues in setup.c and e820.c:
arch/x86/kernel/setup.c:455:53: warning: incorrect type in argument 3 (different signedness)
arch/x86/kernel/setup.c:455:53: expected int *pnr_map
arch/x86/kernel/setup.c:455:53: got unsigned int extern [toplevel] *<noident>
arch/x86/kernel/setup.c:639:53: warning: incorrect type in argument 3 (different signedness)
arch/x86/kernel/setup.c:639:53: expected int *pnr_map
arch/x86/kernel/setup.c:639:53: got unsigned int extern [toplevel] *<noident>
arch/x86/kernel/setup.c:820:54: warning: incorrect type in argument 3 (different signedness)
arch/x86/kernel/setup.c:820:54: expected int *pnr_map
arch/x86/kernel/setup.c:820:54: got unsigned int extern [toplevel] *<noident>

arch/x86/kernel/e820.c:670:53: warning: incorrect type in argument 3 (different signedness)
arch/x86/kernel/e820.c:670:53: expected int *pnr_map
arch/x86/kernel/e820.c:670:53: got unsigned int [toplevel] *<noident>

---
 arch/x86/include/asm/e820.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/include/asm/e820.h +0 -0
index 00d41ce..a1e1c54 100644

arch/x86/include/asm/e820.h struct e820entry { · line 62

Quoted 7 lines
arch/x86/include/asm/e820.h +1 -1
@@ -57,7 +57,7 @@ struct e820entry {
 } __attribute__((packed));
 
 struct e820map {
-	__u32 nr_map;
+	int nr_map;
 	struct e820entry map[E820_X_MAX];
 };

but that header is exported so use of plain int looks wrong.

Sam

#2 lore raw
Quoted 9 lines · Sam Ravnborg

Review

Quoted 6 lines

struct e820map {

(quoted diff) +1 -1
-	__u32 nr_map;
+	int nr_map;
 	struct e820entry map[E820_X_MAX];
 };

but that header is exported so use of plain int looks wrong.

From: Jaswinder Singh Rajput <[email protected]>
Date: Mon, 23 Mar 2009 01:52:15 +0530
Subject: [PATCH] x86: e820.h fix various signedness issues in setup.c and e820.c

Impact: cleanup

This fixed various signedness issues in setup.c and e820.c:
arch/x86/kernel/setup.c:455:53: warning: incorrect type in argument 3 (different signedness)
arch/x86/kernel/setup.c:455:53: expected int *pnr_map
arch/x86/kernel/setup.c:455:53: got unsigned int extern [toplevel] *<noident>
arch/x86/kernel/setup.c:639:53: warning: incorrect type in argument 3 (different signedness)
arch/x86/kernel/setup.c:639:53: expected int *pnr_map
arch/x86/kernel/setup.c:639:53: got unsigned int extern [toplevel] *<noident>
arch/x86/kernel/setup.c:820:54: warning: incorrect type in argument 3 (different signedness)
arch/x86/kernel/setup.c:820:54: expected int *pnr_map
arch/x86/kernel/setup.c:820:54: got unsigned int extern [toplevel] *<noident>

arch/x86/kernel/e820.c:670:53: warning: incorrect type in argument 3 (different signedness)
arch/x86/kernel/e820.c:670:53: expected int *pnr_map
arch/x86/kernel/e820.c:670:53: got unsigned int [toplevel] *<noident>

---
 arch/x86/include/asm/e820.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/include/asm/e820.h +1 -1
index 00d41ce..991ac17 100644
@@ -57,7 +57,7 @@ struct e820entry {
 } __attribute__((packed));
 
 struct e820map {
-	__u32 nr_map;
+	__s32 nr_map;
 	struct e820entry map[E820_X_MAX];
 };
 
Signature · 1 line
1.6.0.6