speedtch usbatm.c,1.68,1.69

Duncan Sands duncan at infradead.org
Thu Oct 26 08:55:34 EDT 2006


Update of /home/cvs/speedtch
In directory phoenix.infradead.org:/tmp/cvs-serv22332

Modified Files:
	usbatm.c 
Log Message:
Use BUILD_BUG_ON to fail compilation if the module can't possibly work.


Index: usbatm.c
===================================================================
RCS file: /home/cvs/speedtch/usbatm.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- usbatm.c	11 Oct 2006 07:51:34 -0000	1.68
+++ usbatm.c	26 Oct 2006 12:55:31 -0000	1.69
@@ -1332,10 +1332,7 @@
 {
 	dbg("%s: driver version %s", __func__, DRIVER_VERSION);
 
-	if (sizeof(struct usbatm_control) > sizeof(((struct sk_buff *) 0)->cb)) {
-		printk(KERN_ERR "%s unusable with this kernel!\n", usbatm_driver_name);
-		return -EIO;
-	}
+	BUILD_BUG_ON(sizeof(struct usbatm_control) > sizeof(((struct sk_buff *) 0)->cb));
 
 	if ((num_rcv_urbs > UDSL_MAX_RCV_URBS)
 	    || (num_snd_urbs > UDSL_MAX_SND_URBS)




More information about the Usbatm-commits mailing list