[openib-general] [PATCH] remove the tSTR typedef

Tom Duffy Tom.Duffy at Sun.COM
Fri Aug 6 14:04:43 PDT 2004


This patch removes all the uses of tSTR from Roland's branch.

Signed-by: Tom Duffy <tduffy at sun.com> with permission from Sun legal.

Index: drivers/infiniband/ulp/dapl/khash.c
===================================================================
--- drivers/infiniband/ulp/dapl/khash.c	(revision 594)
+++ drivers/infiniband/ulp/dapl/khash.c	(working copy)
@@ -348,7 +348,7 @@
 tINT32 DaplHashTableDump
     (DAPL_HASH_TABLE table,
      DAPL_HASH_DUMP_FUNC dfunc,
-     tSTR buffer, tINT32 max_size, tINT32 start, tINT32 * end) {
+     char *buffer, tINT32 max_size, tINT32 start, tINT32 * end) {
 	DAPL_HASH_BUCKET bucket;
 	tINT32 offset = 0;
 	tINT32 elements;
Index: drivers/infiniband/ulp/dapl/khash.h
===================================================================
--- drivers/infiniband/ulp/dapl/khash.h	(revision 594)
+++ drivers/infiniband/ulp/dapl/khash.h	(working copy)
@@ -39,7 +39,7 @@
  * bytes written into buffer, a negative return means that data will not
  * fit into max_size bytes.
  */
-typedef tINT32(*DAPL_HASH_DUMP_FUNC) (tSTR buffer,
+typedef tINT32(*DAPL_HASH_DUMP_FUNC) (char *buffer,
 				      tINT32 max_size,
 				      char *key, tUINT32 value);
 /*
@@ -77,7 +77,7 @@
 
 tINT32 DaplHashTableDump(DAPL_HASH_TABLE table,
 			 DAPL_HASH_DUMP_FUNC dfunc,
-			 tSTR buffer,
+			 char *buffer,
 			 tINT32 max_size, tINT32 start, tINT32 * end);
 
 #endif				/* _KHASH_H */
Index: drivers/infiniband/ulp/ipoib/ip2pr_link.c
===================================================================
--- drivers/infiniband/ulp/ipoib/ip2pr_link.c	(revision 594)
+++ drivers/infiniband/ulp/ipoib/ip2pr_link.c	(working copy)
@@ -410,7 +410,7 @@
 
 /* ========================================================================= */
 /*..tsIp2prPathElementTableDump - dump the path record element table to proc */
-s32 tsIp2prPathElementTableDump(tSTR buffer, s32 max_size, s32 start_index,
+s32 tsIp2prPathElementTableDump(char *buffer, s32 max_size, s32 start_index,
 				long *end_index)
 {
 	struct ip2pr_path_element *path_elmt;
@@ -480,7 +480,7 @@
 /* ========================================================================= */
 /*..tsIp2prIpoibWaitTableDump - dump the address resolution wait table to proc */
 s32
-tsIp2prIpoibWaitTableDump(tSTR buffer, s32 max_size, s32 start_index,
+tsIp2prIpoibWaitTableDump(char *buffer, s32 max_size, s32 start_index,
 			  long *end_index)
 {
 	struct ip2pr_ipoib_wait *ipoib_wait;
@@ -538,7 +538,7 @@
 }				/* tsIp2prIpoibWaitTableDump */
 
 /* ..tsIp2prProcReadInt. dump integer value to /proc file */
-s32 tsIp2prProcReadInt(tSTR buffer, s32 max_size, s32 start_index,
+s32 tsIp2prProcReadInt(char *buffer, s32 max_size, s32 start_index,
 		       long *end_index, int val)
 {
 	s32 offset = 0;
@@ -554,7 +554,7 @@
 }
 
 /* ..tsIp2prProcMaxRetriesRead. dump current retry value */
-s32 tsIp2prProcRetriesRead(tSTR buffer, s32 max_size, s32 start_index,
+s32 tsIp2prProcRetriesRead(char *buffer, s32 max_size, s32 start_index,
 			   long *end_index)
 {
 
@@ -565,7 +565,7 @@
 }
 
 /* ..tsIp2prProcTimeoutRead. dump current timeout value */
-s32 tsIp2prProcTimeoutRead(tSTR buffer, s32 max_size, s32 start_index,
+s32 tsIp2prProcTimeoutRead(char *buffer, s32 max_size, s32 start_index,
 			   long *end_index)
 {
 
@@ -576,7 +576,7 @@
 }
 
 /* ..tsIp2prProcBackoutRead. dump current backout value */
-s32 tsIp2prProcBackoffRead(tSTR buffer, s32 max_size, s32 start_index,
+s32 tsIp2prProcBackoffRead(char *buffer, s32 max_size, s32 start_index,
 			   long *end_index)
 {
 
@@ -587,7 +587,7 @@
 }
 
 /* ..tsIp2prProcCacheTimeoutRead. dump current cache timeout value */
-s32 tsIp2prProcCacheTimeoutRead(tSTR buffer, s32 max_size, s32 start_index,
+s32 tsIp2prProcCacheTimeoutRead(char *buffer, s32 max_size, s32 start_index,
 				long *end_index)
 {
 
@@ -598,7 +598,7 @@
 }
 
 /* ..tsIp2prProcMaxRetriesRead. dump current retry value */
-s32 tsIp2prProcTotalReq(tSTR buffer, s32 max_size, s32 start_index,
+s32 tsIp2prProcTotalReq(char *buffer, s32 max_size, s32 start_index,
 			long *end_index)
 {
 
@@ -608,7 +608,7 @@
 }
 
 /* ..tsIp2prProcMaxRetriesRead. dump current retry value */
-s32 tsIp2prProcArpTimeout(tSTR buffer, s32 max_size, s32 start_index,
+s32 tsIp2prProcArpTimeout(char *buffer, s32 max_size, s32 start_index,
 			  long *end_index)
 {
 
@@ -618,7 +618,7 @@
 }
 
 /* ..tsIp2prProcMaxRetriesRead. dump current retry value */
-s32 tsIp2prProcPathTimeout(tSTR buffer, s32 max_size, s32 start_index,
+s32 tsIp2prProcPathTimeout(char *buffer, s32 max_size, s32 start_index,
 			   long *end_index)
 {
 
@@ -628,7 +628,7 @@
 }
 
 /* ..tsIp2prProcMaxRetriesRead. dump current retry value */
-s32 tsIp2prProcTotalFail(tSTR buffer, s32 max_size, s32 start_index,
+s32 tsIp2prProcTotalFail(char *buffer, s32 max_size, s32 start_index,
 			 long *end_index)
 {
 
Index: drivers/infiniband/ulp/ipoib/ip2pr_proc.c
===================================================================
--- drivers/infiniband/ulp/ipoib/ip2pr_proc.c	(revision 594)
+++ drivers/infiniband/ulp/ipoib/ip2pr_proc.c	(working copy)
@@ -26,27 +26,27 @@
 static const char _dir_name_root[] = TS_IP2PR_PROC_DIR_NAME;
 static struct proc_dir_entry *_dir_root = NULL;
 
-extern s32 tsIp2prPathElementTableDump(tSTR buffer,
+extern s32 tsIp2prPathElementTableDump(char *buffer,
 				       s32 max_size,
 				       s32 start_index,
 				       long *end_index);
-extern s32 tsIp2prIpoibWaitTableDump(tSTR buffer,
+extern s32 tsIp2prIpoibWaitTableDump(char *buffer,
 				     s32 max_size,
 				     s32 start_index,
 				     long *end_index);
-extern s32 tsIp2prProcRetriesRead(tSTR buffer,
+extern s32 tsIp2prProcRetriesRead(char *buffer,
 				  s32 max_size,
 				  s32 start_index,
 				  long *end_index);
-extern s32 tsIp2prProcTimeoutRead(tSTR buffer,
+extern s32 tsIp2prProcTimeoutRead(char *buffer,
 				  s32 max_size,
 				  s32 start_index,
 				  long *end_index);
-extern s32 tsIp2prProcBackoffRead(tSTR buffer,
+extern s32 tsIp2prProcBackoffRead(char *buffer,
 				  s32 max_size,
 				  s32 start_index,
 				  long *end_index);
-extern s32 tsIp2prProcCacheTimeoutRead(tSTR buffer,
+extern s32 tsIp2prProcCacheTimeoutRead(char *buffer,
 				       s32 max_size,
 				       s32 start_index,
 				       long *end_index);
@@ -67,19 +67,19 @@
 					unsigned long count,
 					void *pos);
 
-extern int tsIp2prProcTotalReq(tSTR buffer,
+extern int tsIp2prProcTotalReq(char *buffer,
 			       s32 max_size,
 			       s32 start_index,
 			       long *end_index);
-extern int tsIp2prProcArpTimeout(tSTR buffer,
+extern int tsIp2prProcArpTimeout(char *buffer,
 				 s32 max_size,
 				 s32 start_index,
 				 long *end_index);
-extern int tsIp2prProcPathTimeout(tSTR buffer,
+extern int tsIp2prProcPathTimeout(char *buffer,
 				  s32 max_size,
 				  s32 start_index,
 				  long *end_index);
-extern int tsIp2prProcTotalFail(tSTR buffer,
+extern int tsIp2prProcTotalFail(char *buffer,
 				s32 max_size,
 				s32 start_index,
 				long *end_index);
@@ -213,11 +213,11 @@
 	 * XXX still need to check this:
 	 * validate some assumptions the write parser will be making.
 	 */
-	if (0 && sizeof(s32) != sizeof(tSTR)) {
+	if (0 && sizeof(s32) != sizeof(char *)) {
 
 		TS_TRACE(MOD_IP2PR, T_TERSE, TRACE_FLOW_FATAL,
 			 "PROC: integers and pointers of a different size. <%d:%d>",
-			 sizeof(s32), sizeof(tSTR));
+			 sizeof(s32), sizeof(char *));
 		return -EFAULT;
 	}
 	/* if */
Index: drivers/infiniband/ulp/ipoib/ip2pr_proc.h
===================================================================
--- drivers/infiniband/ulp/ipoib/ip2pr_proc.h	(revision 594)
+++ drivers/infiniband/ulp/ipoib/ip2pr_proc.h	(working copy)
@@ -30,13 +30,13 @@
 /* --------------------------------------------------------------------- */
 /* read callback prototype.                                              */
 /* --------------------------------------------------------------------- */
-typedef s32(*tIP2PR_PROC_READ_CB_FUNC) (tSTR buffer,
+typedef s32(*tIP2PR_PROC_READ_CB_FUNC) (char *buffer,
 					s32 max_size,
 					s32 start,
 					long *end);
 
 struct ip2pr_proc_sub_entry {
-	tSTR name;
+	char *name;
 	s32 type;
 	struct proc_dir_entry *entry;
 	tIP2PR_PROC_READ_CB_FUNC read;
@@ -74,14 +74,14 @@
 	s16 type;
 	union {
 		s32 i;
-		tSTR s;
+		char *s;
 	} value;
 };
 
 struct ip2pr_proc_entry_parse {
 	s16 id;
 	s16 type;
-	tSTR value;
+	char *value;
 };
 
 #endif				/* _TS_IP2PR_PROC_H */
Index: drivers/infiniband/ulp/sdp/sdp_proc.c
===================================================================
--- drivers/infiniband/ulp/sdp/sdp_proc.c	(revision 594)
+++ drivers/infiniband/ulp/sdp/sdp_proc.c	(working copy)
@@ -352,11 +352,11 @@
 	 * XXX still need to check this:
 	 * validate some assumptions the write parser will be making.
 	 */
-	if (0 && sizeof(tINT32) != sizeof(tSTR)) {
+	if (0 && sizeof(tINT32) != sizeof(char *)) {
 
 		TS_TRACE(MOD_LNX_SDP, T_TERSE, TRACE_FLOW_FATAL,
 			 "PROC: integers and pointers of a different size. <%d:%d>",
-			 sizeof(tINT32), sizeof(tSTR));
+			 sizeof(tINT32), sizeof(char *));
 		return -EFAULT;
 	}
 
Index: drivers/infiniband/include/ib_legacy_types.h
===================================================================
--- drivers/infiniband/include/ib_legacy_types.h	(revision 594)
+++ drivers/infiniband/include/ib_legacy_types.h	(working copy)
@@ -195,7 +195,6 @@
 typedef tUINT8			tPORT;
 typedef void *                  tPTR;
 typedef const void *            tCONST_PTR;
-typedef char *                  tSTR;
 typedef const char *            tCONST_STR;
 typedef tUINT32			tIFINDEX;
 





More information about the general mailing list