[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090714225320.GA10277@fluff.org.uk>
Date: Tue, 14 Jul 2009 23:53:20 +0100
From: Ben Dooks <ben-linux@...ff.org>
To: Julia Lawall <julia@...u.dk>
Cc: linux-i2c@...r.kernel.org, linus.walleij@...ricsson.com,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
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@...u.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@...u.dk>
I'll class these as fixes and have applied them to my
tree for linus.
--
Ben (ben@...ff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists