Get rid of the typedef DAT_CONTEXT.

Signed-off-by: Tom Duffy <[EMAIL PROTECTED]>

Index: linux-kernel/test/dapltest/include/dapl_common.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_common.h    (revision 2506)
+++ linux-kernel/test/dapltest/include/dapl_common.h    (working copy)
@@ -42,7 +42,7 @@ typedef enum
 typedef struct
 {
     DAT_RMR_CONTEXT         rmr_context;
-    DAT_CONTEXT             mem_address;
+    union dat_context             mem_address;
 } RemoteMemoryInfo;
 #pragma pack()
 
Index: linux-kernel/dat-provider/dapl_get_consumer_context.c
===================================================================
--- linux-kernel/dat-provider/dapl_get_consumer_context.c       (revision 2506)
+++ linux-kernel/dat-provider/dapl_get_consumer_context.c       (working copy)
@@ -48,7 +48,7 @@
  *     DAT_SUCCESS
  *     DAT_INVALID_PARAMETER
  */
-u32 dapl_get_consumer_context(DAT_HANDLE dat_handle, DAT_CONTEXT *context)
+u32 dapl_get_consumer_context(DAT_HANDLE dat_handle, union dat_context 
*context)
 {
        u32 dat_status = DAT_SUCCESS;
        struct dapl_header *header;
Index: linux-kernel/dat-provider/dapl_set_consumer_context.c
===================================================================
--- linux-kernel/dat-provider/dapl_set_consumer_context.c       (revision 2506)
+++ linux-kernel/dat-provider/dapl_set_consumer_context.c       (working copy)
@@ -47,7 +47,7 @@
  *     DAT_SUCCESS
  *     DAT_INVALID_HANDLE
  */
-u32 dapl_set_consumer_context(DAT_HANDLE dat_handle, DAT_CONTEXT context)
+u32 dapl_set_consumer_context(DAT_HANDLE dat_handle, union dat_context context)
 {
        u32 dat_status = DAT_SUCCESS;
        struct dapl_header *header;
Index: linux-kernel/dat-provider/dapl.h
===================================================================
--- linux-kernel/dat-provider/dapl.h    (revision 2506)
+++ linux-kernel/dat-provider/dapl.h    (working copy)
@@ -177,7 +177,7 @@ struct dapl_header {
        enum dat_handle_type handle_type; 
        struct dapl_ia *owner_ia;
        struct dapl_llist_entry ia_list_entry;  
-       DAT_CONTEXT user_context;         /* user context - opaque to DAPL */
+       union dat_context user_context;   /* user context - opaque to DAPL */
        spinlock_t lock;
        unsigned long flags;              /* saved lock flag values */
 };
@@ -423,9 +423,11 @@ extern u32 dapl_ia_query(DAT_IA_HANDLE, 
 
 /* helper functions */
 
-extern u32 dapl_set_consumer_context(DAT_HANDLE handle, DAT_CONTEXT context);
+extern u32 dapl_set_consumer_context(DAT_HANDLE handle,
+                                    union dat_context context);
 
-extern u32 dapl_get_consumer_context(DAT_HANDLE handle, DAT_CONTEXT *context);
+extern u32 dapl_get_consumer_context(DAT_HANDLE handle,
+                                    union dat_context *context);
 
 extern u32 dapl_get_handle_type(DAT_HANDLE handle,
                                enum dat_handle_type *type);
Index: linux-kernel/dat/dat.h
===================================================================
--- linux-kernel/dat/dat.h      (revision 2506)
+++ linux-kernel/dat/dat.h      (working copy)
@@ -361,14 +361,14 @@ typedef enum {
        TRUE = 1
 } boolean_t;
 
-typedef union dat_context {
+union dat_context {
        void *as_ptr;
        u64 as_64;
        unsigned long long as_index;
-} DAT_CONTEXT;
+};
 
-typedef DAT_CONTEXT DAT_DTO_COOKIE;
-typedef DAT_CONTEXT DAT_RMR_COOKIE;
+typedef union dat_context DAT_DTO_COOKIE;
+typedef union dat_context DAT_RMR_COOKIE;
 
 enum dat_completion_flags {
        /* Completes with notification                                     */
@@ -920,13 +920,6 @@ struct dat_upcall_object {
        DAT_UPCALL_FUNC upcall_func;
 };
 
-/* Define NULL upcall */
-
-#define DAT_UPCALL_NULL \
-       ((struct dat_upcall_object) { (void *) NULL, (DAT_UPCALL_FUNC) NULL })
-
-#define DAT_UPCALL_SAME        ((struct dat_upcall_object *) NULL)
-
 /* Provider/registration info */
 
 struct dat_provider_info {
@@ -1098,9 +1091,9 @@ typedef u32 (*DAT_IA_QUERY_FUNC)(DAT_IA_
                                 struct dat_ia_attr *,
                                 struct dat_provider_attr *);
 
-typedef u32 (*DAT_SET_CONSUMER_CONTEXT_FUNC)(DAT_HANDLE, DAT_CONTEXT);
+typedef u32 (*DAT_SET_CONSUMER_CONTEXT_FUNC)(DAT_HANDLE, union dat_context);
 
-typedef u32 (*DAT_GET_CONSUMER_CONTEXT_FUNC)(DAT_HANDLE, DAT_CONTEXT *);
+typedef u32 (*DAT_GET_CONSUMER_CONTEXT_FUNC)(DAT_HANDLE, union dat_context *);
 
 typedef u32 (*DAT_GET_HANDLE_TYPE_FUNC)(DAT_HANDLE, enum dat_handle_type *);
 
@@ -1387,14 +1380,14 @@ extern u32 dat_registry_list_providers(i
         DAT_HANDLE_TO_PROVIDER(handle)->func(handle, ##__VA_ARGS__)
 
 static inline u32 dat_set_consumer_context(DAT_HANDLE handle,
-                                          DAT_CONTEXT context) 
+                                          union dat_context context) 
 {
         return DAT_CALL_PROVIDER_FUNC(set_consumer_context_func, handle,
                                      context);
 }
 
 static inline u32 dat_get_consumer_context(DAT_HANDLE handle,
-                                          DAT_CONTEXT *context)
+                                          union dat_context *context)
 {
         return DAT_CALL_PROVIDER_FUNC(get_consumer_context_func, handle,
                                      context);

_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to