diff options
author | Julia Lawall <julia@diku.dk> | 2008-02-10 15:07:59 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-02-26 06:17:03 -0500 |
commit | 4217c7b529af3abea090d875f0ef133ed2d44285 (patch) | |
tree | 2e2e455f4084083028c283a2bd614675a4ca8007 /arch/ppc/8xx_io | |
parent | 445857e0fc16ba3f74e778dd5a8707459c84f933 (diff) |
[POWERPC] Use FIELD_SIZEOF in arch/ppc
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>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc/8xx_io')
-rw-r--r-- | arch/ppc/8xx_io/commproc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c index 9d656de0f0f1..752443df5ecf 100644 --- a/arch/ppc/8xx_io/commproc.c +++ b/arch/ppc/8xx_io/commproc.c | |||
@@ -43,7 +43,7 @@ | |||
43 | ({ \ | 43 | ({ \ |
44 | u32 offset = offsetof(immap_t, member); \ | 44 | u32 offset = offsetof(immap_t, member); \ |
45 | void *addr = ioremap (IMAP_ADDR + offset, \ | 45 | void *addr = ioremap (IMAP_ADDR + offset, \ |
46 | sizeof( ((immap_t*)0)->member)); \ | 46 | FIELD_SIZEOF(immap_t, member)); \ |
47 | addr; \ | 47 | addr; \ |
48 | }) | 48 | }) |
49 | 49 | ||