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:
@@ -580,10 +580,10 @@ int __init pmac_nvram_init(void)
|
||||
/* Try to obtain an address */
|
||||
if (of_address_to_resource(dp, 0, &r1) == 0) {
|
||||
nvram_naddrs = 1;
|
||||
s1 = (r1.end - r1.start) + 1;
|
||||
s1 = resource_size(&r1);
|
||||
if (of_address_to_resource(dp, 1, &r2) == 0) {
|
||||
nvram_naddrs = 2;
|
||||
s2 = (r2.end - r2.start) + 1;
|
||||
s2 = resource_size(&r2);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user