Re: [PATCH 2/8] drivers/block: Use FIELD_SIZEOF

From: Stephen Rothwell
Date: Sun Feb 10 2008 - 17:22:42 EST


On Sun, 10 Feb 2008 21:08:49 +0100 (CET) Julia Lawall <julia@xxxxxxx> wrote:
>
> From: Julia Lawall <julia@xxxxxxx>
>
> Robert P.J. Day proposed to use the macro FIELD_SIZEOF in replace of code
> that matches its definition.
>
> The modification was made using the following semantic patch
> (http://www.emn.fr/x-info/coccinelle/)
>
> // <smpl>
> @haskernel@
> @@
>
> #include <linux/kernel.h>
>
> @depends on haskernel@
> type t;
> identifier f;
> @@
>
> - (sizeof(((t*)0)->f))
> + FIELD_SIZEOF(t, f)
>
> @depends on haskernel@
> type t;
> identifier f;
> @@
>
> - sizeof(((t*)0)->f)
> + FIELD_SIZEOF(t, f)
> // </smpl>
>
> Signed-off-by: Julia Lawall <julia@xxxxxxx>

Acked-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>

--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx
http://www.canb.auug.org.au/~sfr/

Attachment: pgp00000.pgp
Description: PGP signature