[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20080210211203.GD1754@martell.zuzino.mipt.ru>
Date: Mon, 11 Feb 2008 00:12:03 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: Julia Lawall <julia@...u.dk>
Cc: gregkh@...e.de, linux-usb-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 7/8] drivers/usb: Use FIELD_SIZEOF
On Sun, Feb 10, 2008 at 09:15:09PM +0100, Julia Lawall wrote:
> --- a/drivers/usb/atm/usbatm.c
> +++ b/drivers/usb/atm/usbatm.c
> @@ -1349,7 +1349,7 @@ static int __init usbatm_usb_init(void)
> {
> dbg("%s: driver version %s", __func__, DRIVER_VERSION);
>
> - if (sizeof(struct usbatm_control) > sizeof(((struct sk_buff *) 0)->cb)) {
> + if (sizeof(struct usbatm_control) > FIELD_SIZEOF(struct sk_buff, cb)) {
NAK. Driver should BUILD_BUG_ON instead.
> printk(KERN_ERR "%s unusable with this kernel!\n", usbatm_driver_name);
> return -EIO;
> }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists