Skip to content

Commit

Permalink
powerpc/83xx: use resource_size
Browse files Browse the repository at this point in the history
Use resource_size rather than a verbose computation on
the end and start fields.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

<smpl>
@@ struct resource ptr; @@
- (ptr.end - ptr.start + 1)
+ resource_size(&ptr)
</smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Acked-by: Scott Wood <oss@buserror.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1577900990-8588-6-git-send-email-Julia.Lawall@inria.fr
  • Loading branch information
Julia Lawall authored and Michael Ellerman committed Jan 7, 2020
1 parent 5084ff3 commit bfbe37f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/83xx/km83xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static void quirk_mpc8360e_qe_enet10(void)
return;
}

base = ioremap(res.start, res.end - res.start + 1);
base = ioremap(res.start, resource_size(&res));

/*
* set output delay adjustments to default values according
Expand Down

0 comments on commit bfbe37f

Please sign in to comment.