diff options
author | Joe Perches <joe@perches.com> | 2011-06-09 12:13:32 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-06-10 08:55:36 -0400 |
commit | 28f65c11f2ffb3957259dece647a24f8ad2e241b (patch) | |
tree | 6b7621d09d10df89eedd908d4506fb9f457a909f /arch/avr32/kernel | |
parent | 140a1ef2f91a00e1d25f0878c193abdc25bf6ebe (diff) |
treewide: Convert uses of struct resource to resource_size(ptr)
Several fixes as well where the +1 was missing.
Done via coccinelle scripts like:
@@
struct resource *ptr;
@@
- ptr->end - ptr->start + 1
+ resource_size(ptr)
and some grep and typing.
Mostly uncompiled, no cross-compilers.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'arch/avr32/kernel')
-rw-r--r-- | arch/avr32/kernel/setup.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c index bb0974cce4ac..b4247f478065 100644 --- a/arch/avr32/kernel/setup.c +++ b/arch/avr32/kernel/setup.c | |||
@@ -444,7 +444,7 @@ static unsigned long __init | |||
444 | find_bootmap_pfn(const struct resource *mem) | 444 | find_bootmap_pfn(const struct resource *mem) |
445 | { | 445 | { |
446 | unsigned long bootmap_pages, bootmap_len; | 446 | unsigned long bootmap_pages, bootmap_len; |
447 | unsigned long node_pages = PFN_UP(mem->end - mem->start + 1); | 447 | unsigned long node_pages = PFN_UP(resource_size(mem)); |
448 | unsigned long bootmap_start; | 448 | unsigned long bootmap_start; |
449 | 449 | ||
450 | bootmap_pages = bootmem_bootmap_pages(node_pages); | 450 | bootmap_pages = bootmem_bootmap_pages(node_pages); |
@@ -541,10 +541,10 @@ static void __init setup_bootmem(void) | |||
541 | */ | 541 | */ |
542 | if (res->start >= PFN_PHYS(first_pfn) | 542 | if (res->start >= PFN_PHYS(first_pfn) |
543 | && res->end < PFN_PHYS(max_pfn)) | 543 | && res->end < PFN_PHYS(max_pfn)) |
544 | reserve_bootmem_node( | 544 | reserve_bootmem_node(NODE_DATA(node), |
545 | NODE_DATA(node), res->start, | 545 | res->start, |
546 | res->end - res->start + 1, | 546 | resource_size(res), |
547 | BOOTMEM_DEFAULT); | 547 | BOOTMEM_DEFAULT); |
548 | } | 548 | } |
549 | 549 | ||
550 | node_set_online(node); | 550 | node_set_online(node); |