projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e4011e
)
drivers/net/usb/usbnet.c: Use FIELD_SIZEOF macro in usbnet_init() function.
author
Thiago Farina
<tfransosi@gmail.com>
Mon, 18 Apr 2011 00:49:21 +0000
(17:49 -0700)
committer
David S. Miller
<davem@davemloft.net>
Mon, 18 Apr 2011 00:49:21 +0000
(17:49 -0700)
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/usbnet.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/usb/usbnet.c
b/drivers/net/usb/usbnet.c
index 069c1cf0fdf73675dbb865b27ee4d673bd773840..7bc9852bd57c136bbd8a9d1c36e665519bc6a4c4 100644
(file)
--- 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;