Skip to content

Commit

Permalink
USB: drivers/usb/net/*: use BUILD_BUG_ON
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Alexey Dobriyan authored and Greg Kroah-Hartman committed Oct 17, 2006
1 parent d5477c1 commit f8ac232
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/usb/net/cdc_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ static struct usb_driver cdc_driver = {

static int __init cdc_init(void)
{
BUG_ON((sizeof(((struct usbnet *)0)->data)
BUILD_BUG_ON((sizeof(((struct usbnet *)0)->data)
< sizeof(struct cdc_state)));

return usb_register(&cdc_driver);
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/net/usbnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ EXPORT_SYMBOL_GPL(usbnet_resume);
static int __init usbnet_init(void)
{
/* compiler should optimize this out */
BUG_ON (sizeof (((struct sk_buff *)0)->cb)
BUILD_BUG_ON (sizeof (((struct sk_buff *)0)->cb)
< sizeof (struct skb_data));

random_ether_addr(node_id);
Expand Down

0 comments on commit f8ac232

Please sign in to comment.