[openib-general] [PATCH] kDAPL: return is not a function

Tom Duffy tduffy at sun.com
Wed May 18 16:49:32 PDT 2005


return is not a function

Signed-off-by: Tom Duffy <tduffy at sun.com>

Index: linux-kernel-return/dat-provider/dapl_cookie.c
===================================================================
--- linux-kernel-return/dat-provider/dapl_cookie.c	(revision 2382)
+++ linux-kernel-return/dat-provider/dapl_cookie.c	(working copy)
@@ -134,9 +134,9 @@ u32 dapl_cb_create(DAPL_COOKIE_BUFFER *b
 			buffer->pool[i].ep = ep;
 		}
 
-		return (DAT_SUCCESS);
+		return DAT_SUCCESS;
 	} else {
-		return (DAT_INSUFFICIENT_RESOURCES);
+		return DAT_INSUFFICIENT_RESOURCES;
 	}
 }
 
Index: linux-kernel-return/dat-provider/dapl_ring_buffer_util.c
===================================================================
--- linux-kernel-return/dat-provider/dapl_ring_buffer_util.c	(revision 2382)
+++ linux-kernel-return/dat-provider/dapl_ring_buffer_util.c	(working copy)
@@ -237,7 +237,7 @@ void *dapl_rbuf_remove(DAPL_RING_BUFFER 
 		if (val == pos) {
 			pos = (pos + 1) & rbuf->lim;	/* verify in range */
 
-			return (rbuf->base[pos]);
+			return rbuf->base[pos];
 		}
 	}
 
Index: linux-kernel-return/dat-provider/dapl_lmr_util.c
===================================================================
--- linux-kernel-return/dat-provider/dapl_lmr_util.c	(revision 2382)
+++ linux-kernel-return/dat-provider/dapl_lmr_util.c	(working copy)
@@ -50,7 +50,7 @@ DAPL_LMR *dapl_lmr_alloc(DAPL_IA * ia,
 	/* Allocate LMR */
 	lmr = (DAPL_LMR *) kmalloc(sizeof(DAPL_LMR), GFP_ATOMIC);
 	if (NULL == lmr) {
-		return (NULL);
+		return NULL;
 	}
 
 	/* zero the structure */
@@ -80,7 +80,7 @@ DAPL_LMR *dapl_lmr_alloc(DAPL_IA * ia,
 	lmr->param.mem_priv = mem_priv;
 	atomic_set(&lmr->lmr_ref_count, 0);
 
-	return (lmr);
+	return lmr;
 }
 
 void dapl_lmr_dealloc(DAPL_LMR * lmr)
Index: linux-kernel-return/dat-provider/dapl_hca_util.c
===================================================================
--- linux-kernel-return/dat-provider/dapl_hca_util.c	(revision 2382)
+++ linux-kernel-return/dat-provider/dapl_hca_util.c	(working copy)
@@ -83,7 +83,7 @@ DAPL_HCA *dapl_hca_alloc(char *name, str
 		}
 	}
 
-	return (hca_ptr);
+	return hca_ptr;
 }
 
 /*
Index: linux-kernel-return/dat-provider/dapl_cr_util.c
===================================================================
--- linux-kernel-return/dat-provider/dapl_cr_util.c	(revision 2382)
+++ linux-kernel-return/dat-provider/dapl_cr_util.c	(working copy)
@@ -44,7 +44,7 @@ DAPL_CR *dapl_cr_alloc(DAPL_IA * ia_ptr)
 	/* Allocate EP */
 	cr_ptr = (DAPL_CR *) kmalloc(sizeof(DAPL_CR), GFP_ATOMIC);
 	if (cr_ptr == NULL) {
-		return (NULL);
+		return NULL;
 	}
 
 	/* zero the structure */
@@ -62,7 +62,7 @@ DAPL_CR *dapl_cr_alloc(DAPL_IA * ia_ptr)
 	dapl_llist_init_entry(&cr_ptr->header.ia_list_entry);
 	spin_lock_init(&cr_ptr->header.lock);
 
-	return (cr_ptr);
+	return cr_ptr;
 }
 
 /*
Index: linux-kernel-return/dat-provider/dapl_ia_util.c
===================================================================
--- linux-kernel-return/dat-provider/dapl_ia_util.c	(revision 2382)
+++ linux-kernel-return/dat-provider/dapl_ia_util.c	(working copy)
@@ -65,7 +65,7 @@ DAPL_IA *dapl_ia_alloc(struct dat_provid
 	/* Allocate IA */
 	ia_ptr = (DAPL_IA *) kmalloc(sizeof(DAPL_IA), GFP_ATOMIC);
 	if (ia_ptr == NULL) {
-		return (NULL);
+		return NULL;
 	}
 
 	/* zero the structure */
@@ -100,7 +100,7 @@ DAPL_IA *dapl_ia_alloc(struct dat_provid
 
 	dapl_hca_link_ia(hca_ptr, ia_ptr);
 
-	return (ia_ptr);
+	return ia_ptr;
 }
 
 /*
Index: linux-kernel-return/dat-provider/dapl_pz_util.c
===================================================================
--- linux-kernel-return/dat-provider/dapl_pz_util.c	(revision 2382)
+++ linux-kernel-return/dat-provider/dapl_pz_util.c	(working copy)
@@ -59,7 +59,7 @@ DAPL_PZ *dapl_pz_alloc(DAPL_IA * ia)
 	/* Allocate PZ */
 	pz = (DAPL_PZ *) kmalloc(sizeof(DAPL_PZ), GFP_ATOMIC);
 	if (NULL == pz) {
-		return (NULL);
+		return NULL;
 	}
 
 	/* zero the structure */
@@ -83,7 +83,7 @@ DAPL_PZ *dapl_pz_alloc(DAPL_IA * ia)
 	 */
 	atomic_set(&pz->pz_ref_count, 0);
 
-	return (pz);
+	return pz;
 }
 
 /*
Index: linux-kernel-return/dat-provider/dapl_openib_cm.c
===================================================================
--- linux-kernel-return/dat-provider/dapl_openib_cm.c	(revision 2382)
+++ linux-kernel-return/dat-provider/dapl_openib_cm.c	(working copy)
@@ -844,7 +844,7 @@ u32 dapl_ib_cm_remote_addr(DAT_HANDLE da
 
 	rc = ib_cm_get_remote_gid(cr_ptr->ib_cm_handle, (u8 *) & remote_gid);
 	if (rc < 0)
-		return (rc);
+		return rc;
 
 	if (!memcmp(&ia_ptr->hca_ptr->ib_trans.gid, &remote_gid, 16)) {
 		memcpy(remote_ia_address, &ia_ptr->hca_ptr->hca_address,
Index: linux-kernel-return/dat-provider/dapl_openib_util.c
===================================================================
--- linux-kernel-return/dat-provider/dapl_openib_util.c	(revision 2382)
+++ linux-kernel-return/dat-provider/dapl_openib_util.c	(working copy)
@@ -334,7 +334,7 @@ u32 dapl_ib_pd_alloc(DAPL_IA *ia, DAPL_P
 	}
 
 	pz->pd_handle = (ib_pd_handle_t) pd;
-	return (DAT_SUCCESS);
+	return DAT_SUCCESS;
 }
 
 /*
@@ -367,7 +367,7 @@ u32 dapl_ib_pd_free(DAPL_PZ *pz)
 	}
 
 	pz->pd_handle = IB_INVALID_HANDLE;
-	return (DAT_SUCCESS);
+	return DAT_SUCCESS;
 }
 
 /*
@@ -393,7 +393,7 @@ u32 dapl_ib_mr_register(DAPL_IA *ia, DAP
 			u64 length, enum dat_mem_priv_flags privileges)
 {
 	/* ITBD virtual memory registration ??? */
-	return (DAT_SUCCESS);
+	return DAT_SUCCESS;
 }
 
 u32 dapl_ib_mr_register_physical(DAPL_IA *ia_ptr, DAPL_LMR *lmr,
@@ -452,7 +452,7 @@ u32 dapl_ib_mr_register_physical(DAPL_IA
 	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
 		"dapl_ib_mr_register_physical(%p %d) got lkey 0x%x \n",
 		buf_list, length, lmr->param.lmr_context);
-	return (DAT_SUCCESS);
+	return DAT_SUCCESS;
 }
 
 /*
@@ -486,7 +486,7 @@ u32 dapl_ib_mr_deregister(DAPL_LMR *lmr)
 	lmr->param.lmr_context = 0;
 	lmr->mr_handle = IB_INVALID_HANDLE;
 
-	return (DAT_SUCCESS);
+	return DAT_SUCCESS;
 }
 
 /*
@@ -523,7 +523,7 @@ u32 dapl_ib_mw_alloc(DAPL_RMR *rmr)
 	rmr->param.rmr_context = mw->rkey;
 	dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
 		     "created mw_handle = %p, r_key = 0x%x\n", mw, mw->rkey);
-	return (DAT_SUCCESS);
+	return DAT_SUCCESS;
 }
 
 /*
@@ -556,7 +556,7 @@ u32 dapl_ib_mw_free(DAPL_RMR *rmr)
 
 	rmr->param.rmr_context = 0;
 	rmr->mw_handle = IB_INVALID_HANDLE;
-	return (DAT_SUCCESS);
+	return DAT_SUCCESS;
 }
 
 /*
@@ -601,13 +601,13 @@ u32 dapl_ib_mw_bind(DAPL_RMR *rmr, DAPL_
 	if (ib_status < 0) {
 		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
 			     "ib_bind_mw error code return = %d\n", ib_status);
-		return (dapl_ib_status_convert(ib_status));
+		return dapl_ib_status_convert(ib_status);
 	}
 
 	rmr->param.rmr_context = (DAT_RMR_CONTEXT) rmr->mw_handle->rkey;
 	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " new_rkey = 0x%x\n",
 		     rmr->mw_handle->rkey);
-	return (DAT_SUCCESS);
+	return DAT_SUCCESS;
 }
 
 /*
@@ -643,13 +643,13 @@ u32 dapl_ib_mw_unbind(DAPL_RMR *rmr, DAP
 	if (ib_status < 0) {
 		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
 			     " ib_bind_mw error code return = %d\n", ib_status);
-		return (dapl_ib_status_convert(ib_status));
+		return dapl_ib_status_convert(ib_status);
 	}
 
 	rmr->param.rmr_context = (DAT_RMR_CONTEXT) rmr->mw_handle->rkey;
 	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " new_rkey = 0x%x\n",
 		     rmr->mw_handle->rkey);
-	return (DAT_SUCCESS);
+	return DAT_SUCCESS;
 }
 
 /*
@@ -709,7 +709,7 @@ u32 dapl_ib_query_hca(DAPL_HCA *hca_ptr,
 		dapl_dbg_log(DAPL_DBG_TYPE_ERR,
 			     " ib_query_device error code return = %d\n",
 			     ib_status);
-		return (dapl_ib_status_convert(ib_status));
+		return dapl_ib_status_convert(ib_status);
 	}
 
 	/* ITBD need to review the attr */
Index: linux-kernel-return/dat-provider/dapl_rmr_util.c
===================================================================
--- linux-kernel-return/dat-provider/dapl_rmr_util.c	(revision 2382)
+++ linux-kernel-return/dat-provider/dapl_rmr_util.c	(working copy)
@@ -35,7 +35,7 @@ DAPL_RMR *dapl_rmr_alloc(DAPL_PZ * pz)
 	/* Allocate LMR */
 	rmr = (DAPL_RMR *) kmalloc(sizeof(DAPL_RMR), GFP_ATOMIC);
 	if (NULL == rmr) {
-		return (NULL);
+		return NULL;
 	}
 
 	/* zero the structure */
@@ -68,7 +68,7 @@ DAPL_RMR *dapl_rmr_alloc(DAPL_PZ * pz)
 	rmr->pz = pz;
 	rmr->lmr = NULL;
 
-	return (rmr);
+	return rmr;
 }
 
 void dapl_rmr_dealloc(DAPL_RMR * rmr)
Index: linux-kernel-return/dat-provider/dapl_sp_util.c
===================================================================
--- linux-kernel-return/dat-provider/dapl_sp_util.c	(revision 2382)
+++ linux-kernel-return/dat-provider/dapl_sp_util.c	(working copy)
@@ -66,7 +66,7 @@ DAPL_SP *dapl_sp_alloc(DAPL_IA * ia_ptr,
 	/* Allocate EP */
 	sp_ptr = (DAPL_SP *) kmalloc(sizeof(DAPL_SP), GFP_ATOMIC);
 	if (sp_ptr == NULL) {
-		return (NULL);
+		return NULL;
 	}
 
 	/* zero the structure */
@@ -94,7 +94,7 @@ DAPL_SP *dapl_sp_alloc(DAPL_IA * ia_ptr,
 	 */
 	dapl_llist_init_head(&sp_ptr->cr_list_head);
 
-	return (sp_ptr);
+	return sp_ptr;
 }
 
 /*
Index: linux-kernel-return/dat-provider/dapl_llist.c
===================================================================
--- linux-kernel-return/dat-provider/dapl_llist.c	(revision 2382)
+++ linux-kernel-return/dat-provider/dapl_llist.c	(working copy)
@@ -198,7 +198,7 @@ void *dapl_llist_remove_head(DAPL_LLIST_
 	first->flink = NULL;
 	first->blink = NULL;
 	first->list_head = NULL;
-	return (first->data);
+	return first->data;
 }
 
 /*
@@ -224,7 +224,7 @@ void *dapl_llist_remove_tail(DAPL_LLIST_
 	last->blink = NULL;
 	last->list_head = NULL;
 
-	return (last->data);
+	return last->data;
 }
 
 /*
@@ -274,7 +274,7 @@ void *dapl_llist_remove_entry(DAPL_LLIST
 	entry->flink = NULL;
 	entry->blink = NULL;
 
-	return (entry->data);
+	return entry->data;
 }
 
 /*
@@ -287,7 +287,7 @@ void *dapl_llist_peek_head(DAPL_LLIST_HE
 
 	dapl_os_assert(!dapl_llist_is_empty(head));
 	first = *head;
-	return (first->data);
+	return first->data;
 }
 
 /*
@@ -310,7 +310,7 @@ void *dapl_llist_next_entry(DAPL_LLIST_H
 			return NULL;
 		}
 	}
-	return (next->data);
+	return next->data;
 }
 
 #ifdef DAPL_DBG




More information about the general mailing list