[openib-general] Re: Re: SDP_CONN_LOCK

Michael S. Tsirkin mst at mellanox.co.il
Wed Feb 23 03:01:43 PST 2005


Quoting r. Libor Michalek <libor at topspin.com>:
> Subject: Re: Re: SDP_CONN_LOCK
> 
> On Sun, Feb 20, 2005 at 02:11:37AM +0200, Michael S. Tsirkin wrote:
> > Quoting r. Libor Michalek <libor at topspin.com>:
> > > 
> > >   And here I would have thought SDP_CONN_HOLD as a macro would have
> > > bugged people more. :)
> >
> > Didn't get that far yet :)
> > 
> > I also wander whether we could get rid of most called to 
> > _CHECK macros, consequently turn lots of functions
> > which cant otherwise fail into void?
> > Given that these checks are disabled upon a compile switch, one wanders
> > how big a debugging aid they are.
> 
>   Yes, I think the _CHECK and EXPECT macros can be gotten rid of. Getting
> rid of _CHECK does have the added benefit of turning a lot of functions
> into void return functions, which in turn can get rid of most of the
> EXPECT macros. I do agree that there are quite a few function that return
> an status which can safely be turned into void functions.
> 
> -Libor
> 

Here's a patch to remove CHECK_NULL's, as a first step.

Signed-off-by: Michael s. Tsirkin <mst at mellanox.co.il>


Index: sdp_kvec.c
===================================================================
--- sdp_kvec.c	(revision 1871)
+++ sdp_kvec.c	(working copy)
@@ -43,8 +43,6 @@
  */
 static int _sdp_iocb_q_cancel_lookup_func(struct sdpc_desc *element, void *arg)
 {
-	SDP_CHECK_NULL(element, -EINVAL);
-
 	return ((SDP_DESC_TYPE_IOCB == element->type) ? 0 : -ERANGE);
 } /* _sdp_iocb_q_cancel_lookup_func */
 
@@ -61,8 +59,6 @@ static int _sdp_iocb_q_cancel_lookup_fun
  */
 static int _sdp_iocb_q_cancel_read_pending(struct sdp_opt *conn, ssize_t error)
 {
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	return sdp_iocb_q_cancel(&conn->r_pend, SDP_IOCB_F_ALL,
 					error);
 } /* _sdp_iocb_q_cancel_read_pending */
@@ -75,8 +71,6 @@ static int _sdp_iocb_q_cancel_read_sourc
 	struct sdpc_iocb *iocb;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	while (NULL != (iocb = (struct sdpc_iocb *) sdp_desc_q_lookup(&conn->r_src,
 								   _sdp_iocb_q_cancel_lookup_func,
 								   NULL))) {
@@ -95,8 +89,6 @@ static int _sdp_iocb_q_cancel_read_sourc
  */
 static int _sdp_iocb_q_cancel_read_snk(struct sdp_opt *conn, ssize_t error)
 {
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	return sdp_iocb_q_cancel(&conn->r_snk, SDP_IOCB_F_ALL, error);
 } /* _sdp_iocb_q_cancel_read_snk */
 
@@ -108,8 +100,6 @@ static int _sdp_iocb_q_cancel_write_pend
 	struct sdpc_iocb *iocb;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	while (NULL !=
 	       (iocb =
 		(struct sdpc_iocb *) sdp_desc_q_lookup(&conn->send_queue,
@@ -130,8 +120,6 @@ static int _sdp_iocb_q_cancel_write_pend
  */
 static int _sdp_iocb_q_cancel_write_source(struct sdp_opt *conn, ssize_t error)
 {
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	return sdp_iocb_q_cancel(&conn->w_src, SDP_IOCB_F_ALL, error);
 } /* _sdp_iocb_q_cancel_write_source */
 
@@ -143,8 +131,6 @@ static int _sdp_iocb_q_cancel_write_snk(
 	struct sdpc_iocb *iocb;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	while (NULL != (iocb = (struct sdpc_iocb *) sdp_desc_q_lookup(&conn->w_snk,
 								   _sdp_iocb_q_cancel_lookup_func,
 								   NULL))) {
@@ -165,8 +151,6 @@ int sdp_iocb_q_cancel_all_read(struct sd
 {
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	result = _sdp_iocb_q_cancel_read_pending(conn, error);
 	SDP_EXPECT(!(0 > result));
 
@@ -186,8 +170,6 @@ int sdp_iocb_q_cancel_all_write(struct s
 {
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	result = _sdp_iocb_q_cancel_write_pending(conn, error);
 	SDP_EXPECT(!(0 > result));
 
@@ -207,8 +189,6 @@ int sdp_iocb_q_cancel_all(struct sdp_opt
 {
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	result = sdp_iocb_q_cancel_all_read(conn, error);
 	SDP_EXPECT(!(0 > result));
 
Index: sdp_write.c
===================================================================
--- sdp_write.c	(revision 1871)
+++ sdp_write.c	(working copy)
@@ -48,8 +48,6 @@ int sdp_event_write(struct sdp_opt *conn
 	int result;
 	int type;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(comp, -EINVAL);
 	/*
 	 * error handling
 	 */
Index: sdp_rcvd.c
===================================================================
--- sdp_rcvd.c	(revision 1871)
+++ sdp_rcvd.c	(working copy)
@@ -42,9 +42,6 @@ static int _sdp_rcvd_disconnect(struct s
 {
 	int result = 0;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	sdp_dbg_ctrl(conn, "Disconnect msg received.");
 
 	switch (conn->state) {
@@ -121,9 +118,6 @@ static int _sdp_rcvd_abort(struct sdp_op
 {
 	int result = 0;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	sdp_dbg_ctrl(conn, "Abort msg received.");
 	/*
 	 * Connection should be in some post DisConn recveived state.
@@ -155,8 +149,6 @@ static int _sdp_rcvd_send_sm(struct sdp_
 	struct sdpc_iocb *iocb;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
 	/*
 	 * 1) Conn is not in source cancel mode. Send active IOCB
 	 *    using buffered mode
@@ -201,9 +193,6 @@ static int _sdp_rcvd_rdma_wr(struct sdp_
 	struct sdpc_iocb *iocb;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	rwch = (struct msg_hdr_rwch *) buff->data;
 	buff->data = buff->data + sizeof(struct msg_hdr_rwch);
 
@@ -265,9 +254,6 @@ static int _sdp_rcvd_rdma_rd(struct sdp_
 	struct sdpc_iocb *iocb;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	rrch = (struct msg_hdr_rrch *) buff->data;
 	buff->data = buff->data + sizeof(struct msg_hdr_rrch);
 
@@ -349,9 +335,6 @@ static int _sdp_rcvd_mode_change(struct 
 	struct msg_hdr_mch *mch;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	mch = (struct msg_hdr_mch *) buff->data;
 	buff->data = buff->data + sizeof(struct msg_hdr_mch);
 
@@ -448,9 +431,6 @@ static int _sdp_rcvd_src_cancel(struct s
 	struct sdpc_advt *advt;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	sdp_dbg_ctrl(conn, "Source Cancel. active <%d> pending <%d> mode <%d>",
 		     sdp_advt_q_size(&conn->src_actv),
 		     sdp_advt_q_size(&conn->src_pend), conn->send_mode);
@@ -544,9 +524,6 @@ static int _sdp_rcvd_snk_cancel(struct s
 	s32 counter;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	sdp_dbg_ctrl(conn, "Sink Cancel. active <%d> mode <%d>",
 		     conn->snk_recv, conn->send_mode);
 	/*
@@ -621,9 +598,6 @@ static int _sdp_rcvd_snk_cancel_ack(stru
 	struct sdpc_iocb *iocb;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	sdp_dbg_ctrl(conn, "Sink Cancel Ack. actv <%d> mode <%d> flag <%08x>",
 		     conn->snk_sent, conn->recv_mode, conn->flags);
 
@@ -663,9 +637,6 @@ static int _sdp_rcvd_resize_buff_ack(str
 	struct msg_hdr_crbh *crbh;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	crbh = (struct msg_hdr_crbh *) buff->data;
 	buff->data = buff->data + sizeof(struct msg_hdr_crbh);
 
@@ -694,9 +665,6 @@ static int _sdp_rcvd_suspend(struct sdp_
 {
 	struct msg_hdr_sch *sch;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	sch = (struct msg_hdr_sch *) buff->data;
 	buff->data = buff->data + sizeof(struct msg_hdr_sch);
 
@@ -707,9 +675,6 @@ static int _sdp_rcvd_suspend(struct sdp_
 
 static int _sdp_rcvd_suspend_ack(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	return 0;
 } /* _sdp_rcvd_suspend_ack */
 
@@ -720,9 +685,6 @@ static int _sdp_rcvd_snk_avail(struct sd
 	struct sdpc_iocb *iocb;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	snkah = (struct msg_hdr_snkah *) buff->data;
 	buff->data = buff->data + sizeof(struct msg_hdr_snkah);
 
@@ -862,9 +824,6 @@ static int _sdp_rcvd_src_avail(struct sd
 	int result;
 	s32 size;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	srcah = (struct msg_hdr_srcah *) buff->data;
 	buff->data = buff->data + sizeof(struct msg_hdr_srcah);
 
@@ -1034,9 +993,6 @@ static int _sdp_rcvd_data(struct sdp_opt
 {
 	int ret_val;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	if (buff->tail == buff->data)
 		return 0;
 	/*
@@ -1080,8 +1036,6 @@ static int _sdp_rcvd_data(struct sdp_opt
  */
 static int _sdp_rcvd_unsupported(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
 	/*
 	 * Since the gateway only initates RDMA's but is never a target, and
 	 * for a few other reasons, there are certain valid SDP messages
@@ -1151,8 +1105,6 @@ int sdp_event_recv(struct sdp_opt *conn,
 	u32 offset;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(comp, -EINVAL);
 	/*
 	 * error handling
 	 */
Index: sdp_inet.c
===================================================================
--- sdp_inet.c	(revision 1871)
+++ sdp_inet.c	(working copy)
@@ -202,8 +202,6 @@ static int _sdp_inet_abort(struct sdp_op
 {
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	conn->send_buf = 0;
 
 	switch (conn->istate) {
@@ -251,8 +249,6 @@ static int _sdp_inet_disconnect(struct s
 {
 	int result = 0;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	switch (conn->istate) {
 	case SDP_SOCK_ST_CONNECT:
 		result = sdp_wall_abort(conn);
@@ -320,9 +316,6 @@ static int _sdp_inet_release(struct sock
 	long timeout;
 	u32  flags;
 
-	SDP_CHECK_NULL(sock, -EINVAL);
-	SDP_CHECK_NULL(sock->file, -EINVAL);
-
 	if (NULL == sock->sk) {
 		sdp_dbg_warn(NULL, "release empty <%d:%d> flags <%08lx>",
 			     sock->type, sock->state, sock->flags);
@@ -465,10 +458,6 @@ static int _sdp_inet_bind(struct socket 
 	u16 bind_port;
 	int result;
 
-	SDP_CHECK_NULL(sock, -EINVAL);
-	SDP_CHECK_NULL(sock->sk, -EINVAL);
-	SDP_CHECK_NULL(uaddr, -EINVAL);
-
 	sk = sock->sk;
 	conn = SDP_GET_CONN(sk);
 
@@ -562,10 +551,6 @@ static int _sdp_inet_connect(struct sock
 	long timeout;
 	int result;
 
-	SDP_CHECK_NULL(sock, -EINVAL);
-	SDP_CHECK_NULL(sock->sk, -EINVAL);
-	SDP_CHECK_NULL(uaddr, -EINVAL);
-
 	sk = sock->sk;
 	conn = SDP_GET_CONN(sk);
 
@@ -732,9 +717,6 @@ static int _sdp_inet_listen(struct socke
 	struct sdp_opt *conn;
 	int result;
 
-	SDP_CHECK_NULL(sock, -EINVAL);
-	SDP_CHECK_NULL(sock->sk, -EINVAL);
-
 	sk = sock->sk;
 	conn = SDP_GET_CONN(sk);
 
@@ -797,10 +779,6 @@ static int _sdp_inet_accept(struct socke
 	int result;
 	long timeout;
 
-	SDP_CHECK_NULL(listen_sock, -EINVAL);
-	SDP_CHECK_NULL(accept_sock, -EINVAL);
-	SDP_CHECK_NULL(listen_sock->sk, -EINVAL);
-
 	listen_sk = listen_sock->sk;
 	listen_conn = SDP_GET_CONN(listen_sk);
 
@@ -955,11 +933,6 @@ static int _sdp_inet_getname(struct sock
 	struct sock *sk;
 	struct sdp_opt *conn;
 
-	SDP_CHECK_NULL(sock, -EINVAL);
-	SDP_CHECK_NULL(sock->sk, -EINVAL);
-	SDP_CHECK_NULL(addr, -EINVAL);
-	SDP_CHECK_NULL(size, -EINVAL);
-
 	sk = sock->sk;
 	conn = SDP_GET_CONN(sk);
 
@@ -997,8 +970,6 @@ static unsigned int _sdp_inet_poll(struc
 	struct sdp_opt *conn;
 	unsigned int mask = 0;
 
-	SDP_CHECK_NULL(sock, 0);
-	SDP_CHECK_NULL(sock->sk, 0);
 	/*
 	 * file and/or wait can be NULL, once poll is asleep and needs to
 	 * recheck the falgs on being woken.
@@ -1090,9 +1061,6 @@ static int _sdp_inet_ioctl(struct socket
 	int result = 0;
 	int value;
 
-	SDP_CHECK_NULL(sock, -EINVAL);
-	SDP_CHECK_NULL(sock->sk, -EINVAL);
-
 	sk = sock->sk;
 	conn = SDP_GET_CONN(sk);
 
@@ -1215,10 +1183,6 @@ static int _sdp_inet_setopt(struct socke
 	int value;
 	int result = 0;
 
-	SDP_CHECK_NULL(sock, -EINVAL);
-	SDP_CHECK_NULL(sock->sk, -EINVAL);
-	SDP_CHECK_NULL(optval, -EINVAL);
-
 	sk = sock->sk;
 	conn = SDP_GET_CONN(sk);
 
@@ -1286,11 +1250,6 @@ static int _sdp_inet_getopt(struct socke
 	int value;
 	int len;
 
-	SDP_CHECK_NULL(sock, -EINVAL);
-	SDP_CHECK_NULL(sock->sk, -EINVAL);
-	SDP_CHECK_NULL(optval, -EINVAL);
-	SDP_CHECK_NULL(optlen, -EINVAL);
-
 	sk = sock->sk;
 	conn = SDP_GET_CONN(sk);
 
@@ -1350,8 +1309,6 @@ static int _sdp_inet_shutdown(struct soc
 	int result = 0;
 	struct sdp_opt *conn;
 
-	SDP_CHECK_NULL(sock, -EINVAL);
-	SDP_CHECK_NULL(sock->sk, -EINVAL);
 	conn = SDP_GET_CONN(sock->sk);
 
 	sdp_dbg_ctrl(conn, "SHUTDOWN: flag <%d>", flag);
@@ -1466,8 +1423,6 @@ static int _sdp_inet_create(struct socke
 {
 	struct sdp_opt *conn;
 
-	SDP_CHECK_NULL(sock, -EINVAL);
-
 	sdp_dbg_ctrl(NULL, "SOCKET: type <%d> proto <%d> state <%u:%08lx>",
 		     sock->type, protocol, sock->state, sock->flags);
 	
Index: sdp_proto.h
===================================================================
--- sdp_proto.h	(revision 1871)
+++ sdp_proto.h	(working copy)
@@ -548,7 +548,6 @@ extern int sdp_debug_level;
 
 #if __SDP_DEBUG_LEVEL < __SDP_DEBUG_CTRL
 #define SDP_EXPECT(expr)
-#define SDP_CHECK_NULL(value, result)
 #else
 #define SDP_EXPECT(expr)                                                 \
 do {                                                                     \
@@ -557,9 +556,6 @@ do {                                    
 		            #expr);                                      \
 	}                                                                \
 } while (0) /* SDP_EXPECT */
-
-#define SDP_CHECK_NULL(value, result) \
-        do { if (NULL == (value)) return (result); } while (0)
 #endif
 
 /*
@@ -573,7 +569,6 @@ static inline int __sdp_inet_write_space
 {
 	int size;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * Allow for more space if Urgent data is being considered
 	 */
@@ -596,8 +591,6 @@ static inline int __sdp_inet_write_space
  */
 static inline int __sdp_inet_writable(struct sdp_opt *conn)
 {
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	if (0 < (SDP_ST_MASK_OPEN & conn->istate))
 		return (__sdp_inet_write_space(conn, 0) <
 			(conn->send_qud / 2)) ? 0 : 1;
@@ -636,8 +629,6 @@ static inline int __sdp_conn_state_dump(
 #ifdef _SDP_CONN_STATE_REC
 	int counter;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	sdp_dbg_init("STATE: Connection <%04x> state:", conn->hashent);
 
 	if (SDP_CONN_ST_INVALID == conn->state_rec.state[0]) {
Index: sdp_read.c
===================================================================
--- sdp_read.c	(revision 1871)
+++ sdp_read.c	(working copy)
@@ -46,8 +46,6 @@ static int _sdp_event_read_advt(struct s
 	struct sdpc_advt *advt;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(comp, -EINVAL);
 	/*
 	 * if this was the last RDMA read for an advertisment, post a notice.
 	 * Might want to post multiple RDMA read completion messages per
@@ -116,8 +114,6 @@ int sdp_event_read(struct sdp_opt *conn,
 	s32 result;
 	s32 type;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(comp, -EINVAL);
 	/*
 	 * error handling
 	 */
Index: sdp_send.c
===================================================================
--- sdp_send.c	(revision 1871)
+++ sdp_send.c	(working copy)
@@ -47,9 +47,6 @@ static int _sdp_send_buff_post(struct sd
 	struct ib_send_wr *bad_wr;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-	SDP_CHECK_NULL(buff->bsdh_hdr, -EINVAL);
 	/*
 	 * write header send buffer.
 	 */
@@ -196,8 +193,6 @@ static int _sdp_send_data_buff_post(stru
 	struct sdpc_advt *advt;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
 	/*
 	 * check state to determine OK to send:
 	 *
@@ -312,8 +307,6 @@ static int _sdp_send_data_buff_snk(struc
 	int result;
 	int zcopy;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
 	/*
 	 * check state to determine OK to send:
 	 *
@@ -453,8 +446,6 @@ static int _sdp_send_data_iocb_snk(struc
 	int result;
 	int zcopy;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(iocb, -EINVAL);
 	/*
 	 * register IOCBs physical memory, we check for previous
 	 * registration, since multiple writes may have been required
@@ -577,8 +568,6 @@ static int _sdp_send_data_iocb_src(struc
 	struct sdpc_buff *buff;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(iocb, -EINVAL);
 	/*
 	 * 1) local source cancel is pending
 	 * 2) sufficient send credits for buffered transmission.
@@ -746,8 +735,6 @@ static int _sdp_send_iocb_buff_write(str
 	unsigned int counter;
 	void  *addr;
 
-	SDP_CHECK_NULL(iocb, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
 	/*
 	 * initialize counter to correct page and offset.
 	 */
@@ -794,9 +781,6 @@ static int _sdp_send_data_iocb_buff(stru
 	int result;
 	int copy;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(iocb, -EINVAL);
-
 	if (0 < conn->src_sent)
 		return ENOBUFS;
 	/*
@@ -868,9 +852,6 @@ static int _sdp_send_data_iocb(struct sd
 {
 	int result = ENOBUFS;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(iocb, -EINVAL);
-
 	if (!(conn->send_cq_size > conn->s_wq_size))
 		goto done;
 	/*
@@ -970,8 +951,6 @@ static int _sdp_send_data_queue_test(str
 {
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(element, -EINVAL);
 	/*
 	 * Notify caller to buffer data:
 	 * 1) Invalid state for transmission
@@ -1003,7 +982,6 @@ static int _sdp_send_data_queue_flush(st
 	struct sdpc_desc *element;
 	int result = 0;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * As long as there is data, try to post buffered data, until a
 	 * non-zero result is generated.
@@ -1046,8 +1024,6 @@ static int _sdp_send_data_queue(struct s
 {
 	int result = 0;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(element, -EINVAL);
 	/*
 	 * If data is being buffered, save and return, send/recv completions
 	 * will flush the queue.
@@ -1098,7 +1074,6 @@ static inline struct sdpc_buff *_sdp_sen
 {
 	struct sdpc_buff *buff;
 
-	SDP_CHECK_NULL(conn, NULL);
 	/*
 	 * If there is no available buffer get a new one.
 	 */
@@ -1128,8 +1103,6 @@ static inline int _sdp_send_data_buff_pu
 	int result = 0;
 	int expect;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
 	/*
 	 * See note on send OOB implementation in SendBuffPost.
 	 */
@@ -1185,9 +1158,6 @@ static int _sdp_send_ctrl_buff_test(stru
 {
 	int result = 0;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	if (0 == (SDP_ST_MASK_CTRL_OK & conn->state) ||
 	    !(conn->send_cq_size > conn->s_wq_size) ||
 	    !(0 < conn->r_recv_bf) ||
@@ -1215,7 +1185,6 @@ static int _sdp_send_ctrl_buff_flush(str
 	struct sdpc_desc *element;
 	int result = 0;
 	
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * As long as there are buffers, try to post  until a non-zero
 	 * result is generated. (positive: no space; negative: error)
@@ -1253,8 +1222,6 @@ static int _sdp_send_ctrl_buff_buffered(
 {
 	int result = 0;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
 	/*
 	 * Either post a send, or buffer the packet in the tx queue
 	 */
@@ -1294,7 +1261,6 @@ static int _sdp_send_ctrl_buff(struct sd
 	int result = 0;
 	struct sdpc_buff *buff;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * create the message, which contains just the bsdh header.
 	 * (don't need to worry about header space reservation)
@@ -1349,7 +1315,6 @@ static int _sdp_send_ctrl_disconnect(str
 	int result = 0;
 	struct sdpc_buff *buff;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * create the disconnect message, which contains just the bsdh header.
 	 * (don't need to worry about header space reservation)
@@ -1398,7 +1363,6 @@ int sdp_send_ctrl_disconnect(struct sdp_
 {
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * Only create/post the message if there is no data in the data queue,
 	 * otherwise ignore the call. The flush queue will see to it, that a
@@ -1428,7 +1392,6 @@ int sdp_send_ctrl_disconnect(struct sdp_
  */
 int sdp_send_ctrl_ack(struct sdp_opt *conn)
 {
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * The gratuitous ack is not really and ack, but an update of the
 	 * number of buffers posted for receive. Important when traffic is
@@ -1483,7 +1446,6 @@ int sdp_send_ctrl_snk_cancel_ack(struct 
  */
 int sdp_send_ctrl_abort(struct sdp_opt *conn)
 {
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * send
 	 */
@@ -1499,7 +1461,6 @@ int sdp_send_ctrl_resize_buff_ack(struct
 	struct sdpc_buff *buff;
 	int result = 0;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * create the message, which contains just the bsdh header.
 	 * (don't need to worry about header space reservation)
@@ -1551,7 +1512,6 @@ int sdp_send_ctrl_rdma_rd(struct sdp_opt
 	struct sdpc_buff *buff;
 	int result = 0;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * check size
 	 */
@@ -1621,7 +1581,6 @@ int sdp_send_ctrl_rdma_wr(struct sdp_opt
 	struct sdpc_buff *buff;
 	int result = 0;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * create the message, which contains just the bsdh header.
 	 * (don't need to worry about header space reservation)
@@ -1682,7 +1641,6 @@ int sdp_send_ctrl_snk_avail(struct sdp_o
 	struct sdpc_buff *buff;
 	int result = 0;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * check mode
 	 */
@@ -1746,7 +1704,6 @@ int sdp_send_ctrl_mode_ch(struct sdp_opt
 	struct sdpc_buff *buff;
 	int result = 0;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * validate that the requested mode transition is OK.
 	 */
@@ -1835,8 +1792,6 @@ static int _sdp_write_src_lookup(struct 
 	struct sdpc_iocb *iocb = (struct sdpc_iocb *) element;
 	struct kiocb *req = (struct kiocb *)arg;
 
-	SDP_CHECK_NULL(element, -EINVAL);
-
 	if (SDP_DESC_TYPE_IOCB == element->type && iocb->key == req->ki_key)
 		return 0;
 	else
@@ -1853,8 +1808,6 @@ static int _sdp_inet_write_cancel(struct
 	struct sdpc_iocb *iocb;
 	int result = 0;
 
-	SDP_CHECK_NULL(req, -ERANGE);
-
 	sdp_dbg_ctrl(NULL, "Cancel Write IOCB user <%d> key <%d> flag <%08lx>",
 		     req->ki_users, req->ki_key, req->ki_flags);
 	
@@ -2034,7 +1987,6 @@ int sdp_send_flush(struct sdp_opt *conn)
 {
 	int result = 0;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * keep posting sends as long as there is room for an SDP post.
 	 * Priority goes to control messages, and we need to follow the
@@ -2104,9 +2056,6 @@ int sdp_inet_send(struct kiocb *req,
 	int oob;
 	long timeout = -1;
 
-	SDP_CHECK_NULL(sock, -EINVAL);
-	SDP_CHECK_NULL(sock->sk, -EINVAL);
-	SDP_CHECK_NULL(msg, -EINVAL);
 	/*
 	 * set oob flag.
 	 */
Index: sdp_actv.c
===================================================================
--- sdp_actv.c	(revision 1871)
+++ sdp_actv.c	(working copy)
@@ -48,8 +48,6 @@ static int _sdp_actv_conn_establish(stru
 	struct sock *sk;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	sdp_dbg_ctrl(conn, "active etablish. src <%08x:%04x> dst <%08x:%04x>",
 		     conn->src_addr, conn->src_port, 
 		     conn->dst_addr, conn->dst_port);
@@ -548,7 +546,6 @@ int sdp_cm_connect(struct sdp_opt *conn)
 {
 	int result = 0;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * get the buffer size we'll use for this connection. (and all others)
 	 */
Index: sdp_conn.c
===================================================================
--- sdp_conn.c	(revision 1871)
+++ sdp_conn.c	(working copy)
@@ -81,9 +81,6 @@ int sdp_inet_accept_q_put(struct sdp_opt
 {
 	struct sdp_opt *next_conn;
 
-	SDP_CHECK_NULL(listen_conn, -EINVAL);
-	SDP_CHECK_NULL(accept_conn, -EINVAL);
-
 	if (NULL != listen_conn->parent ||
 	    NULL != accept_conn->parent ||
 	    NULL == listen_conn->accept_next ||
@@ -115,8 +112,6 @@ struct sdp_opt *sdp_inet_accept_q_get(st
 	struct sdp_opt *prev_conn;
 	struct sdp_opt *accept_conn;
 
-	SDP_CHECK_NULL(listen_conn, NULL);
-
 	if (NULL != listen_conn->parent ||
 	    NULL == listen_conn->accept_next ||
 	    NULL == listen_conn->accept_prev ||
@@ -156,8 +151,6 @@ int sdp_inet_accept_q_remove(struct sdp_
 	struct sdp_opt *next_conn;
 	struct sdp_opt *prev_conn;
 
-	SDP_CHECK_NULL(accept_conn, -EINVAL);
-
 	if (NULL == accept_conn->parent)
 		return -EFAULT;
 	/*
@@ -192,8 +185,6 @@ int sdp_inet_listen_start(struct sdp_opt
 {
 	unsigned long flags;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	if (SDP_SOCK_ST_CLOSED != conn->istate) {
 		sdp_dbg_warn(conn, "Incorrect connection state to listen.");
 		return -EBADFD;
@@ -229,8 +220,6 @@ int sdp_inet_listen_stop(struct sdp_opt 
 	int result;
 	unsigned long flags;
 
-	SDP_CHECK_NULL(listen_conn, -EINVAL);
-
 	if (SDP_SOCK_ST_LISTEN != listen_conn->istate) {
 		sdp_dbg_warn(listen_conn, "Incorrect state to stop listen.");
 		return -EBADFD;
@@ -324,8 +313,6 @@ int sdp_inet_port_get(struct sdp_opt *co
 	static s32 rover = -1;
 	unsigned long flags;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	sk = conn->sk;
 	/*
 	 * lock table
@@ -439,8 +426,6 @@ int sdp_inet_port_put(struct sdp_opt *co
 {
 	unsigned long flags;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	if (NULL == conn->bind_p_next)
 		return -EADDRNOTAVAIL;
 	/*
@@ -471,9 +456,6 @@ int sdp_inet_port_inherit(struct sdp_opt
 	int result;
 	unsigned long flags;
 
-	SDP_CHECK_NULL(child, -EINVAL);
-	SDP_CHECK_NULL(parent, -EINVAL);
-	SDP_CHECK_NULL(parent->bind_p_next, -EINVAL);
 	/*
 	 * lock table
 	 */
@@ -511,8 +493,6 @@ static int _sdp_conn_table_insert(struct
 	int result = -ENOMEM;
 	unsigned long flags;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	if (SDP_DEV_SK_INVALID != conn->hashent)
 		return -ERANGE;
 	/*
@@ -556,7 +536,6 @@ int sdp_conn_table_remove(struct sdp_opt
 	int result = 0;
 	unsigned long flags;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * lock table
 	 */
@@ -931,8 +910,6 @@ void sdp_conn_internal_unlock(struct sdp
  */
 static int _sdp_conn_lock_init(struct sdp_opt *conn)
 {
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	spin_lock_init(&(conn->lock.slock));
 	conn->lock.users = 0;
 	init_waitqueue_head(&(conn->lock.waitq));
@@ -955,7 +932,6 @@ int sdp_conn_alloc_ib(struct sdp_opt *co
 	int                    attr_mask = 0;
 	int                    result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * look up correct HCA and port
 	 */
@@ -1363,9 +1339,6 @@ int sdp_proc_dump_conn_main(char *buffer
 	u64   d_guid;
 	unsigned long flags;
 
-	SDP_CHECK_NULL(buffer, -EINVAL);
-	SDP_CHECK_NULL(end_index, -EINVAL);
-
 	*end_index = 0;
 	/*
 	 * header should only be printed once
@@ -1471,9 +1444,6 @@ int sdp_proc_dump_conn_data(char *buffer
 	int   offset = 0;
 	unsigned long flags;
 
-	SDP_CHECK_NULL(buffer, -EINVAL);
-	SDP_CHECK_NULL(end_index, -EINVAL);
-
 	*end_index = 0;
 	/*
 	 * header should only be printed once
@@ -1570,9 +1540,6 @@ int sdp_proc_dump_conn_rdma(char *buffer
 	int   offset = 0;
 	unsigned long flags;
 
-	SDP_CHECK_NULL(buffer, -EINVAL);
-	SDP_CHECK_NULL(end_index, -EINVAL);
-
 	*end_index = 0;
 	/*
 	 * header should only be printed once
@@ -1652,9 +1619,6 @@ int sdp_proc_dump_conn_sopt(char *buffer
 	int   offset = 0;
 	unsigned long flags;
 
-	SDP_CHECK_NULL(buffer, -EINVAL);
-	SDP_CHECK_NULL(end_index, -EINVAL);
-
 	*end_index = 0;
 	/*
 	 * header should only be printed once
@@ -1715,9 +1679,6 @@ int sdp_proc_dump_device(char *buffer,
 {
 	int offset = 0;
 
-	SDP_CHECK_NULL(buffer, -EINVAL);
-	SDP_CHECK_NULL(end_index, -EINVAL);
-
 	*end_index = 0;
 	/*
 	 * header should only be printed once
Index: sdp_advt.c
===================================================================
--- sdp_advt.c	(revision 1871)
+++ sdp_advt.c	(working copy)
@@ -72,8 +72,6 @@ struct sdpc_advt *sdp_advt_create(void)
  */
 int sdp_advt_destroy(struct sdpc_advt *advt)
 {
-	SDP_CHECK_NULL(advt, -EINVAL);
-
 	if (NULL != advt->next || NULL != advt->prev)
 		return -EACCES;
 	/*
@@ -93,8 +91,6 @@ struct sdpc_advt *sdp_advt_q_get(struct 
 	struct sdpc_advt *next;
 	struct sdpc_advt *prev;
 
-	SDP_CHECK_NULL(table, NULL);
-
 	advt = table->head;
 	if (NULL == advt)
 		return NULL;
@@ -123,8 +119,6 @@ struct sdpc_advt *sdp_advt_q_get(struct 
  */
 struct sdpc_advt *sdp_advt_q_look(struct sdpc_advt_q *table)
 {
-	SDP_CHECK_NULL(table, NULL);
-
 	return table->head;
 } /* sdp_advt_q_look */
 
@@ -136,9 +130,6 @@ int sdp_advt_q_put(struct sdpc_advt_q *t
 	struct sdpc_advt *next;
 	struct sdpc_advt *prev;
 
-	SDP_CHECK_NULL(table, -EINVAL);
-	SDP_CHECK_NULL(advt, -EINVAL);
-
 	if (NULL == table->head) {
 		advt->next = advt;
 		advt->prev = advt;
@@ -164,8 +155,6 @@ int sdp_advt_q_put(struct sdpc_advt_q *t
  */
 int sdp_advt_q_init(struct sdpc_advt_q *table)
 {
-	SDP_CHECK_NULL(table, -EINVAL);
-
 	table->head = NULL;
 	table->size = 0;
 
@@ -180,7 +169,6 @@ int sdp_advt_q_clear(struct sdpc_advt_q 
 	struct sdpc_advt *advt;
 	int result;
 
-	SDP_CHECK_NULL(table, -EINVAL);
 	/*
 	 * drain the table of any objects
 	 */
Index: sdp_recv.c
===================================================================
--- sdp_recv.c	(revision 1871)
+++ sdp_recv.c	(working copy)
@@ -48,7 +48,6 @@ static int _sdp_post_recv_buff(struct sd
 	struct sdpc_buff *buff;
 	s32 result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * get a buffer
 	 */
@@ -123,7 +122,6 @@ static int _sdp_post_rdma_buff(struct sd
 	struct sdpc_buff *buff;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * check queue depth
 	 */
@@ -247,7 +245,6 @@ static int _sdp_post_rdma_iocb_src(struc
 	int result;
 	int zcopy;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * check queue depth
 	 */
@@ -387,7 +384,6 @@ static int _sdp_post_rdma_iocb_snk(struc
 	struct sdpc_iocb *iocb;
 	int result = 0;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * check if sink cancel is pending
 	 */
@@ -486,7 +482,6 @@ static int _sdp_post_rdma(struct sdp_opt
 {
 	int result = 0;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * Since RDMA Reads rely on posting to the Send WQ, stop if
 	 * we're not in an appropriate state. It's possible to queue
@@ -567,7 +562,6 @@ int sdp_recv_flush(struct sdp_opt *conn)
 	int result = 0;
 	int counter;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * verify that the connection is in a posting state
 	 */
@@ -676,8 +670,6 @@ static int _sdp_read_buff_iocb(struct sd
 	void  *data;
 	void  *tail;
 
-	SDP_CHECK_NULL(iocb, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
 	/*
 	 * OOB buffer adjustment. We basically throw away OOB data
 	 * when writing into AIO buffer. We can't split it into it's
@@ -736,8 +728,6 @@ static int _sdp_recv_buff_iocb_active(st
 	struct sdpc_iocb *iocb;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
 	/*
 	 * Get the IOCB, We'll fill with exactly one
 	 */
@@ -787,8 +777,6 @@ static int _sdp_recv_buff_iocb_pending(s
 	struct sdpc_iocb *iocb;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
 	/*
 	 * check the IOCB
 	 */
@@ -848,9 +836,6 @@ int sdp_recv_buff(struct sdp_opt *conn, 
 	int result;
 	int buffered;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	sdp_dbg_data(conn, "RECV BUFF, bytes <%u>",
 		     (unsigned)(buff->tail - buff->data));
 	/*
@@ -947,8 +932,6 @@ static int _sdp_read_src_lookup(struct s
 	struct sdpc_iocb *iocb = (struct sdpc_iocb *) element;
 	struct kiocb *req = (struct kiocb *)arg;
 
-	SDP_CHECK_NULL(element, -EINVAL);
-
 	if (SDP_DESC_TYPE_IOCB == element->type && iocb->key == req->ki_key)
 		return 0;
 	else
@@ -966,8 +949,6 @@ static int _sdp_inet_read_cancel(struct 
 	struct sdpc_iocb *iocb;
 	int result = 0;
 
-	SDP_CHECK_NULL(req, -ERANGE);
-
 	sdp_dbg_ctrl(NULL, "Cancel Read IOCB. user <%d> key <%d> flag <%08lx>",
 		     req->ki_users, req->ki_key, req->ki_flags);
 	
@@ -1095,8 +1076,6 @@ done:
  */
 static int _sdp_inet_recv_urg_test(struct sdpc_buff *buff, void *arg)
 {
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	return ((buff->tail == buff->head) ? 1 : 0);
 } /* _sdp_inet_recv_urg_test */
 
@@ -1108,9 +1087,6 @@ static int _sdp_inet_recv_urg_trav(struc
 	u8 *value = (u8 *) arg;
 	u8 update;
 
-	SDP_CHECK_NULL(buff, -EINVAL);
-	SDP_CHECK_NULL(value, -EINVAL);
-
 	if (0 < (SDP_BUFF_F_OOB_PRES & buff->flags)) {
 		SDP_EXPECT((buff->tail > buff->data));
 
@@ -1141,8 +1117,6 @@ static int _sdp_inet_recv_urg(struct soc
 	int result = 0;
 	u8 value;
 
-	SDP_CHECK_NULL(sk, -EINVAL);
-	SDP_CHECK_NULL(msg, -EINVAL);
 	conn = SDP_GET_CONN(sk);
 
 	if (sock_flag(sk, SOCK_URGINLINE) || 0 == conn->rcv_urg_cnt)
@@ -1232,10 +1206,6 @@ int sdp_inet_recv(struct kiocb  *req,
 	s8 ack = 0;
 	struct sdpc_buff_q peek_queue;
 
-	SDP_CHECK_NULL(sock, -EINVAL);
-	SDP_CHECK_NULL(sock->sk, -EINVAL);
-	SDP_CHECK_NULL(msg, -EINVAL);
-
 	sk = sock->sk;
 	conn = SDP_GET_CONN(sk);
 
Index: sdp_wall.c
===================================================================
--- sdp_wall.c	(revision 1871)
+++ sdp_wall.c	(working copy)
@@ -46,8 +46,6 @@ int sdp_wall_send_close(struct sdp_opt *
 	struct sdpc_buff *buff;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	sdp_dbg_ctrl(conn, "Close send. src <%08x:%04x> dst <%08x:%04x>",
 		     conn->src_addr, conn->src_port, 
 		     conn->dst_addr, conn->dst_port);
@@ -123,8 +121,6 @@ int sdp_wall_send_closing(struct sdp_opt
 {
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	sdp_dbg_ctrl(conn, "Close confirm. src <%08x:%04x> dst <%08x:%04x>",
 		     conn->src_addr, conn->src_port, 
 		     conn->dst_addr, conn->dst_port);
@@ -177,8 +173,6 @@ int sdp_wall_send_abort(struct sdp_opt *
 {
 	int result = 0;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	sdp_dbg_ctrl(conn, "Abort send. src <%08x:%04x> dst <%08x:%04x>",
 		     conn->src_addr, conn->src_port, 
 		     conn->dst_addr, conn->dst_port);
@@ -291,8 +285,6 @@ int sdp_wall_recv_reject(struct sdp_opt 
 {
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	sdp_dbg_ctrl(conn, "Reject recv. src <%08x:%04x> dst <%08x:%04x> <%d>",
 		     conn->src_addr, conn->src_port, 
 		     conn->dst_addr, conn->dst_port, error);
@@ -326,8 +318,6 @@ int sdp_wall_recv_confirm(struct sdp_opt
 	int attr_mask = 0;
 	int result = 0;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	sdp_dbg_ctrl(conn, "Passive Establish src <%08x:%04x> dst <%08x:%04x>",
 		     conn->src_addr, conn->src_port, 
 		     conn->dst_addr, conn->dst_port);
@@ -388,8 +378,6 @@ error:
  */
 int sdp_wall_recv_failed(struct sdp_opt *conn, int error)
 {
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	sdp_dbg_ctrl(conn, "Failed recv. src <%08x:%04x> dst <%08x:%04x> <%d>",
 		     conn->src_addr, conn->src_port, 
 		     conn->dst_addr, conn->dst_port, error);
@@ -425,8 +413,6 @@ int sdp_wall_recv_close(struct sdp_opt *
 {
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	sdp_dbg_ctrl(conn, "Close recv. src <%08x:%04x> dst <%08x:%04x>",
 		     conn->src_addr, conn->src_port, 
 		     conn->dst_addr, conn->dst_port);
@@ -474,8 +460,6 @@ int sdp_wall_recv_closing(struct sdp_opt
 {
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	sdp_dbg_ctrl(conn, "Closing recv. src <%08x:%04x> dst <%08x:%04x>",
 		     conn->src_addr, conn->src_port, 
 		     conn->dst_addr, conn->dst_port);
@@ -512,8 +496,6 @@ int sdp_wall_recv_abort(struct sdp_opt *
 {
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	sdp_dbg_ctrl(conn, "Abort recv. src <%08x:%04x> dst <%08x:%04x>",
 		     conn->src_addr, conn->src_port, 
 		     conn->dst_addr, conn->dst_port);
@@ -559,8 +541,6 @@ int sdp_wall_recv_drop(struct sdp_opt *c
 {
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	sdp_dbg_ctrl(conn, "Drop. src <%08x:%04x> dst <%08x:%04x>",
 		     conn->src_addr, conn->src_port, 
 		     conn->dst_addr, conn->dst_port);
@@ -629,7 +609,6 @@ int sdp_wall_abort(struct sdp_opt *conn)
 {
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * notify both halves of the wall that the connection is being aborted.
 	 */
Index: sdp_proc.c
===================================================================
--- sdp_proc.c	(revision 1871)
+++ sdp_proc.c	(working copy)
@@ -55,8 +55,6 @@ static int _sdp_proc_read_parse(char *pa
 	long end_index = 0;
 	int  size;
 
-	SDP_CHECK_NULL(sub_entry, -EINVAL);
-
 #if 0
 	if (NULL == *start && 0 != offset) {
 		return 0; /* I'm not sure why this always gets 
@@ -138,7 +136,6 @@ int sdp_main_proc_cleanup(void)
 	struct sdpc_proc_ent *sub_entry;
 	int counter;
 
-	SDP_CHECK_NULL(_dir_root, -EINVAL);
 	/*
 	 * first clean-up the frameworks tables
 	 */
Index: sdp_pass.c
===================================================================
--- sdp_pass.c	(revision 1871)
+++ sdp_pass.c	(working copy)
@@ -47,7 +47,6 @@ static int _sdp_cm_accept(struct sdp_opt
 	int result;
 	int expect;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * build listen response headers
 	 */
@@ -191,8 +190,6 @@ static int _sdp_cm_listen_lookup(struct 
 	struct sock *sk;
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	sdp_dbg_ctrl(conn,
 		     "listen match for conn. src <%08x:%04x> dst <%08x:%04x>",
 		     conn->src_addr, conn->src_port, 
Index: sdp_sent.c
===================================================================
--- sdp_sent.c	(revision 1871)
+++ sdp_sent.c	(working copy)
@@ -42,9 +42,6 @@ static int _sdp_sent_disconnect(struct s
 {
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	sdp_dbg_ctrl(conn, "Disconnect message sent.");
 
 	switch (conn->state) {
@@ -122,8 +119,6 @@ static int _sdp_sent_abort(struct sdp_op
 {
 	int result;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
 	/*
 	 * The gateway interface should be in error state, initiate CM
 	 * disconnect.
@@ -140,9 +135,6 @@ static int _sdp_sent_abort(struct sdp_op
 
 static int _sdp_sent_send_sm(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	return 0;
 } /* _sdp_sent_send_sm */
 
@@ -150,9 +142,6 @@ static int _sdp_sent_rdma_wr(struct sdp_
 {
 	struct msg_hdr_rwch *rwch;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	rwch = (struct msg_hdr_rwch *) buff->data;
 	buff->data = buff->data + sizeof(struct msg_hdr_rwch);
 
@@ -165,9 +154,6 @@ static int _sdp_sent_rdma_rd(struct sdp_
 {
 	struct msg_hdr_rrch *rrch;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	rrch = (struct msg_hdr_rrch *) buff->data;
 	buff->data = buff->data + sizeof(struct msg_hdr_rrch);
 
@@ -180,9 +166,6 @@ static int _sdp_sent_mode_change(struct 
 {
 	struct msg_hdr_mch *mch;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	mch = (struct msg_hdr_mch *) buff->data;
 	buff->data = buff->data + sizeof(struct msg_hdr_mch);
 
@@ -193,26 +176,17 @@ static int _sdp_sent_mode_change(struct 
 
 static int _sdp_sent_src_cancel(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	return 0;
 } /* _sdp_sent_src_cancel */
 
 static int _sdp_sent_snk_cancel(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	return 0;
 } /* _sdp_sent_snk_cancel */
 
 static int _sdp_sent_snk_cancel_ack(struct sdp_opt *conn,
 				    struct sdpc_buff *buff)
 {
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	return 0;
 } /* _sdp_sent_snk_cancel_ack */
 
@@ -221,9 +195,6 @@ static int _sdp_sent_resize_buff_ack(str
 {
 	struct msg_hdr_crbah *crbah;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	crbah = (struct msg_hdr_crbah *) buff->data;
 	buff->data = buff->data + sizeof(struct msg_hdr_crbah);
 
@@ -236,9 +207,6 @@ static int _sdp_sent_suspend(struct sdp_
 {
 	struct msg_hdr_sch *sch;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	sch = (struct msg_hdr_sch *) buff->data;
 	buff->data = buff->data + sizeof(struct msg_hdr_sch);
 
@@ -249,9 +217,6 @@ static int _sdp_sent_suspend(struct sdp_
 
 static int _sdp_sent_suspend_ack(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	return 0;
 } /* _sdp_sent_suspend_ack */
 
@@ -259,9 +224,6 @@ static int _sdp_sent_snk_avail(struct sd
 {
 	struct msg_hdr_snkah *snkah;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	snkah = (struct msg_hdr_snkah *) buff->data;
 	buff->data = buff->data + sizeof(struct msg_hdr_snkah);
 
@@ -274,9 +236,6 @@ static int _sdp_sent_src_avail(struct sd
 {
 	struct msg_hdr_srcah *srcah;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	srcah = (struct msg_hdr_srcah *) buff->data;
 	buff->data = buff->data + sizeof(struct msg_hdr_srcah);
 
@@ -292,10 +251,6 @@ static int _sdp_sent_data(struct sdp_opt
 {
 	int result = 0;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(conn->sk, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	conn->send_qud -= buff->data_size;
 
 	return result;
@@ -306,8 +261,6 @@ static int _sdp_sent_data(struct sdp_opt
  */
 static int _sdp_sent_unsupported(struct sdp_opt *conn, struct sdpc_buff *buff)
 {
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
 	/*
 	 * Since the gateway only initates RDMA's but is never a target, and
 	 * for a few other reasons, there are certain valid SDP messages
@@ -378,8 +331,6 @@ int sdp_event_send(struct sdp_opt *conn,
 	struct sdpc_buff *buff;
 	struct sdpc_buff *head = NULL;
 
-	SDP_CHECK_NULL(conn, -EINVAL);
-	SDP_CHECK_NULL(comp, -EINVAL);
 	/*
 	 * error handling
 	 */
Index: sdp_iocb.c
===================================================================
--- sdp_iocb.c	(revision 1871)
+++ sdp_iocb.c	(working copy)
@@ -101,7 +101,6 @@ int sdp_iocb_unlock(struct sdpc_iocb *io
 {
 	int result;
 
-	SDP_CHECK_NULL(iocb, -EINVAL);
 	/*
 	 * check if IOCB is locked.
 	 */
@@ -241,7 +240,6 @@ int sdp_iocb_lock(struct sdpc_iocb *iocb
 	unsigned long addr;
 	size_t        size;
 	
-	SDP_CHECK_NULL(iocb, -EINVAL);
 	/*
 	 * mark IOCB as locked. We do not take a reference on the mm, AIO
 	 * handles this for us.
@@ -422,8 +420,6 @@ int sdp_iocb_register(struct sdpc_iocb *
 {
 	int result;
 
-	SDP_CHECK_NULL(iocb, -EINVAL);
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * register only once.
 	 */
@@ -475,8 +471,6 @@ int sdp_iocb_release(struct sdpc_iocb *i
 {
 	int result;
 
-	SDP_CHECK_NULL(iocb, -EINVAL);
-
 	if (0 == (SDP_IOCB_F_REG & iocb->flags))
 		return 0;
 
@@ -541,8 +535,6 @@ static void _sdp_iocb_complete(void *arg
  */
 int sdp_iocb_complete(struct sdpc_iocb *iocb, ssize_t status)
 {
-	SDP_CHECK_NULL(iocb, -EINVAL);
-
 	iocb->status = status;
 	
 	if (in_atomic() || irqs_disabled()) {
@@ -567,12 +559,6 @@ int sdp_iocb_q_remove(struct sdpc_iocb *
 	struct sdpc_iocb *next;
 	struct sdpc_iocb *prev;
 
-	SDP_CHECK_NULL(iocb, -EINVAL);
-	SDP_CHECK_NULL(iocb->next, -EINVAL);
-	SDP_CHECK_NULL(iocb->prev, -EINVAL);
-	SDP_CHECK_NULL(iocb->table, -EINVAL);
-	SDP_CHECK_NULL(iocb->table->head, -EINVAL);
-
 	table = iocb->table;
 
 	if (iocb->next == iocb && iocb->prev == iocb)
@@ -604,8 +590,6 @@ struct sdpc_iocb *sdp_iocb_q_lookup(stru
 	struct sdpc_iocb *iocb = NULL;
 	int counter;
 
-	SDP_CHECK_NULL(table, NULL);
-
 	for (counter = 0, iocb = table->head; counter < table->size;
 	     counter++, iocb = iocb->next)
 		if (iocb->key == key)
@@ -680,8 +664,6 @@ int sdp_iocb_destroy(struct sdpc_iocb *i
  */
 struct sdpc_iocb *sdp_iocb_q_look(struct sdpc_iocb_q *table)
 {
-	SDP_CHECK_NULL(table, NULL);
-
 	return table->head;
 } /* sdp_iocb_q_look */
 
@@ -694,8 +676,6 @@ static struct sdpc_iocb *_sdp_iocb_q_get
 	struct sdpc_iocb *next;
 	struct sdpc_iocb *prev;
 
-	SDP_CHECK_NULL(table, NULL);
-
 	if (NULL == table->head)
 		return NULL;
 
@@ -734,9 +714,6 @@ static int _sdp_iocb_q_put(struct sdpc_i
 	struct sdpc_iocb *next;
 	struct sdpc_iocb *prev;
 
-	SDP_CHECK_NULL(table, -EINVAL);
-	SDP_CHECK_NULL(iocb, -EINVAL);
-
 	if (NULL == table->head) {
 		iocb->next = iocb;
 		iocb->prev = iocb;
@@ -806,7 +783,6 @@ int sdp_iocb_q_cancel(struct sdpc_iocb_q
 	int result;
 	int total;
 
-	SDP_CHECK_NULL(table, -EINVAL);
 	/*
 	 * loop through IOCBs, completing each one with either a partial data
 	 * result, or a cancelled error.
@@ -839,8 +815,6 @@ int sdp_iocb_q_cancel(struct sdpc_iocb_q
  */
 int sdp_iocb_q_init(struct sdpc_iocb_q *table)
 {
-	SDP_CHECK_NULL(table, -EINVAL);
-
 	table->head = NULL;
 	table->size = 0;
 
@@ -855,7 +829,6 @@ int sdp_iocb_q_clear(struct sdpc_iocb_q 
 	struct sdpc_iocb *iocb;
 	int result;
 
-	SDP_CHECK_NULL(table, -EINVAL);
 	/*
 	 * drain the table of any objects
 	 */
Index: sdp_event.c
===================================================================
--- sdp_event.c	(revision 1871)
+++ sdp_event.c	(working copy)
@@ -45,9 +45,6 @@ int sdp_cq_event_locked(struct ib_wc *co
 {
 	int result = 0;
 
-	SDP_CHECK_NULL(comp, -EINVAL);
-	SDP_CHECK_NULL(conn, -EINVAL);
-
 	if (0 < (SDP_ST_MASK_ERROR & conn->state)) {
 		/*
 		 * Ignore events in error state, connection is being 
Index: sdp_buff.c
===================================================================
--- sdp_buff.c	(revision 1871)
+++ sdp_buff.c	(working copy)
@@ -51,8 +51,6 @@ static inline struct sdpc_buff *_sdp_buf
 {
 	struct sdpc_buff *buff;
 
-	SDP_CHECK_NULL(pool, NULL);
-
 	if (NULL == pool->head)
 		return NULL;
 
@@ -91,9 +89,6 @@ static inline int _sdp_buff_q_put(struct
 				  int fifo)
 {
 	/* fifo: false == tail, true == head */
-	SDP_CHECK_NULL(pool, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	if (NULL != buff->pool)
 		return -EINVAL;
 
@@ -124,8 +119,6 @@ static inline int _sdp_buff_q_put(struct
 static inline struct sdpc_buff *_sdp_buff_q_look(struct sdpc_buff_q *pool,
 						 int fifo)
 {
-	SDP_CHECK_NULL(pool, NULL);
-
 	if (NULL == pool->head || fifo)
 		return pool->head;
 	else
@@ -141,12 +134,6 @@ static inline int _sdp_buff_q_remove(str
 	struct sdpc_buff *prev;
 	struct sdpc_buff *next;
 
-	SDP_CHECK_NULL(pool, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-	SDP_CHECK_NULL(buff->next, -EINVAL);
-	SDP_CHECK_NULL(buff->prev, -EINVAL);
-	SDP_CHECK_NULL(buff->pool, -EINVAL);
-
 	if (pool != buff->pool)
 		return -EINVAL;
 
@@ -179,9 +166,6 @@ int sdp_buff_q_init(struct sdpc_buff_q *
 	int counter;
 	int result;
 
-	SDP_CHECK_NULL(pool, -EINVAL);
-	SDP_CHECK_NULL(main_pool, -EINVAL);
-
 	pool->head = NULL;
 	pool->size = 0;
 
@@ -207,9 +191,6 @@ int sdp_buff_q_remove(struct sdpc_buff *
 	struct sdpc_buff_q *pool;
 	int result;
 
-	SDP_CHECK_NULL(buff, -EINVAL);
-	SDP_CHECK_NULL(buff->pool, -EINVAL);
-
 	pool = buff->pool;
 
 	result = _sdp_buff_q_remove(pool, buff);
@@ -292,7 +273,6 @@ struct sdpc_buff *sdp_buff_q_fetch(struc
 	int result = 0;
 	int counter;
 
-	SDP_CHECK_NULL(pool, NULL);
 	/*
 	 * check to see if there is anything to traverse.
 	 */
@@ -329,8 +309,6 @@ int sdp_buff_q_trav_head(struct sdpc_buf
 	int result = 0;
 	int counter;
 
-	SDP_CHECK_NULL(pool, -EINVAL);
-	SDP_CHECK_NULL(trav_func, -EINVAL);
 	/*
 	 * check to see if there is anything to traverse.
 	 */
@@ -398,8 +376,6 @@ int sdp_buff_q_clear_unmap(struct sdpc_b
 	int result;
 	struct sdpc_buff *buff;
 
-	SDP_CHECK_NULL(pool, -EINVAL);
-
 	while (NULL != (buff = _sdp_buff_q_get(pool, 0, NULL, NULL))) {
 		if (dev)
 			dma_unmap_single(dev, buff->real,
@@ -425,7 +401,6 @@ static int _sdp_buff_pool_release(struct
 {
 	struct sdpc_buff *buff;
 
-	SDP_CHECK_NULL(m_pool, -EINVAL);
 	/*
 	 * Release count buffers.
 	 */
@@ -450,7 +425,6 @@ static int _sdp_buff_pool_release(struct
  */
 static inline int _sdp_buff_pool_release_check(struct sdpc_buff_root *m_pool)
 {
-	SDP_CHECK_NULL(m_pool, -EINVAL);
 	/*
 	 * If there are more then minimum buffers outstanding, free half of
 	 * the available buffers.
@@ -480,7 +454,6 @@ static int _sdp_buff_pool_alloc(struct s
 	int total;
 	int result;
 
-	SDP_CHECK_NULL(m_pool, -EINVAL);
 	/*
 	 * Calculate the total number of buffers.
 	 */
@@ -679,7 +652,6 @@ struct sdpc_buff *sdp_buff_pool_get(void
 	int result;
 	unsigned long flags;
 
-	SDP_CHECK_NULL(main_pool, NULL);
 	/*
 	 * get buffer
 	 */
@@ -732,8 +704,6 @@ int sdp_buff_pool_put(struct sdpc_buff *
 {
 	unsigned long flags;
 
-	SDP_CHECK_NULL(main_pool, -EINVAL);
-
 	if (NULL == buff || NULL != buff->pool)
 		return -EINVAL;
 
@@ -774,9 +744,6 @@ int sdp_buff_pool_put(struct sdpc_buff *
  */
 int sdp_buff_pool_chain_link(struct sdpc_buff *head, struct sdpc_buff *buff)
 {
-	SDP_CHECK_NULL(main_pool, -EINVAL);
-	SDP_CHECK_NULL(buff, -EINVAL);
-
 	buff->data = buff->head;
 	buff->tail = buff->head;
 	buff->pool = &main_pool->pool;
@@ -809,8 +776,6 @@ int sdp_buff_pool_chain_put(struct sdpc_
 	 * a number of buffers are processed in a loop, before being
 	 * returned. (e.g. send completions, recv to userspace.
 	 */
-	SDP_CHECK_NULL(main_pool, -EINVAL);
-
 	if (NULL == buff || !(0 < count))
 		return -EINVAL;
 
@@ -864,7 +829,6 @@ int sdp_proc_dump_buff_pool(char *buffer
 	unsigned long flags;
 	int offset = 0;
 
-	SDP_CHECK_NULL(buffer, -EINVAL);
 	/*
 	 * simple table read, without page boundry handling.
 	 */
Index: sdp_queue.c
===================================================================
--- sdp_queue.c	(revision 1871)
+++ sdp_queue.c	(working copy)
@@ -46,8 +46,6 @@ static struct sdpc_desc *_sdp_desc_q_get
 {
 	struct sdpc_desc *element;
 
-	SDP_CHECK_NULL(table, NULL);
-
 	if (NULL == table->head)
 		return NULL;
 
@@ -86,9 +84,6 @@ static inline int _sdp_desc_q_put(struct
 	/*
 	 * fifo: false == tail, true == head
 	 */
-	SDP_CHECK_NULL(table, -EINVAL);
-	SDP_CHECK_NULL(element, -EINVAL);
-
 	if (NULL != element->table)
 		return -EINVAL;
 
@@ -128,11 +123,6 @@ int sdp_desc_q_remove(struct sdpc_desc *
 	struct sdpc_desc *prev;
 	struct sdpc_desc *next;
 
-	SDP_CHECK_NULL(element, -EINVAL);
-	SDP_CHECK_NULL(element->table, -EINVAL);
-	SDP_CHECK_NULL(element->next, -EINVAL);
-	SDP_CHECK_NULL(element->prev, -EINVAL);
-
 	table = element->table;
 
 	if (element->next == element && element->prev == element)
@@ -169,9 +159,6 @@ struct sdpc_desc *sdp_desc_q_lookup(stru
 	struct sdpc_desc *element;
 	int counter;
 
-	SDP_CHECK_NULL(table, NULL);
-	SDP_CHECK_NULL(lookup, NULL);
-
 	for (counter = 0, element = table->head;
 	     counter < table->size; counter++, element = element->next)
 		if (0 == lookup(element, arg))
@@ -219,8 +206,6 @@ int sdp_desc_q_put_tail(struct sdpc_desc
  */
 struct sdpc_desc *sdp_desc_q_look_head(struct sdpc_desc_q *table)
 {
-	SDP_CHECK_NULL(table, NULL);
-
 	return table->head;
 } /* sdp_desc_q_look_head */
 
@@ -229,8 +214,6 @@ struct sdpc_desc *sdp_desc_q_look_head(s
  */
 int sdp_desc_q_type_head(struct sdpc_desc_q *table)
 {
-	SDP_CHECK_NULL(table, -EINVAL);
-
 	if (NULL == table->head)
 		return SDP_DESC_TYPE_NONE;
 	else
@@ -243,8 +226,6 @@ int sdp_desc_q_type_head(struct sdpc_des
 struct sdpc_desc *sdp_desc_q_look_type_head(struct sdpc_desc_q *table, 
 					   enum sdp_desc_type type)
 {
-	SDP_CHECK_NULL(table, NULL);
-
 	if (NULL == table->head)
 		return NULL;
 	else
@@ -257,8 +238,6 @@ struct sdpc_desc *sdp_desc_q_look_type_h
 struct sdpc_desc *sdp_desc_q_look_type_tail(struct sdpc_desc_q *table,
 					   enum sdp_desc_type type)
 {
-	SDP_CHECK_NULL(table, NULL);
-
 	if (NULL == table->head)
 		return NULL;
 	else
@@ -272,8 +251,6 @@ struct sdpc_desc *sdp_desc_q_look_type_t
 int sdp_desc_q_types_size(struct sdpc_desc_q *table,
 				 enum sdp_desc_type type)
 {
-	SDP_CHECK_NULL(table, -EINVAL);
-
 	return ((SDP_DESC_TYPE_NONE > type) ?
 		table->count[type] : -ERANGE);
 } /* sdp_desc_q_types_size */
@@ -283,8 +260,6 @@ int sdp_desc_q_types_size(struct sdpc_de
  */
 int sdp_desc_q_init(struct sdpc_desc_q *table)
 {
-	SDP_CHECK_NULL(table, -EINVAL);
-
 	table->head = NULL;
 	table->size = 0;
 
@@ -301,7 +276,6 @@ int sdp_desc_q_clear(struct sdpc_desc_q 
 	struct sdpc_desc *element;
 	int result;
 
-	SDP_CHECK_NULL(table, -EINVAL);
 	/*
 	 * drain the table of any objects
 	 */
Index: sdp_post.c
===================================================================
--- sdp_post.c	(revision 1871)
+++ sdp_post.c	(working copy)
@@ -41,8 +41,6 @@ int sdp_cm_listen_start(struct sdev_root
 {
 	int result = 0;
 
-	SDP_CHECK_NULL(dev_root, -EINVAL);
-
 	if (NULL != dev_root->listen_id)
 		sdp_dbg_warn(NULL, "Already listening for connections.");
 
@@ -75,8 +73,6 @@ int sdp_cm_listen_stop(struct sdev_root 
 {
 	int result = 0;
 
-	SDP_CHECK_NULL(dev_root, -EINVAL);
-
 	result = ib_destroy_cm_id(dev_root->listen_id);
 	if (0 > result)
 		sdp_dbg_warn(NULL, "Error <%d> stopping listen", result);
@@ -197,7 +193,6 @@ static void _sdp_cm_failed(void *arg)
 static int _sdp_cm_deferred_generic(struct sdp_opt *conn,
 				    void (*defer_func)(void *arg))
 {
-	SDP_CHECK_NULL(conn, -EINVAL);
 	/*
 	 * send a potentially defered failed request.
 	 */
-- 
MST - Michael S. Tsirkin



More information about the general mailing list