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:
committed by
Jeff Garzik
parent
9dde447a09
commit
030ed68bf0
@ -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) },
|
||||
|
Reference in New Issue
Block a user