Skip to content

Commit

Permalink
drivers/net/usb/usbnet.c: Use FIELD_SIZEOF macro in usbnet_init() fun…
Browse files Browse the repository at this point in the history
…ction.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Thiago Farina authored and David S. Miller committed Apr 18, 2011
1 parent 5e4011e commit c582a95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/usb/usbnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c582a95

Please sign in to comment.