x86: define e820 entries counter as unsigned int
authorDaniel Kiper <daniel.kiper@oracle.com>
Thu, 25 Sep 2014 10:07:22 +0000 (12:07 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 25 Sep 2014 10:07:22 +0000 (12:07 +0200)
e820 entries counter is inherently an unsigned quantity
so define it as unsigned int.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/e820.c
xen/include/asm-x86/e820.h

index 55fe0d6f1f92b12e31668223cbc8704db3bec1f4..bf84bae63f036b6409d943e40f344bfc8e248016 100644 (file)
@@ -89,9 +89,9 @@ static void __init add_memory_region(unsigned long long start,
     }
 } /* add_memory_region */
 
-static void __init print_e820_memory_map(struct e820entry *map, int entries)
+static void __init print_e820_memory_map(struct e820entry *map, unsigned int entries)
 {
-    int i;
+    unsigned int i;
 
     for (i = 0; i < entries; i++) {
         printk(" %016Lx - %016Lx ",
@@ -512,7 +512,7 @@ static void __init reserve_dmi_region(void)
 }
 
 static void __init machine_specific_memory_setup(
-    struct e820entry *raw, int *raw_nr)
+    struct e820entry *raw, unsigned int *raw_nr)
 {
     unsigned long mpt_limit, ro_mpt_limit;
     uint64_t top_of_ram, size;
@@ -695,7 +695,7 @@ int __init reserve_e820_ram(struct e820map *e820, uint64_t s, uint64_t e)
 }
 
 unsigned long __init init_e820(
-    const char *str, struct e820entry *raw, int *raw_nr)
+    const char *str, struct e820entry *raw, unsigned int *raw_nr)
 {
     if ( e820_verbose )
     {
index 71a804c21624d6f295d5285fae43d0a7fa27bd73..d9ff4eb55b7e8ae14b7e99db4d1107989b75d649 100644 (file)
@@ -30,12 +30,12 @@ extern int e820_change_range_type(
     uint32_t orig_type, uint32_t new_type);
 extern int e820_add_range(
     struct e820map *, uint64_t s, uint64_t e, uint32_t type);
-extern unsigned long init_e820(const char *, struct e820entry *, int *);
+extern unsigned long init_e820(const char *, struct e820entry *, unsigned int *);
 extern struct e820map e820;
 
 /* These symbols live in the boot trampoline. */
 extern struct e820entry e820map[];
-extern int e820nr;
+extern unsigned int e820nr;
 extern unsigned int lowmem_kb, highmem_kb;
 
 #define e820_raw bootsym(e820map)