aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2008-02-11 12:25:40 -0500
committerJeff Garzik <jeff@garzik.org>2008-02-11 14:51:40 -0500
commit030ed68bf063e99cea6371d1fb771a870cab1c1d (patch)
tree4fb88f6128c719acca52c348f8d7eb5968328e67 /drivers
parent9dde447a09ec8fc0ba8375a16fe6bed2470f0d14 (diff)
replace code with FIELD_SIZEOF
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/e1000/e1000_ethtool.c2
-rw-r--r--drivers/net/igb/igb_ethtool.c2
-rw-r--r--drivers/net/ixgb/ixgb_ethtool.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index d876787ce336..85e66f4c7886 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -50,7 +50,7 @@ struct e1000_stats {
50 int stat_offset; 50 int stat_offset;
51}; 51};
52 52
53#define E1000_STAT(m) sizeof(((struct e1000_adapter *)0)->m), \ 53#define E1000_STAT(m) FIELD_SIZEOF(struct e1000_adapter, m), \
54 offsetof(struct e1000_adapter, m) 54 offsetof(struct e1000_adapter, m)
55static const struct e1000_stats e1000_gstrings_stats[] = { 55static const struct e1000_stats e1000_gstrings_stats[] = {
56 { "rx_packets", E1000_STAT(stats.gprc) }, 56 { "rx_packets", E1000_STAT(stats.gprc) },
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
index f69721e4eaa1..0447f9bcd27a 100644
--- a/drivers/net/igb/igb_ethtool.c
+++ b/drivers/net/igb/igb_ethtool.c
@@ -43,7 +43,7 @@ struct igb_stats {
43 int stat_offset; 43 int stat_offset;
44}; 44};
45 45
46#define IGB_STAT(m) sizeof(((struct igb_adapter *)0)->m), \ 46#define IGB_STAT(m) FIELD_SIZEOF(struct igb_adapter, m), \
47 offsetof(struct igb_adapter, m) 47 offsetof(struct igb_adapter, m)
48static const struct igb_stats igb_gstrings_stats[] = { 48static const struct igb_stats igb_gstrings_stats[] = {
49 { "rx_packets", IGB_STAT(stats.gprc) }, 49 { "rx_packets", IGB_STAT(stats.gprc) },
diff --git a/drivers/net/ixgb/ixgb_ethtool.c b/drivers/net/ixgb/ixgb_ethtool.c
index a267dd862520..53a9fd086f96 100644
--- a/drivers/net/ixgb/ixgb_ethtool.c
+++ b/drivers/net/ixgb/ixgb_ethtool.c
@@ -49,7 +49,7 @@ struct ixgb_stats {
49 int stat_offset; 49 int stat_offset;
50}; 50};
51 51
52#define IXGB_STAT(m) sizeof(((struct ixgb_adapter *)0)->m), \ 52#define IXGB_STAT(m) FIELD_SIZEOF(struct ixgb_adapter, m), \
53 offsetof(struct ixgb_adapter, m) 53 offsetof(struct ixgb_adapter, m)
54static struct ixgb_stats ixgb_gstrings_stats[] = { 54static struct ixgb_stats ixgb_gstrings_stats[] = {
55 {"rx_packets", IXGB_STAT(net_stats.rx_packets)}, 55 {"rx_packets", IXGB_STAT(net_stats.rx_packets)},