Tag: 86855b0c1fd75338c67cabbf85d64d033612c47b

hwmon: Use resource_size

Author: Julia Lawall <julia@diku.dk> 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/) // @@ struct resource *res; @@ – (res->end – res->start) + 1 + resource_size(res) // Signed-off-by: Julia Lawall Signed-off-by: Jean Delvare — drivers/hwmon/pc87427.c …

Continue reading