i2c: 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:
Ben Dooks <ben-linux@fluff.org>
Showing
- drivers/i2c/busses/i2c-davinci.c 3 additions, 3 deletionsdrivers/i2c/busses/i2c-davinci.c
- drivers/i2c/busses/i2c-omap.c 3 additions, 3 deletionsdrivers/i2c/busses/i2c-omap.c
- drivers/i2c/busses/i2c-sh_mobile.c 1 addition, 1 deletiondrivers/i2c/busses/i2c-sh_mobile.c
- drivers/i2c/busses/i2c-simtec.c 1 addition, 1 deletiondrivers/i2c/busses/i2c-simtec.c
Loading
Please register or sign in to comment