speedtch speedtch.c,1.28,1.29 usb_atm.c,1.4,1.5

Duncan Sands duncan at infradead.org
Wed Oct 6 03:32:02 EDT 2004


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

Modified Files:
	speedtch.c usb_atm.c 
Log Message:
Whitespace change in speedtch.c.
Changed UDSL_ASSERT to fire when argument is false.
Print a warning if an assertion fails even when not debugging.


Index: speedtch.c
===================================================================
RCS file: /home/cvs/speedtch/speedtch.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- speedtch.c	5 Oct 2004 12:25:53 -0000	1.28
+++ speedtch.c	6 Oct 2004 07:31:59 -0000	1.29
@@ -464,7 +464,6 @@
 }
 
 #ifdef USE_FW_LOADER
-
 static void speedtch_upload_firmware(struct speedtch_instance_data *instance,
 				     const struct firmware *fw1,
 				     const struct firmware *fw2)

Index: usb_atm.c
===================================================================
RCS file: /home/cvs/speedtch/usb_atm.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- usb_atm.c	5 Oct 2004 09:43:04 -0000	1.4
+++ usb_atm.c	6 Oct 2004 07:31:59 -0000	1.5
@@ -95,9 +95,9 @@
 #include <linux/usb.h>
 
 #ifdef DEBUG
-#define UDSL_ASSERT(x)	BUG_ON(x)
+#define UDSL_ASSERT(x)	BUG_ON(!(x))
 #else
-#define UDSL_ASSERT(x)
+#define UDSL_ASSERT(x)	warn("failed assertion at line %d", __LINE__)
 #endif
 
 #ifdef VERBOSE_DEBUG
@@ -406,7 +406,7 @@
 		target += ATM_CELL_PAYLOAD - ATM_AAL5_TRAILER;
 
 		--ctrl->num_cells;
-		UDSL_ASSERT(ctrl->num_cells);
+		UDSL_ASSERT(!ctrl->num_cells);
 	}
 
 	memcpy(target, ctrl->aal5_trailer, ATM_AAL5_TRAILER);
@@ -445,7 +445,7 @@
 
 	vdbg("udsl_complete_receive: urb 0x%p, status %d, actual_length %d, filled_cells %u, rcv 0x%p, buf 0x%p", urb, urb->status, urb->actual_length, buf->filled_cells, rcv, buf);
 
-	UDSL_ASSERT(buf->filled_cells > rcv_buf_size);
+	UDSL_ASSERT(buf->filled_cells <= rcv_buf_size);
 
 	/* may not be in_interrupt() */
 	spin_lock_irqsave(&instance->receive_lock, flags);




More information about the Usbatm-commits mailing list