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>
This commit is contained in:
Julia Lawall
2008-02-11 09:25:40 -08:00
committed by Jeff Garzik
parent 9dde447a09
commit 030ed68bf0
3 changed files with 3 additions and 3 deletions

View 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)},