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>
This commit is contained in:
@@ -170,7 +170,7 @@ void __init reserve_crashkernel(void)
|
||||
if (crashk_res.end == crashk_res.start)
|
||||
goto disable;
|
||||
|
||||
crash_size = PAGE_ALIGN(crashk_res.end - crashk_res.start + 1);
|
||||
crash_size = PAGE_ALIGN(resource_size(&crashk_res));
|
||||
if (!crashk_res.start) {
|
||||
unsigned long max = memblock_end_of_DRAM() - memory_limit;
|
||||
crashk_res.start = __memblock_alloc_base(crash_size, PAGE_SIZE, max);
|
||||
|
Reference in New Issue
Block a user