Skip to content

Commit 13eb837

Browse files
author
Ingo Molnar
committed
IO resources, x86: ioremap sanity check to catch mapping requests exceeding, fix
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>
1 parent 379daf6 commit 13eb837

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

‎kernel/resource.c‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ EXPORT_SYMBOL(iomem_resource);
3838

3939
static DEFINE_RWLOCK(resource_lock);
4040

41-
#ifdef CONFIG_PROC_FS
42-
43-
enum { MAX_IORES_LEVEL = 5 };
44-
4541
static void *r_next(struct seq_file *m, void *v, loff_t *pos)
4642
{
4743
struct resource *p = v;
@@ -53,6 +49,10 @@ static void *r_next(struct seq_file *m, void *v, loff_t *pos)
5349
return p->sibling;
5450
}
5551

52+
#ifdef CONFIG_PROC_FS
53+
54+
enum { MAX_IORES_LEVEL = 5 };
55+
5656
static void *r_start(struct seq_file *m, loff_t *pos)
5757
__acquires(resource_lock)
5858
{
@@ -852,7 +852,11 @@ int iomem_map_sanity_check(resource_size_t addr, unsigned long size)
852852
continue;
853853
printk(KERN_WARNING "resource map sanity check conflict: "
854854
"0x%llx 0x%llx 0x%llx 0x%llx %s\n",
855-
addr, addr + size - 1, p->start, p->end, p->name);
855+
(unsigned long long)addr,
856+
(unsigned long long)(addr + size - 1),
857+
(unsigned long long)p->start,
858+
(unsigned long long)p->end,
859+
p->name);
856860
err = -1;
857861
break;
858862
}

0 commit comments

Comments
 (0)