commit | 86855b0c1fd75338c67cabbf85d64d033612c47b | [log] [tgz] |
---|---|---|
author | Julia Lawall <julia@diku.dk> | Tue Sep 15 17:18:13 2009 +0200 |
committer | Jean Delvare <khali@linux-fr.org> | Tue Sep 15 17:18:13 2009 +0200 |
tree | 69b20b9059bc9d317fcb68a77ce988acce8577ef | |
parent | 6055fae8aceee41471edfd1876e5617d16e028fe [diff] |
hwmon: 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> Signed-off-by: Jean Delvare <khali@linux-fr.org>