aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/machine_kexec.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-06-09 12:13:32 -0400
committerJiri Kosina <jkosina@suse.cz>2011-06-10 08:55:36 -0400
commit28f65c11f2ffb3957259dece647a24f8ad2e241b (patch)
tree6b7621d09d10df89eedd908d4506fb9f457a909f /arch/powerpc/kernel/machine_kexec.c
parent140a1ef2f91a00e1d25f0878c193abdc25bf6ebe (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/powerpc/kernel/machine_kexec.c')
-rw-r--r--arch/powerpc/kernel/machine_kexec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c
index 7ee50f0547cb..6658a1589955 100644
--- a/arch/powerpc/kernel/machine_kexec.c
+++ b/arch/powerpc/kernel/machine_kexec.c
@@ -126,7 +126,7 @@ void __init reserve_crashkernel(void)
126 /* We might have got these values via the command line or the 126 /* We might have got these values via the command line or the
127 * device tree, either way sanitise them now. */ 127 * device tree, either way sanitise them now. */
128 128
129 crash_size = crashk_res.end - crashk_res.start + 1; 129 crash_size = resource_size(&crashk_res);
130 130
131#ifndef CONFIG_RELOCATABLE 131#ifndef CONFIG_RELOCATABLE
132 if (crashk_res.start != KDUMP_KERNELBASE) 132 if (crashk_res.start != KDUMP_KERNELBASE)
@@ -222,7 +222,7 @@ static void __init export_crashk_values(struct device_node *node)
222 222
223 if (crashk_res.start != 0) { 223 if (crashk_res.start != 0) {
224 prom_add_property(node, &crashk_base_prop); 224 prom_add_property(node, &crashk_base_prop);
225 crashk_size = crashk_res.end - crashk_res.start + 1; 225 crashk_size = resource_size(&crashk_res);
226 prom_add_property(node, &crashk_size_prop); 226 prom_add_property(node, &crashk_size_prop);
227 } 227 }
228} 228}