[ofw] [PATCH] change cl_pfn_fmap_cmp_t to return an 'int' instead of 'intn_t'

Smith, Stan stan.smith at intel.com
Fri Nov 13 15:24:20 PST 2009


Hello,
  Do the following changes cause undo heart-burn for anyone?

Change the cl_pfn_fmap_cmp_t compare function to return an 'int' instead of 'intn_t' as int is a better return value match for standard compare functions like memcmp(), cl_memcmp(), qsort() and the like.

Additionally the change removes some usage of the non-standard C type 'intn_t' in favor of the basic C data type 'int'.

Files impacted:

inc\complib\cl_fleximap.h line #185 cl_pfn_fmap_cmp_t function returns 'int' instead of 'intn_t'.
core\al\kernel\al_ioc_pnp.c
core\al\kernel\al_pnp.c
ulp\wsd\user\ibsp_ip.c
ulp\ipoib\kernel\ipoib_port.c
ulp\ipoib\kernel\ipoib_port.cpp
ulp\wsd\user\ibspproto.h

Tested by:
  building WinOF installers for wlh, win7, wnet & wxp
  installing newly built installers.
  Running DAPL tests, IPoIB tests & opensm tests.

Signed-off-by: stan smith <stan.smith at intel.com>

--- a/inc/complib/cl_fleximap.h Fri Nov 13 14:44:15 2009
+++ b/inc/complib/cl_fleximap.h Fri Nov 13 09:50:52 2009
@@ -182,7 +182,7 @@
 *
 * SYNOPSIS
 */
-typedef intn_t
+typedef int
 (CL_API *cl_pfn_fmap_cmp_t)(
        IN      const void* const               p_key1,
        IN      const void*     const           p_key2 );

--- a/core/al/kernel/al_ioc_pnp.c       Fri Nov 13 14:42:33 2009
+++ b/core/al/kernel/al_ioc_pnp.c       Fri Nov 13 10:13:36 2009
@@ -402,12 +402,12 @@
        IN                              ioc_pnp_mgr_t* const            p_ioc_mgr,
        IN                              cl_qmap_t* const                        p_ioc_map );

-static intn_t
+static int
 __iou_cmp(
        IN              const   void* const                                     p_key1,
        IN              const   void* const                                     p_key2 );

-static intn_t
+static int
 __path_cmp(
        IN              const   void* const                                     p_key1,
        IN              const   void* const                                     p_key2 );
@@ -1121,7 +1121,7 @@
  * address of the ca_guid, which is adjacent to the node GUID of the IOU.
  * This allows for a single call to cl_memcmp.
  */
-static intn_t
+static int
 __iou_cmp(
        IN              const   void* const                                     p_key1,
        IN              const   void* const                                     p_key2 )
@@ -1133,7 +1133,7 @@
 /*
  * Compares two paths for inserts/lookups in a flexi map.
  */
-static intn_t
+static int
 __path_cmp(
        IN              const   void* const                                     p_key1,
        IN              const   void* const                                     p_key2 )

--- a/core/al/kernel/al_pnp.c   Fri Nov 13 14:43:15 2009
+++ b/core/al/kernel/al_pnp.c   Fri Nov 13 10:18:02 2009
@@ -89,7 +89,7 @@
  * address of the reg guid1, which is adjacent to the context guid2 (if exist).
  * This allows for a single call to cl_memcmp.
  */
-static intn_t
+static int
 __context_cmp128(
        IN              const   void* const                                     p_key1,
        IN              const   void* const                                     p_key2 )
@@ -102,7 +102,7 @@
  * address of the reg guid1, which is adjacent to the context guid2 (if exist).
  * This allows for a single call to cl_memcmp.
  */
-static intn_t
+static int
 __context_cmp64(
        IN              const   void* const                                     p_key1,
        IN              const   void* const                                     p_key2 )

--- a/ulp/wsd/user/ibsp_ip.c    Fri Nov 13 14:46:18 2009
+++ b/ulp/wsd/user/ibsp_ip.c    Fri Nov 13 10:21:46 2009
@@ -58,7 +58,7 @@
 };


-intn_t CL_API
+int CL_API
 ip_cmp(
        IN      const void* const               p_key1,
        IN      const void*     const           p_key2 )

--- a/ulp/wsd/user/ibspproto.h  Fri Nov 13 14:46:48 2009
+++ b/ulp/wsd/user/ibspproto.h  Fri Nov 13 10:29:19 2009
@@ -152,7 +152,7 @@
        IN                              const ib_api_status_t           status );

 /* Protos from ibsp_ip.c */
-intn_t CL_API
+int CL_API
 ip_cmp(
        IN      const void* const               p_key1,
        IN      const void*     const           p_key2 );

--- a/ulp/ipoib/kernel/ipoib_port.c     Fri Nov 13 14:44:50 2009
+++ b/ulp/ipoib/kernel/ipoib_port.c     Fri Nov 13 10:26:40 2009
@@ -476,7 +476,7 @@
        IN                              void                            *context );


-static intn_t
+static int
 __gid_cmp(
        IN              const   void* const                                     p_key1,
        IN              const   void* const                                     p_key2 )

--- a/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp  Fri Nov 13 14:45:25 2009
+++ b/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp  Fri Nov 13 14:28:40 2009
@@ -576,7 +576,7 @@
        IN                              void                            *context );


-static intn_t
+static int
 __gid_cmp(
        IN              const   void* const                                     p_key1,
        IN              const   void* const                                     p_key2 )






More information about the ofw mailing list