]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
IO resources, x86: ioremap sanity check to catch mapping requests exceeding, fix
authorIngo Molnar <mingo@elte.hu>
Fri, 26 Sep 2008 08:10:12 +0000 (10:10 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 26 Sep 2008 08:10:12 +0000 (10:10 +0200)
fix this build error:

 kernel/resource.c: In function 'iomem_map_sanity_check':
 kernel/resource.c:842: error: implicit declaration of function 'r_next'
 kernel/resource.c:842: warning: assignment makes pointer from integer without a cast

r_next() was only available if CONFIG_PROCFS was enabled.

and fix this build warning:

 kernel/resource.c:855: warning: format '%llx' expects type 'long long unsigned int', but argument 2 has type 'resource_size_t'
 kernel/resource.c:855: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'long unsigned int'
 kernel/resource.c:855: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t'
 kernel/resource.c:855: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'resource_size_t'

resource_t can be 32 bits.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/resource.c

index 1d003a50ee17a1bd6291ba3cd9472ecbeb95ae27..7797dae85b50b64e30d85c754ec0bc7bf9b411aa 100644 (file)
@@ -38,10 +38,6 @@ EXPORT_SYMBOL(iomem_resource);
 
 static DEFINE_RWLOCK(resource_lock);
 
-#ifdef CONFIG_PROC_FS
-
-enum { MAX_IORES_LEVEL = 5 };
-
 static void *r_next(struct seq_file *m, void *v, loff_t *pos)
 {
        struct resource *p = v;
@@ -53,6 +49,10 @@ static void *r_next(struct seq_file *m, void *v, loff_t *pos)
        return p->sibling;
 }
 
+#ifdef CONFIG_PROC_FS
+
+enum { MAX_IORES_LEVEL = 5 };
+
 static void *r_start(struct seq_file *m, loff_t *pos)
        __acquires(resource_lock)
 {
@@ -852,7 +852,11 @@ int iomem_map_sanity_check(resource_size_t addr, unsigned long size)
                        continue;
                printk(KERN_WARNING "resource map sanity check conflict: "
                       "0x%llx 0x%llx 0x%llx 0x%llx %s\n",
-                      addr, addr + size - 1, p->start, p->end, p->name);
+                      (unsigned long long)addr,
+                      (unsigned long long)(addr + size - 1),
+                      (unsigned long long)p->start,
+                      (unsigned long long)p->end,
+                      p->name);
                err = -1;
                break;
        }