]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
replace code with FIELD_SIZEOF
authorJulia Lawall <julia@diku.dk>
Mon, 11 Feb 2008 17:25:40 +0000 (09:25 -0800)
committerJeff Garzik <jeff@garzik.org>
Mon, 11 Feb 2008 19:51:40 +0000 (14:51 -0500)
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/e1000/e1000_ethtool.c
drivers/net/igb/igb_ethtool.c
drivers/net/ixgb/ixgb_ethtool.c

index d876787ce336e51aa76c0d32dd7998ce97b9b538..85e66f4c788690872a766e10973a24d659b4ce28 100644 (file)
@@ -50,7 +50,7 @@ struct e1000_stats {
        int stat_offset;
 };
 
-#define E1000_STAT(m) sizeof(((struct e1000_adapter *)0)->m), \
+#define E1000_STAT(m) FIELD_SIZEOF(struct e1000_adapter, m), \
                      offsetof(struct e1000_adapter, m)
 static const struct e1000_stats e1000_gstrings_stats[] = {
        { "rx_packets", E1000_STAT(stats.gprc) },
index f69721e4eaa15195bd6a0d069b56ae9643e88f00..0447f9bcd27abc5fe588c72cf7220fe66534e8aa 100644 (file)
@@ -43,7 +43,7 @@ struct igb_stats {
        int stat_offset;
 };
 
-#define IGB_STAT(m) sizeof(((struct igb_adapter *)0)->m), \
+#define IGB_STAT(m) FIELD_SIZEOF(struct igb_adapter, m), \
                      offsetof(struct igb_adapter, m)
 static const struct igb_stats igb_gstrings_stats[] = {
        { "rx_packets", IGB_STAT(stats.gprc) },
index a267dd86252072927755fec2d120af904804e0fc..53a9fd086f960cdacd4704ee1d2d68fe0d5d181c 100644 (file)
@@ -49,7 +49,7 @@ struct ixgb_stats {
        int stat_offset;
 };
 
-#define IXGB_STAT(m) sizeof(((struct ixgb_adapter *)0)->m), \
+#define IXGB_STAT(m) FIELD_SIZEOF(struct ixgb_adapter, m), \
                      offsetof(struct ixgb_adapter, m)
 static struct ixgb_stats ixgb_gstrings_stats[] = {
        {"rx_packets", IXGB_STAT(net_stats.rx_packets)},