aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2008-03-04 18:19:19 -0500
committerJeff Garzik <jeff@garzik.org>2008-03-26 00:19:41 -0400
commit7a6d84c1b26fd8a1deb28a4bbed672959f7f26ae (patch)
treedbe209b8dee48a7c1aaff213300ed33078add94d
parentef11291bcd5f963c72e7ba5952be3e3c97463d2c (diff)
drivers/net/mv643xx_eth.c: Use FIELD_SIZEOF
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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/net/mv643xx_eth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 771139e283af..d65cadef4d22 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -3156,7 +3156,7 @@ struct mv643xx_stats {
3156 int stat_offset; 3156 int stat_offset;
3157}; 3157};
3158 3158
3159#define MV643XX_STAT(m) sizeof(((struct mv643xx_private *)0)->m), \ 3159#define MV643XX_STAT(m) FIELD_SIZEOF(struct mv643xx_private, m), \
3160 offsetof(struct mv643xx_private, m) 3160 offsetof(struct mv643xx_private, m)
3161 3161
3162static const struct mv643xx_stats mv643xx_gstrings_stats[] = { 3162static const struct mv643xx_stats mv643xx_gstrings_stats[] = {