From: Sasha Khapyorsky <sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org>
To: linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
"Smith,
Stan" <stan.smith-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
ofw-ZwoEplunGu1OwGhvXhtEPSCwEArCW2h5@public.gmane.org
Subject: [PATCH] complib: replace intn_t types by C99 intptr_t
Date: Fri, 13 Nov 2009 18:06:26 +0200 [thread overview]
Message-ID: <20091113160626.GQ7192@me> (raw)
In-Reply-To: <20091112202257.GR7192@me>
Use C99 standard pointer size integer types intptr_t and uintptr_t
instead of privately defined intn_t and uintn_t.
Signed-off-by: Sasha Khapyorsky <sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org>
---
opensm/complib/cl_pool.c | 2 +-
opensm/include/complib/cl_types.h | 12 ++----------
opensm/include/complib/cl_types_osd.h | 5 +----
3 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/opensm/complib/cl_pool.c b/opensm/complib/cl_pool.c
index 1f66284..5a8d637 100644
--- a/opensm/complib/cl_pool.c
+++ b/opensm/complib/cl_pool.c
@@ -128,7 +128,7 @@ cl_status_t cl_qcpool_init(IN cl_qcpool_t * const p_pool,
* are aligned on a natural boundary.
*/
p_pool->component_sizes[i] =
- ROUNDUP(p_pool->component_sizes[i], sizeof(uintn_t));
+ ROUNDUP(p_pool->component_sizes[i], sizeof(uintptr_t));
}
p_pool->max_objects = max_size ? max_size : ~(size_t) 0;
diff --git a/opensm/include/complib/cl_types.h b/opensm/include/complib/cl_types.h
index 84f629d..2891c6b 100644
--- a/opensm/include/complib/cl_types.h
+++ b/opensm/include/complib/cl_types.h
@@ -89,7 +89,7 @@ typedef uint64_t net64_t;
* The offsetof macro returns the offset of a member within a structure.
*
* SYNOPSIS
-* uintn_t
+* uintptr_t
* offsetof(
* IN TYPE,
* IN MEMBER );
@@ -110,7 +110,7 @@ typedef uint64_t net64_t;
* PARENT_STRUCT
*********/
#ifndef offsetof
-#define offsetof(TYPE, MEMBER) ((uintn_t) &((TYPE *)0)->MEMBER)
+#define offsetof(TYPE, MEMBER) ((uintptr_t) &((TYPE *)0)->MEMBER)
#endif
/****d* Component Library: Pointer Manipulation/PARENT_STRUCT
@@ -245,14 +245,6 @@ typedef uint64_t net64_t;
* net64_t
* 64-bit network byte order value.
*
-* intn_t
-* Signed natural sized integer. 32-bit on a 32-bit platform, 64-bit on
-* a 64-bit platform.
-*
-* uintn_t
-* Unsigned natural sized integer. 32-bit on a 32-bit platform, 64-bit on
-* a 64-bit platform.
-*
* boolean_t
* integral sized. Set to TRUE or FALSE and used in logical expressions.
*
diff --git a/opensm/include/complib/cl_types_osd.h b/opensm/include/complib/cl_types_osd.h
index d12aa4c..7c6e51d 100644
--- a/opensm/include/complib/cl_types_osd.h
+++ b/opensm/include/complib/cl_types_osd.h
@@ -37,8 +37,7 @@
* Abstract:
* Defines sized datatypes for Linux User mode
* exported sizes are int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t
- * int64_t, uint64_t. uintn_t is a polymorphic type, size is native size and
- * also size of the pointer.
+ * int64_t, uint64_t.
*/
#ifndef _CL_TYPES_OSD_H_
@@ -73,8 +72,6 @@ BEGIN_C_DECLS
/*
* Types not explicitly defined are native to the platform.
*/
-typedef unsigned long uintn_t;
-typedef long intn_t;
typedef int boolean_t;
typedef volatile int32_t atomic32_t;
--
1.6.5.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2009-11-13 16:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-01 21:35 [PATCH] osm_subnet.c Smith, Stan
2009-10-04 0:13 ` Sasha Khapyorsky
2009-10-05 16:09 ` Smith, Stan
[not found] ` <3F6F638B8D880340AB536D29CD4C1E1912C8783C0D-osO9UTpF0USkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2009-11-12 19:35 ` Sasha Khapyorsky
2009-10-05 16:20 ` Sean Hefty
2009-11-12 19:18 ` Sasha Khapyorsky
2009-11-12 19:23 ` [ofw] " Sean Hefty
[not found] ` <81D21ED9D6F34BC1B7DA64F50EE5A7DD-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2009-11-12 20:21 ` [PATCH] opensm: cleanup intn_t uses Sasha Khapyorsky
2009-11-12 20:22 ` [PATCH] complib/fleximap: make compar callback to return int Sasha Khapyorsky
2009-11-13 16:06 ` Sasha Khapyorsky [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091113160626.GQ7192@me \
--to=sashak-smomgflxvozwk0htik3j/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ofw-ZwoEplunGu1OwGhvXhtEPSCwEArCW2h5@public.gmane.org \
--cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=stan.smith-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox