[openib-general] [PATCH] kDAPL: remove typedef DAT_PROVIDER
Tom Duffy
tduffy at sun.com
Fri May 6 17:03:18 PDT 2005
James, thanks for applying my last patch.
You know where I am going with this... this is the first in what will be
a huge amount of patches. I am happy to go through and send them all to
the list, but it might be quicker and easier for you to do it directly
to your tree for all the structs and enums. Sup to you.
Remove the typedef DAT_PROVIDER and use struct dat_provider directly.
Signed-off-by: Tom Duffy <tduffy at sun.com>
Index: dat-provider/dapl_module.c
===================================================================
--- dat-provider/dapl_module.c (revision 2274)
+++ dat-provider/dapl_module.c (working copy)
@@ -126,7 +126,7 @@ module_exit(dapl_fini);
void DAT_PROVIDER_INIT_FUNC_NAME(const DAT_PROVIDER_INFO * provider_info,
struct ib_device *device, u8 port)
{
- DAT_PROVIDER *provider;
+ struct dat_provider *provider;
DAPL_HCA *hca_ptr;
DAT_RETURN dat_status;
@@ -178,7 +178,7 @@ void DAT_PROVIDER_INIT_FUNC_NAME(const D
*/
void DAT_PROVIDER_FINI_FUNC_NAME(const DAT_PROVIDER_INFO * provider_info)
{
- DAT_PROVIDER *provider;
+ struct dat_provider *provider;
DAT_RETURN dat_status;
dat_status =
Index: dat-provider/dapl_ia_util.c
===================================================================
--- dat-provider/dapl_ia_util.c (revision 2274)
+++ dat-provider/dapl_ia_util.c (working copy)
@@ -61,7 +61,7 @@ void dapl_ia_release_hca(DAPL_HCA * hca_
* none
*
*/
-DAPL_IA *dapl_ia_alloc(DAT_PROVIDER * provider, DAPL_HCA * hca_ptr)
+DAPL_IA *dapl_ia_alloc(struct dat_provider *provider, DAPL_HCA * hca_ptr)
{
DAPL_IA *ia_ptr;
Index: dat-provider/dapl_provider.c
===================================================================
--- dat-provider/dapl_provider.c (revision 2274)
+++ dat-provider/dapl_provider.c (working copy)
@@ -51,7 +51,7 @@ DAPL_PROVIDER_LIST g_dapl_provider_list;
* the function table for this provider
*/
-DAT_PROVIDER g_dapl_provider_template = {
+struct dat_provider g_dapl_provider_template = {
NULL,
NULL,
&dapl_ia_open,
@@ -211,7 +211,8 @@ DAT_COUNT dapl_provider_list_size(void)
return g_dapl_provider_list.size;
}
-DAT_RETURN dapl_provider_list_insert(const char *name, DAT_PROVIDER ** p_data)
+DAT_RETURN dapl_provider_list_insert(const char *name,
+ struct dat_provider **p_data)
{
DAPL_PROVIDER_LIST_NODE *cur_node, *prev_node, *next_node;
DAT_RETURN status;
@@ -265,7 +266,8 @@ DAT_RETURN dapl_provider_list_insert(con
return status;
}
-DAT_RETURN dapl_provider_list_search(const char *name, DAT_PROVIDER ** p_data)
+DAT_RETURN dapl_provider_list_search(const char *name,
+ struct dat_provider **p_data)
{
DAPL_PROVIDER_LIST_NODE *cur_node;
DAT_RETURN status;
Index: dat-provider/dapl_ia_util.h
===================================================================
--- dat-provider/dapl_ia_util.h (revision 2274)
+++ dat-provider/dapl_ia_util.h (working copy)
@@ -39,7 +39,7 @@
#include "dapl.h"
-DAPL_IA *dapl_ia_alloc(DAT_PROVIDER * provider, DAPL_HCA * hca_ptr);
+DAPL_IA *dapl_ia_alloc(struct dat_provider *provider, DAPL_HCA * hca_ptr);
DAT_RETURN dapl_ia_abrupt_close(DAPL_IA * ia_ptr);
Index: dat-provider/dapl_provider.h
===================================================================
--- dat-provider/dapl_provider.h (revision 2274)
+++ dat-provider/dapl_provider.h (working copy)
@@ -48,7 +48,7 @@
typedef struct DAPL_PROVIDER_LIST_NODE {
char name[DAT_NAME_MAX_LENGTH];
- DAT_PROVIDER data;
+ struct dat_provider data;
struct DAPL_PROVIDER_LIST_NODE *next;
struct DAPL_PROVIDER_LIST_NODE *prev;
} DAPL_PROVIDER_LIST_NODE;
@@ -66,7 +66,7 @@ typedef struct DAPL_PROVIDER_LIST {
*********************************************************************/
extern DAPL_PROVIDER_LIST g_dapl_provider_list;
-extern DAT_PROVIDER g_dapl_provider_template;
+extern struct dat_provider g_dapl_provider_template;
/*********************************************************************
* *
@@ -81,10 +81,10 @@ extern DAT_RETURN dapl_provider_list_des
extern DAT_COUNT dapl_provider_list_size(void);
extern DAT_RETURN
-dapl_provider_list_insert(const char *name, DAT_PROVIDER ** p_data);
+dapl_provider_list_insert(const char *name, struct dat_provider **p_data);
extern DAT_RETURN
-dapl_provider_list_search(const char *name, DAT_PROVIDER ** p_data);
+dapl_provider_list_search(const char *name, struct dat_provider **p_data);
extern DAT_RETURN dapl_provider_list_remove(const char *name);
Index: dat-provider/dapl_ia_open.c
===================================================================
--- dat-provider/dapl_ia_open.c (revision 2274)
+++ dat-provider/dapl_ia_open.c (working copy)
@@ -64,7 +64,7 @@ dapl_ia_open(const DAT_NAME_PTR name,
DAT_IA_HANDLE * ia_handle_ptr)
{
DAT_RETURN dat_status;
- DAT_PROVIDER *provider;
+ struct dat_provider *provider;
DAPL_HCA *hca_ptr;
DAPL_IA *ia_ptr;
DAPL_EVD *evd_ptr;
Index: dat-provider/dapl.h
===================================================================
--- dat-provider/dapl.h (revision 2274)
+++ dat-provider/dapl.h (working copy)
@@ -228,7 +228,7 @@ struct dapl_hca {
/* DAPL Objects always have the following header */
struct dapl_header {
- DAT_PROVIDER *provider; /* required by DAT - must be first */
+ struct dat_provider *provider; /* required by DAT - must be first */
DAPL_MAGIC magic; /* magic number for verification */
DAT_HANDLE_TYPE handle_type; /* struct type */
DAPL_IA *owner_ia; /* ia which owns this stuct */
Index: dat/api.c
===================================================================
--- dat/api.c (revision 2274)
+++ dat/api.c (working copy)
@@ -627,7 +627,7 @@ EXPORT_SYMBOL(dat_ia_openv);
DAT_RETURN dat_ia_close(DAT_IA_HANDLE ia_handle, DAT_CLOSE_FLAGS flags)
{
- DAT_PROVIDER *provider;
+ struct dat_provider *provider;
DAT_PROVIDER_ATTR provider_attr;
DAT_RETURN status;
const char *ia_name;
@@ -718,7 +718,7 @@ EXPORT_SYMBOL(dat_strerror);
***********************************************************************/
DAT_RETURN
-dat_registry_add_provider(const DAT_PROVIDER * provider,
+dat_registry_add_provider(const struct dat_provider *provider,
const DAT_PROVIDER_INFO * provider_info)
{
DAT_DR_ENTRY entry;
@@ -753,7 +753,7 @@ EXPORT_SYMBOL(dat_registry_remove_provid
***********************************************************************/
DAT_RETURN
-dat_registry_remove_provider(const DAT_PROVIDER * provider,
+dat_registry_remove_provider(const struct dat_provider *provider,
const DAT_PROVIDER_INFO * provider_info)
{
dat_dbg_print(DAT_DBG_CLASS_PROVIDER_API,
Index: dat/dat.h
===================================================================
--- dat/dat.h (revision 2274)
+++ dat/dat.h (working copy)
@@ -1272,7 +1272,7 @@ typedef DAT_RETURN (*DAT_EVD_KCREATE_FUN
typedef DAT_RETURN (*DAT_EVD_MODIFY_UPCALL_FUNC) (
DAT_EVD_HANDLE, DAT_UPCALL_POLICY, const DAT_UPCALL_OBJECT *);
-typedef struct dat_provider {
+struct dat_provider {
const char *device_name;
DAT_PVOID extension;
@@ -1350,7 +1350,7 @@ typedef struct dat_provider {
DAT_SRQ_QUERY_FUNC srq_query_func;
DAT_SRQ_RESIZE_FUNC srq_resize_func;
DAT_SRQ_SET_LW_FUNC srq_set_lw_func;
-} DAT_PROVIDER;
+};
/***************************************************************
*
@@ -1364,10 +1364,10 @@ typedef struct dat_provider {
*/
extern DAT_RETURN dat_registry_add_provider(
- const DAT_PROVIDER *, const DAT_PROVIDER_INFO *);
+ const struct dat_provider *, const DAT_PROVIDER_INFO *);
extern DAT_RETURN dat_registry_remove_provider(
- const DAT_PROVIDER *, const DAT_PROVIDER_INFO *);
+ const struct dat_provider *, const DAT_PROVIDER_INFO *);
/*
* DAT registry functions for consumers
@@ -1391,7 +1391,7 @@ extern DAT_RETURN dat_registry_list_prov
/*
* inline functions for consumers
*/
-#define DAT_HANDLE_TO_PROVIDER(handle) (*(DAT_PROVIDER **)(handle))
+#define DAT_HANDLE_TO_PROVIDER(handle) (*(struct dat_provider **)(handle))
#define DAT_CALL_PROVIDER_FUNC(func, handle, ...) \
DAT_HANDLE_TO_PROVIDER(handle)->func(handle, ##__VA_ARGS__)
More information about the general
mailing list