Skip to contentSkip to conversation

opensm - use C99 transportable data type for pointer storage

PATCH Applied Stan C. Smith 6 participants 7 messages Nov 10, 2009 – Nov 12, 2009 3 messages not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 opensm - use C99 transportable data type for pointer storage

In order to skip the #ifndef __WIN__ around #include <stdint.h>, inttypes.h was used. 'inttypes.h' includes stdint.h and exists in the WinOF svn tree.
OFED opensm builds without problems on EL 5.3.

opensm/include/opensm/st.h +2 -1
index 30cc308..ad6c289 100644
@@ -39,6 +39,7 @@
 #define ST_INCLUDED
 
 #include <stdlib.h>
+#include <inttypes.h>
 
 #ifdef __cplusplus
 #  define BEGIN_C_DECLS extern "C" {
@@ -49,7 +50,7 @@
 #endif				/* __cplusplus */
 
 BEGIN_C_DECLS
-#define st_ptr_t unsigned long
+#define st_ptr_t uintptr_t
 typedef st_ptr_t st_data_t;
 
 #define ST_DATA_T_DEFINED

A message that is not in the archive (sent off-list or not yet received): 086F8B40ADA84EE7B6398F4761937836-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org

#2 lore raw

Hello,
Can you help me understand why this patch always seems to fall into a black hole with no feedback?

Thank you,

Stan.

Quoted 20 lines · Stan C. Smith

In order to skip the #ifndef __WIN__ around #include <stdint.h>, inttypes.h was used. 'inttypes.h' includes stdint.h and exists in the WinOF svn tree.
OFED opensm builds without problems on EL 5.3.

opensm/include/opensm/st.h +1 -0
index 30cc308..ad6c289 100644
@@ -39,6 +39,7 @@
 #define ST_INCLUDED
 
 #include <stdlib.h>
+#include <inttypes.h>
 
 #ifdef __cplusplus
 #  define BEGIN_C_DECLS extern "C" {

opensm/include/opensm/st.h line 56

Quoted 8 lines
opensm/include/opensm/st.h +1 -1
@@ -49,7 +50,7 @@
 #endif                               /* __cplusplus */
 
 BEGIN_C_DECLS
-#define st_ptr_t unsigned long
+#define st_ptr_t uintptr_t
 typedef st_ptr_t st_data_t;
 
 #define ST_DATA_T_DEFINED

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 3F6F638B8D880340AB536D29CD4C1E1912CC482F85-osO9UTpF0USkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org

#4 lore raw

RE: [ofw] RE: [PATCH] opensm - use C99 transportable data type forpointer storage

Did you send it before morning coffee or after ? :)

Maybe, because it seems obvious.
All are agree with the elimination of unnecessary #ifndef's. As to me, go ahead, commit it.

Quoted 48 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Smith, Stan
Sent: Thursday, November 12, 2009 7:32 PM
To: 'Sasha Khapyorsky'
Cc: [email protected]; [email protected]
Subject: [ofw] RE: [PATCH] opensm - use C99 transportable
data type forpointer storage

Hello,
Can you help me understand why this patch always seems to
fall into a black hole with no feedback?

Thank you,

Stan.

Quoted 2 lines · Stan C. Smith

In order to skip the #ifndef __WIN__ around #include <stdint.h>, inttypes.h was used. 'inttypes.h' includes stdint.h and

exists in the

Review

Quoted 6 lines

WinOF svn tree.
OFED opensm builds without problems on EL 5.3.

(quoted diff) +0 -0

b/opensm/include/opensm/st.h

Quoted 19 lines

index 30cc308..ad6c289 100644

opensm/include/opensm/st.h +2 -1
@@ -39,6 +39,7 @@
 #define ST_INCLUDED
 
 #include <stdlib.h>
+#include <inttypes.h>
 
 #ifdef __cplusplus
 #  define BEGIN_C_DECLS extern "C" {
@@ -49,7 +50,7 @@
 #endif                               /* __cplusplus */
 
 BEGIN_C_DECLS
-#define st_ptr_t unsigned long
+#define st_ptr_t uintptr_t
 typedef st_ptr_t st_data_t;
 
Quoted 7 lines

opensm/include/opensm/st.h line 56

Quoted 1 line
opensm/include/opensm/st.h +0 -0
 #define ST_DATA_T_DEFINED

_______________________________________________
ofw mailing list [email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 2ED289D4E09FBD4D92D911E869B97FDD01876DAA-ia22CT07NJfiMCgWhms8HQC/[email protected]

#6 lore raw

RE: [ofw] RE: [PATCH] opensm - use C99 transportable data type forpointer storage

Quoted 5 lines

Did you send it before morning coffee or after ? :)

Maybe, because it seems obvious.
All are agree with the elimination of unnecessary #ifndef's. As to me, go ahead, commit it.

It needs to be merged into the mgmt.git tree.

Quoted 11 lines
Quoted 11 lines

opensm/include/opensm/st.h line 53

Quoted 11 lines

#include <stdlib.h>

opensm/include/opensm/st.h +2 -1
+#include <inttypes.h>
 
 #ifdef __cplusplus
 #  define BEGIN_C_DECLS extern "C" {
@@ -49,7 +50,7 @@
 #endif                               /* __cplusplus */
 
 BEGIN_C_DECLS
-#define st_ptr_t unsigned long
+#define st_ptr_t uintptr_t

Does anyone know the reason for st_ptr_t at all? Why not use uintptr_t everywhere and avoid the define?

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#7 lore raw

RE: RE: [PATCH] opensm - use C99 transportable data type forpointer storage

Quoted 16 lines · Sean
Quoted 5 lines

Did you send it before morning coffee or after ? :)

Maybe, because it seems obvious.
All are agree with the elimination of unnecessary #ifndef's. As to me, go ahead, commit it.

It needs to be merged into the mgmt.git tree.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

#include <stdlib.h>

(quoted diff) +1 -0
+#include <inttypes.h>
 
 #ifdef __cplusplus
 #  define BEGIN_C_DECLS extern "C" {
@@ -49,7 +50,7 @@
 #endif                               /* __cplusplus */
 
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines

Review line 53

Quoted 3 lines
(quoted diff) +1 -1
 BEGIN_C_DECLS
-#define st_ptr_t unsigned long
+#define st_ptr_t uintptr_t

Does anyone know the reason for st_ptr_t at all? Why not use uintptr_t everywhere and avoid the define?

This is a good question. I avoided the issue due to the fact this patch has been submitted before with no feedback so KIS is the game plan for now.

Once the uintptr_t concept has been accepted, then a 2nd step would be to replace st_ptr_t with uintptr_t and remove the #define.

#8 lore raw
In reply to a message not in the archive
Quoted 2 lines · Stan

Hello,
Can you help me understand why this patch always seems to fall into a black hole with no feedback?

Bad luck and my wishes to understand what is going on there. However the second is less critical in this particular case - I can do it after applying the patch.

Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html