Messages in this thread | | | Date | Tue, 14 Jul 2009 23:53:20 +0100 | From | Ben Dooks <> | Subject | Re: [PATCH 5/5] drivers/i2c: Use resource_size |
| |
On Sun, Jul 05, 2009 at 08:37:50AM +0200, Julia Lawall wrote: > From: 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/) > > // <smpl> > @@ > struct resource *res; > @@ > > - (res->end - res->start) + 1 > + resource_size(res) > // </smpl> > > Signed-off-by: Julia Lawall <julia@diku.dk>
I'll class these as fixes and have applied them to my tree for linus.
-- Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
| |