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:
@@ -135,7 +135,7 @@ static int iodyn_find_io(struct pcmcia_socket *s, unsigned int attr,
|
||||
try = res->end + 1;
|
||||
if ((*base == 0) || (*base == try)) {
|
||||
if (adjust_resource(s->io[i].res, res->start,
|
||||
res->end - res->start + num + 1))
|
||||
resource_size(res) + num))
|
||||
continue;
|
||||
*base = try;
|
||||
s->io[i].InUse += num;
|
||||
@@ -147,8 +147,8 @@ static int iodyn_find_io(struct pcmcia_socket *s, unsigned int attr,
|
||||
try = res->start - num;
|
||||
if ((*base == 0) || (*base == try)) {
|
||||
if (adjust_resource(s->io[i].res,
|
||||
res->start - num,
|
||||
res->end - res->start + num + 1))
|
||||
res->start - num,
|
||||
resource_size(res) + num))
|
||||
continue;
|
||||
*base = try;
|
||||
s->io[i].InUse += num;
|
||||
|
Reference in New Issue
Block a user