From: Thiago Farina Date: Mon, 18 Apr 2011 00:49:21 +0000 (-0700) Subject: drivers/net/usb/usbnet.c: Use FIELD_SIZEOF macro in usbnet_init() function. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c582a950b1d7488750831cb4499de071781c7f45;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git drivers/net/usb/usbnet.c: Use FIELD_SIZEOF macro in usbnet_init() function. Signed-off-by: Thiago Farina Signed-off-by: David S. Miller --- diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 069c1cf0fdf7..7bc9852bd57c 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1529,9 +1529,9 @@ EXPORT_SYMBOL_GPL(usbnet_resume); static int __init usbnet_init(void) { - /* compiler should optimize this out */ - BUILD_BUG_ON (sizeof (((struct sk_buff *)0)->cb) - < sizeof (struct skb_data)); + /* Compiler should optimize this out. */ + BUILD_BUG_ON( + FIELD_SIZEOF(struct sk_buff, cb) < sizeof(struct skb_data)); random_ether_addr(node_id); return 0;