Re: [PATCH 7/8] drivers/usb: Use FIELD_SIZEOF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux