diff options
author | Julia Lawall <julia@diku.dk> | 2009-09-24 00:57:26 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-24 16:21:04 +0200 |
commit | 30a61fff3a2b19506c66ea81fecb6a7747af3d47 (patch) | |
tree | 541f2337616caa095e517af0d4a0549a174818bd /kernel | |
parent | edac: mpc85xx add mpc83xx support (diff) | |
download | linux-30a61fff3a2b19506c66ea81fecb6a7747af3d47.tar.xz linux-30a61fff3a2b19506c66ea81fecb6a7747af3d47.zip |
edac: fix resource size calculation
Use the function resource_size, which reduces the chance of introducing
off-by-one errors in calculating the resource size.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@@
struct resource *res;
@@
- (res->end - res->start) + 1
+ resource_size(res)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions