[INC] Clean up TO_LONG_PTR use in ib_types.h.
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 13 Jul 2008 10:39:47 +0000 (10:39 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 13 Jul 2008 10:39:47 +0000 (10:39 +0000)
Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1383 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

inc/iba/ib_types.h

index 42ce3be..fb42388 100644 (file)
@@ -39,7 +39,6 @@
 \r
 #include <complib/cl_types.h>\r
 #include <complib/cl_byteswap.h>\r
-//#include <al_fmr_pool.h>\r
 \r
 #define HDL_TO_PTR(hdl) Handle64ToHandle( (void * __ptr64) (hdl))\r
 \r
@@ -49,8 +48,7 @@
 #define IB_CONCAT(str1, str2) str1##str2\r
 \r
 #define TO_LONG_PTR(type,member_name) \\r
-    union { type member_name;  uint64_t IB_CONCAT(member_name,_padding) ; }\r
-\r
+       union { type member_name;  uint64_t IB_CONCAT(member_name,_padding); }\r
 \r
 \r
 #ifdef CL_KERNEL\r
@@ -600,7 +598,7 @@ ib_class_is_vendor_specific_low(
        IN              const   uint8_t class_code )\r
 {\r
        return( (class_code >= IB_MCLASS_VENDOR_LOW_RANGE_MIN) &&\r
-           (class_code <= IB_MCLASS_VENDOR_LOW_RANGE_MAX)) ;\r
+           (class_code <= IB_MCLASS_VENDOR_LOW_RANGE_MAX));\r
 }\r
 /*\r
 * PARAMETERS\r
@@ -632,7 +630,7 @@ ib_class_is_vendor_specific_high(
        IN              const   uint8_t class_code )\r
 {\r
        return( (class_code >= IB_MCLASS_VENDOR_HIGH_RANGE_MIN) &&\r
-           (class_code <= IB_MCLASS_VENDOR_HIGH_RANGE_MAX)) ;\r
+           (class_code <= IB_MCLASS_VENDOR_HIGH_RANGE_MAX));\r
 }\r
 /*\r
 * PARAMETERS\r
@@ -2122,7 +2120,7 @@ ib_mgid_get_scope(
 */\r
 AL_INLINE void AL_API\r
 ib_mgid_set_scope(\r
-        IN             ib_gid_t* const         p_gid,\r
+       IN                      ib_gid_t* const p_gid,\r
        IN      const   uint8_t                 scope )\r
 {\r
        p_gid->raw[1] &= 0xF0;\r
@@ -5109,8 +5107,8 @@ ib_port_info_set_timeout(
 */\r
 AL_INLINE void AL_API\r
 ib_port_info_set_client_rereg(\r
-       IN              ib_port_info_t* const   p_pi,\r
-       IN      const   uint8_t                 client_rereg )\r
+       IN                              ib_port_info_t* const   p_pi,\r
+       IN              const   uint8_t                                 client_rereg )\r
 {\r
        CL_ASSERT( client_rereg <= 0x1 );\r
        p_pi->subnet_timeout =\r
@@ -6190,8 +6188,8 @@ typedef struct _ib_pkey_table_record
        ib_net16_t              lid; // for CA: lid of port, for switch lid of port 0\r
        uint16_t                block_num;\r
        uint8_t                 port_num; // for switch: port number, for CA: reserved\r
-       uint8_t                 reserved1;\r
-       uint16_t                reserved2;\r
+       uint8_t                 reserved1;\r
+       uint16_t                reserved2;\r
        ib_pkey_table_t         pkey_tbl;\r
 \r
 }      PACK_SUFFIX ib_pkey_table_record_t;\r
@@ -8951,11 +8949,10 @@ ib_get_async_event_str(
 */\r
 typedef struct _ib_event_rec\r
 {\r
-\r
-       TO_LONG_PTR(void* ,     context) ;\r
+       TO_LONG_PTR(void*,              context);\r
        ib_async_event_t                type;\r
 \r
-       //HCA vendor specific event information. \r
+       /* HCA vendor specific event information. */\r
        uint64_t                                vendor_specific;\r
 \r
        /* The following structures are valid only for trap types. */\r
@@ -9167,8 +9164,8 @@ typedef struct _ib_port_attr
         * Pointers at the end of the structure to allow doing a simple\r
         * memory comparison of contents up to the first pointer.\r
         */\r
-       TO_LONG_PTR(ib_gid_t* ,         p_gid_table) ;\r
-       TO_LONG_PTR(ib_net16_t* ,               p_pkey_table) ;\r
+       TO_LONG_PTR(ib_gid_t*,  p_gid_table);\r
+       TO_LONG_PTR(ib_net16_t*,p_pkey_table);\r
 \r
 }      ib_port_attr_t;\r
 /*\r
@@ -9265,8 +9262,8 @@ typedef struct _ib_ca_attr
        uint32_t                                num_page_sizes;\r
        uint8_t                                 num_ports;\r
 \r
-       TO_LONG_PTR(uint32_t* ,         p_page_size) ;\r
-       TO_LONG_PTR(ib_port_attr_t* ,   p_port_attr) ;\r
+       TO_LONG_PTR(uint32_t*,  p_page_size);\r
+       TO_LONG_PTR(ib_port_attr_t*, p_port_attr);\r
 \r
 }      ib_ca_attr_t;\r
 /*\r
@@ -9778,9 +9775,9 @@ typedef struct _ib_qp_create
        uint32_t                                sq_sge;\r
        uint32_t                                rq_sge;\r
 \r
-TO_LONG_PTR(   ib_cq_handle_t ,                        h_sq_cq) ; \r
-TO_LONG_PTR(   ib_cq_handle_t ,                        h_rq_cq) ; \r
-TO_LONG_PTR(   ib_srq_handle_t ,                       h_srq) ; \r
+       TO_LONG_PTR(ib_cq_handle_t, h_sq_cq);\r
+       TO_LONG_PTR(ib_cq_handle_t, h_rq_cq);\r
+       TO_LONG_PTR(ib_srq_handle_t, h_srq);\r
 \r
        boolean_t                               sq_signaled;\r
 \r
@@ -9855,7 +9852,7 @@ TO_LONG_PTR(      ib_srq_handle_t ,                       h_srq) ;
 */\r
 typedef struct _ib_qp_attr\r
 {\r
-TO_LONG_PTR(   ib_pd_handle_t ,                        h_pd) ; \r
+       TO_LONG_PTR(ib_pd_handle_t, h_pd);\r
        ib_qp_type_t                    qp_type;\r
        ib_access_t                             access_ctrl;\r
        uint16_t                                pkey_index;\r
@@ -9868,9 +9865,9 @@ TO_LONG_PTR(      ib_pd_handle_t ,                        h_pd) ;
        uint8_t                                 init_depth;\r
        uint8_t                                 resp_res;\r
 \r
-TO_LONG_PTR(   ib_cq_handle_t ,                        h_sq_cq) ; \r
-TO_LONG_PTR(   ib_cq_handle_t ,                        h_rq_cq) ; \r
-TO_LONG_PTR(   ib_srq_handle_t ,                       h_srq) ; \r
+       TO_LONG_PTR(ib_cq_handle_t, h_sq_cq);\r
+       TO_LONG_PTR(ib_cq_handle_t, h_rq_cq);\r
+       TO_LONG_PTR(ib_srq_handle_t,h_srq);\r
 \r
        boolean_t                               sq_signaled;\r
 \r
@@ -10164,12 +10161,12 @@ typedef uint32_t                                      ib_send_opt_t;
 */\r
 typedef struct _ib_send_wr\r
 {\r
-       TO_LONG_PTR(struct _ib_send_wr* ,       p_next) ;\r
+       TO_LONG_PTR(struct _ib_send_wr*, p_next);\r
        uint64_t                                        wr_id;\r
        ib_wr_type_t                            wr_type;\r
        ib_send_opt_t                           send_opt;\r
        uint32_t                                        num_ds;\r
-       TO_LONG_PTR(ib_local_ds_t* ,            ds_array) ;\r
+       TO_LONG_PTR(ib_local_ds_t*, ds_array);\r
        ib_net32_t                                      immediate_data;\r
 \r
        union _send_dgrm\r
@@ -10178,9 +10175,9 @@ typedef struct _ib_send_wr
                {\r
                        ib_net32_t              remote_qp;\r
                        ib_net32_t              remote_qkey;\r
-TO_LONG_PTR(                   ib_av_handle_t ,        h_av) ; \r
+                       TO_LONG_PTR(ib_av_handle_t, h_av);\r
                        uint16_t                pkey_index;\r
-                       TO_LONG_PTR(void* ,     rsvd) ;\r
+                       TO_LONG_PTR(void*, rsvd);\r
 \r
                }       ud;\r
 \r
@@ -10338,10 +10335,10 @@ TO_LONG_PTR(                  ib_av_handle_t ,        h_av) ;
 */\r
 typedef struct _ib_recv_wr\r
 {\r
-       TO_LONG_PTR(struct _ib_recv_wr* ,       p_next) ;\r
+       TO_LONG_PTR(struct _ib_recv_wr*, p_next);\r
        uint64_t                                        wr_id;\r
        uint32_t                                        num_ds;\r
-       TO_LONG_PTR(ib_local_ds_t* ,            ds_array) ;\r
+       TO_LONG_PTR(ib_local_ds_t*,     ds_array);\r
 \r
 }      ib_recv_wr_t;\r
 /*\r
@@ -10381,7 +10378,7 @@ typedef struct _ib_bind_wr
        uint64_t                                wr_id;\r
        ib_send_opt_t                   send_opt;\r
 \r
-TO_LONG_PTR(   ib_mr_handle_t ,                        h_mr) ; \r
+       TO_LONG_PTR(ib_mr_handle_t, h_mr);\r
        ib_access_t                             access_ctrl;\r
        net32_t                                 current_rkey;\r
 \r
@@ -10657,7 +10654,7 @@ typedef uint32_t                                        ib_recv_opt_t;
 */\r
 typedef struct _ib_wc\r
 {\r
-       TO_LONG_PTR(struct _ib_wc* ,    p_next) ;\r
+       TO_LONG_PTR(struct _ib_wc*, p_next);\r
        uint64_t                                wr_id;\r
        ib_wc_type_t                    wc_type;\r
 \r
@@ -10836,7 +10833,7 @@ typedef struct _ib_wc
 */\r
 typedef struct _ib_mr_create\r
 {\r
-       TO_LONG_PTR(void* ,                     vaddr) ;\r
+       TO_LONG_PTR(void*,              vaddr);\r
        uint64_t                                length;\r
        ib_access_t                             access_ctrl;\r
 }      ib_mr_create_t;\r
@@ -10982,7 +10979,7 @@ typedef struct _ib_phys_create
 {\r
        uint64_t                                        length;\r
        uint32_t                                        num_ranges;\r
-       TO_LONG_PTR(ib_phys_range_t* ,  range_array) ;\r
+       ib_phys_range_t*                        range_array;\r
        uint32_t                                        buf_offset;\r
        uint32_t                                        hca_page_size;\r
        ib_access_t                                     access_ctrl;\r
@@ -11024,7 +11021,7 @@ typedef struct _ib_phys_create
 */\r
 typedef struct _ib_mr_attr\r
 {\r
-TO_LONG_PTR(   ib_pd_handle_t ,                        h_pd) ; \r
+       TO_LONG_PTR(ib_pd_handle_t, h_pd);\r
        uint64_t                                local_lb;\r
        uint64_t                                local_ub;\r
        uint64_t                                remote_lb;\r
@@ -11315,7 +11312,7 @@ typedef struct _ib_ci_op
        IN                              uint32_t                                        buf_size;\r
        IN                              uint32_t                                        buf_info;\r
        IN      OUT                     int32_t                                         status;\r
-    IN OUT                     TO_LONG_PTR(void*, p_buf) OPTIONAL; // Do not put it last in the structure, because of memory alignment\r
+       IN      OUT                     TO_LONG_PTR(void*,                      p_buf) OPTIONAL; // Do not put it last in the structure, because of memory alignment\r
                OUT                     uint32_t                                        num_bytes_ret;\r
        \r
 }      ib_ci_op_t;\r