提交 ba639039 编写于 作者: J Jaswinder Singh Rajput

x86: e820 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>
Signed-off-by: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
上级 a1e38ca5
...@@ -72,7 +72,7 @@ extern int e820_all_mapped(u64 start, u64 end, unsigned type); ...@@ -72,7 +72,7 @@ extern int e820_all_mapped(u64 start, u64 end, unsigned type);
extern void e820_add_region(u64 start, u64 size, int type); extern void e820_add_region(u64 start, u64 size, int type);
extern void e820_print_map(char *who); extern void e820_print_map(char *who);
extern int extern int
sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, int *pnr_map); sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, u32 *pnr_map);
extern u64 e820_update_range(u64 start, u64 size, unsigned old_type, extern u64 e820_update_range(u64 start, u64 size, unsigned old_type,
unsigned new_type); unsigned new_type);
extern u64 e820_remove_range(u64 start, u64 size, unsigned old_type, extern u64 e820_remove_range(u64 start, u64 size, unsigned old_type,
......
...@@ -233,7 +233,7 @@ void __init e820_print_map(char *who) ...@@ -233,7 +233,7 @@ void __init e820_print_map(char *who)
*/ */
int __init sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, int __init sanitize_e820_map(struct e820entry *biosmap, int max_nr_map,
int *pnr_map) u32 *pnr_map)
{ {
struct change_member { struct change_member {
struct e820entry *pbios; /* pointer to original bios entry */ struct e820entry *pbios; /* pointer to original bios entry */
...@@ -552,7 +552,7 @@ u64 __init e820_remove_range(u64 start, u64 size, unsigned old_type, ...@@ -552,7 +552,7 @@ u64 __init e820_remove_range(u64 start, u64 size, unsigned old_type,
void __init update_e820(void) void __init update_e820(void)
{ {
int nr_map; u32 nr_map;
nr_map = e820.nr_map; nr_map = e820.nr_map;
if (sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &nr_map)) if (sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &nr_map))
...@@ -563,7 +563,7 @@ void __init update_e820(void) ...@@ -563,7 +563,7 @@ void __init update_e820(void)
} }
static void __init update_e820_saved(void) static void __init update_e820_saved(void)
{ {
int nr_map; u32 nr_map;
nr_map = e820_saved.nr_map; nr_map = e820_saved.nr_map;
if (sanitize_e820_map(e820_saved.map, ARRAY_SIZE(e820_saved.map), &nr_map)) if (sanitize_e820_map(e820_saved.map, ARRAY_SIZE(e820_saved.map), &nr_map))
...@@ -1303,7 +1303,7 @@ early_param("memmap", parse_memmap_opt); ...@@ -1303,7 +1303,7 @@ early_param("memmap", parse_memmap_opt);
void __init finish_e820_parsing(void) void __init finish_e820_parsing(void)
{ {
if (userdef) { if (userdef) {
int nr = e820.nr_map; u32 nr = e820.nr_map;
if (sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &nr) < 0) if (sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &nr) < 0)
early_panic("Invalid user supplied memory map"); early_panic("Invalid user supplied memory map");
...@@ -1386,7 +1386,7 @@ void __init e820_reserve_resources_late(void) ...@@ -1386,7 +1386,7 @@ void __init e820_reserve_resources_late(void)
char *__init default_machine_specific_memory_setup(void) char *__init default_machine_specific_memory_setup(void)
{ {
char *who = "BIOS-e820"; char *who = "BIOS-e820";
int new_nr; u32 new_nr;
/* /*
* Try to copy the BIOS-supplied E820-map. * Try to copy the BIOS-supplied E820-map.
* *
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册