diff options
author | Julia Lawall <julia@diku.dk> | 2009-08-07 01:05:08 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2009-09-11 08:25:58 +0200 |
commit | 041b5eac254107cd3ba60034c38a411531cc64ee (patch) | |
tree | a1abcfd2b97985ca06504c493fda9cd4123307aa /drivers/ide | |
parent | sata_fsl: Defer non-ncq commands when ncq commands active (diff) | |
download | linux-041b5eac254107cd3ba60034c38a411531cc64ee.tar.xz linux-041b5eac254107cd3ba60034c38a411531cc64ee.zip |
drivers/ata: use resource_size
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>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ide')
0 files changed, 0 insertions, 0 deletions