]> err.no Git - linux-2.6/commit
[POWERPC] Use FIELD_SIZEOF in drivers/block/viodasd.c
authorJulia Lawall <julia@diku.dk>
Fri, 28 Mar 2008 21:21:08 +0000 (08:21 +1100)
committerPaul Mackerras <paulus@samba.org>
Tue, 1 Apr 2008 09:43:10 +0000 (20:43 +1100)
commitea6728c11f3afa15a9c7c50a6c9ae061fe5a9d00
tree779deb5e7f8495174919fabaa86ed54f5b1fc979
parent1d18a602e9116dc89da6750dcbda44bb1eb82b8e
[POWERPC] Use FIELD_SIZEOF in drivers/block/viodasd.c

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@diku.dk>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
drivers/block/viodasd.c