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