public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] if(foo) BUG() -> BUG_ON(foo) for include/rxrpc/
@ 2003-09-24 10:33 Rolf Eike Beer
  2003-09-24 10:34 ` [PATCH] if(foo) BUG() -> BUG_ON(foo) for include/net/ Rolf Eike Beer
  0 siblings, 1 reply; 5+ messages in thread
From: Rolf Eike Beer @ 2003-09-24 10:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: Linus Torvalds

Hi again,

some cosmetic changes. Some more will follow as replies to this one.

Eike

diff -aur linux-2.6.0-test5-bk6/include/rxrpc/call.h linux-2.6.0-test5-bk6-caliban/include/rxrpc/call.h
--- linux-2.6.0-test5-bk6/include/rxrpc/call.h	2003-09-11 10:18:33.000000000 +0200
+++ linux-2.6.0-test5-bk6-caliban/include/rxrpc/call.h	2003-09-11 10:26:39.000000000 +0200
@@ -187,8 +187,7 @@
 
 static inline void rxrpc_get_call(struct rxrpc_call *call)
 {
-	if (atomic_read(&call->usage)<=0)
-		BUG();
+	BUG_ON(atomic_read(&call->usage)<=0);
 	atomic_inc(&call->usage);
 	/*printk("rxrpc_get_call(%p{u=%d})\n",(C),atomic_read(&(C)->usage));*/
 }
diff -aur linux-2.6.0-test5-bk6/include/rxrpc/connection.h linux-2.6.0-test5-bk6-caliban/include/rxrpc/connection.h
--- linux-2.6.0-test5-bk6/include/rxrpc/connection.h	2003-09-11 10:18:33.000000000 +0200
+++ linux-2.6.0-test5-bk6-caliban/include/rxrpc/connection.h	2003-09-11 10:26:39.000000000 +0200
@@ -67,8 +67,7 @@
 
 static inline void rxrpc_get_connection(struct rxrpc_connection *conn)
 {
-	if (atomic_read(&conn->usage)<0)
-		BUG();
+	BUG_ON(atomic_read(&conn->usage)<0);
 	atomic_inc(&conn->usage);
 	//printk("rxrpc_get_conn(%p{u=%d})\n",conn,atomic_read(&conn->usage));
 }
diff -aur linux-2.6.0-test5-bk6/include/rxrpc/message.h linux-2.6.0-test5-bk6-caliban/include/rxrpc/message.h
--- linux-2.6.0-test5-bk6/include/rxrpc/message.h	2003-09-11 10:18:33.000000000 +0200
+++ linux-2.6.0-test5-bk6-caliban/include/rxrpc/message.h	2003-09-11 10:26:39.000000000 +0200
@@ -53,8 +53,7 @@
 extern void __rxrpc_put_message(struct rxrpc_message *msg);
 static inline void rxrpc_put_message(struct rxrpc_message *msg)
 {
-	if (atomic_read(&msg->usage)<=0)
-		BUG();
+	BUG_ON(atomic_read(&msg->usage)<=0);
 	if (atomic_dec_and_test(&msg->usage))
 		__rxrpc_put_message(msg);
 }
diff -aur linux-2.6.0-test5-bk6/include/rxrpc/peer.h linux-2.6.0-test5-bk6-caliban/include/rxrpc/peer.h
--- linux-2.6.0-test5-bk6/include/rxrpc/peer.h	2003-09-11 10:18:33.000000000 +0200
+++ linux-2.6.0-test5-bk6-caliban/include/rxrpc/peer.h	2003-09-11 10:26:39.000000000 +0200
@@ -72,8 +72,7 @@
 
 static inline void rxrpc_get_peer(struct rxrpc_peer *peer)
 {
-	if (atomic_read(&peer->usage)<0)
-		BUG();
+	BUG_ON(atomic_read(&peer->usage)<0);
 	atomic_inc(&peer->usage);
 	//printk("rxrpc_get_peer(%p{u=%d})\n",peer,atomic_read(&peer->usage));
 }
diff -aur linux-2.6.0-test5-bk6/include/rxrpc/transport.h linux-2.6.0-test5-bk6-caliban/include/rxrpc/transport.h
--- linux-2.6.0-test5-bk6/include/rxrpc/transport.h	2003-09-11 10:18:33.000000000 +0200
+++ linux-2.6.0-test5-bk6-caliban/include/rxrpc/transport.h	2003-09-11 10:27:28.000000000 +0200
@@ -85,8 +85,7 @@
 
 static inline void rxrpc_get_transport(struct rxrpc_transport *trans)
 {
-	if (atomic_read(&trans->usage) <= 0)
-		BUG();
+	BUG_ON(atomic_read(&trans->usage) <= 0);
 	atomic_inc(&trans->usage);
 	//printk("rxrpc_get_transport(%p{u=%d})\n",
 	//       trans, atomic_read(&trans->usage));

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-10-03 22:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-24 10:33 [PATCH] if(foo) BUG() -> BUG_ON(foo) for include/rxrpc/ Rolf Eike Beer
2003-09-24 10:34 ` [PATCH] if(foo) BUG() -> BUG_ON(foo) for include/net/ Rolf Eike Beer
2003-09-24 10:36   ` [PATCH] if(foo) BUG() -> BUG_ON(foo) for include/linux/ Rolf Eike Beer
2003-09-24 10:52     ` [PATCH] if(foo) BUG() -> BUG_ON(foo) for include/arch/ Rolf Eike Beer
2003-10-03 22:11       ` Randy.Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox