mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] drivers/net/usb/usbnet.c: Use FIELD_SIZEOF macro in usbnet_init() function.
@ 2011-04-17 22:46 Thiago Farina
  2011-04-18  0:49 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Thiago Farina @ 2011-04-17 22:46 UTC (permalink / raw)
  To: linux-kernel
  Cc: David Brownell, Greg Kroah-Hartman, netdev, linux-usb, Thiago Farina

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
---
 drivers/net/usb/usbnet.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 069c1cf..7bc9852 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;
-- 
1.7.5.rc2.4.g4d8b3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] drivers/net/usb/usbnet.c: Use FIELD_SIZEOF macro in usbnet_init() function.
  2011-04-17 22:46 [PATCH 1/1] drivers/net/usb/usbnet.c: Use FIELD_SIZEOF macro in usbnet_init() function Thiago Farina
@ 2011-04-18  0:49 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-04-18  0:49 UTC (permalink / raw)
  To: tfransosi; +Cc: linux-kernel, dbrownell, gregkh, netdev, linux-usb

From: Thiago Farina <tfransosi@gmail.com>
Date: Sun, 17 Apr 2011 19:46:04 -0300

> Signed-off-by: Thiago Farina <tfransosi@gmail.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-04-18  0:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-17 22:46 [PATCH 1/1] drivers/net/usb/usbnet.c: Use FIELD_SIZEOF macro in usbnet_init() function Thiago Farina
2011-04-18  0:49 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®