[openib-general] [PATCH] remove the tPTR typedef
Tom Duffy
tduffy at sun.com
Mon Aug 9 12:09:55 PDT 2004
This patch removes all the uses of tPTR from Roland's branch.
Signed-by: Tom Duffy <tduffy at sun.com> with permission from Sun legal.
Index: drivers/infiniband/ulp/dapl/udapl_mod.c
===================================================================
--- drivers/infiniband/ulp/dapl/udapl_mod.c (revision 611)
+++ drivers/infiniband/ulp/dapl/udapl_mod.c (working copy)
@@ -1430,7 +1430,7 @@
tINT32 status,
tTS_IB_PORT hw_port,
struct ib_device *ca,
- struct ib_path_record *path, tPTR usr_arg)
+ struct ib_path_record *path, void *usr_arg)
{
pr_entry_t *pr_entry;
@@ -1479,7 +1479,7 @@
tUINT32 dst_addr,
tTS_IB_PORT hw_port,
struct ib_device *ca,
- struct ib_path_record *path, tPTR usr_arg)
+ struct ib_path_record *path, void *usr_arg)
{
pr_entry_t *pr_entry;
Index: drivers/infiniband/ulp/ipoib/ip2pr_priv.h
===================================================================
--- drivers/infiniband/ulp/ipoib/ip2pr_priv.h (revision 611)
+++ drivers/infiniband/ulp/ipoib/ip2pr_priv.h (working copy)
@@ -197,8 +197,8 @@
struct ip2pr_ipoib_wait {
s8 type; /* ip2pr or gid2pr */
tIP2PR_PATH_LOOKUP_ID plid; /* request identifier */
- tPTR func; /* callback function for completion */
- tPTR arg; /* user argument */
+ void *func; /* callback function for completion */
+ void *arg; /* user argument */
struct net_device *dev; /* ipoib device */
tTS_KERNEL_TIMER_STRUCT timer; /* retry timer */
u8 retry; /* retry counter */
Index: drivers/infiniband/ulp/ipoib/ip2pr_export.h
===================================================================
--- drivers/infiniband/ulp/ipoib/ip2pr_export.h (revision 611)
+++ drivers/infiniband/ulp/ipoib/ip2pr_export.h (working copy)
@@ -48,14 +48,14 @@
tTS_IB_PORT hw_port,
struct ib_device *ca,
struct ib_path_record *path,
- tPTR usr_arg);
+ void *usr_arg);
typedef s32(*tGID2PR_LOOKUP_FUNC) (tIP2PR_PATH_LOOKUP_ID plid,
s32 status,
tTS_IB_PORT hw_port,
struct ib_device *ca,
struct ib_path_record *path,
- tPTR usr_arg);
+ void *usr_arg);
/*
* address lookup initiation.
*
@@ -72,7 +72,7 @@
u8 localroute,
s32 bound_dev_if,
tIP2PR_PATH_LOOKUP_FUNC func,
- tPTR arg,
+ void *arg,
tIP2PR_PATH_LOOKUP_ID *plid);
/*
@@ -87,7 +87,7 @@
tTS_IB_GID dst_gid,
u16 pkey,
tGID2PR_LOOKUP_FUNC func,
- tPTR arg,
+ void *arg,
tIP2PR_PATH_LOOKUP_ID * plid);
s32 tsGid2prCancel(tIP2PR_PATH_LOOKUP_ID plid);
Index: drivers/infiniband/ulp/ipoib/ip2pr_link.c
===================================================================
--- drivers/infiniband/ulp/ipoib/ip2pr_link.c (revision 611)
+++ drivers/infiniband/ulp/ipoib/ip2pr_link.c (working copy)
@@ -158,7 +158,7 @@
static s32 _tsIp2prPathLookupComplete(tIP2PR_PATH_LOOKUP_ID plid,
s32 status,
struct ip2pr_path_element *path_elmt,
- tPTR funcptr, tPTR arg)
+ void *funcptr, void *arg)
{
tIP2PR_PATH_LOOKUP_FUNC func = (tIP2PR_PATH_LOOKUP_FUNC) funcptr;
TS_CHECK_NULL(func, -EINVAL);
@@ -217,7 +217,7 @@
/* ========================================================================= */
/*.._tsIp2prIpoibWaitTimeout -- timeout function for link resolution */
-static void _tsIp2prIpoibWaitTimeout(tPTR arg)
+static void _tsIp2prIpoibWaitTimeout(void *arg)
{
struct ip2pr_ipoib_wait *ipoib_wait = (struct ip2pr_ipoib_wait *)arg;
s32 result;
@@ -301,7 +301,7 @@
static struct ip2pr_ipoib_wait *
_tsIp2prIpoibWaitCreate(tIP2PR_PATH_LOOKUP_ID plid, u32 dst_addr, u32 src_addr,
u8 localroute, u32 bound_dev_if,
- tIP2PR_PATH_LOOKUP_FUNC func, tPTR arg, s32 ltype)
+ tIP2PR_PATH_LOOKUP_FUNC func, void *arg, s32 ltype)
{
struct ip2pr_ipoib_wait *ipoib_wait;
@@ -329,7 +329,7 @@
ipoib_wait->bound_dev = bound_dev_if;
ipoib_wait->gw_addr = 0;
ipoib_wait->arg = arg;
- ipoib_wait->func = (tPTR) func;
+ ipoib_wait->func = (void *) func;
ipoib_wait->plid = plid;
ipoib_wait->dev = 0;
ipoib_wait->retry = _tsIp2prLinkRoot.max_retries;
@@ -728,7 +728,7 @@
/*.._tsIp2prPathRecordComplete -- path lookup complete, save result */
static s32 _tsIp2prPathRecordComplete(tTS_IB_CLIENT_QUERY_TID tid, s32 status,
struct ib_path_record *path,
- s32 remaining, tPTR arg)
+ s32 remaining, void *arg)
{
struct ip2pr_ipoib_wait *ipoib_wait = (struct ip2pr_ipoib_wait *) arg;
struct ip2pr_path_element *path_elmt = NULL;
@@ -1227,7 +1227,7 @@
/* --------------------------------------------------------------------- */
/* ========================================================================= */
/*.._tsIp2prArpRecvComplete -- receive all ARP packets. */
-static void _tsIp2prArpRecvComplete(tPTR arg)
+static void _tsIp2prArpRecvComplete(void *arg)
{
struct ip2pr_ipoib_wait *ipoib_wait;
struct ip2pr_ipoib_wait *next_wait;
@@ -1437,7 +1437,7 @@
/* ========================================================================= */
/*.._tsIp2prPathSweepTimerFunc --sweep path cache to reap old entries. */
-static void _tsIp2prPathSweepTimerFunc(tPTR arg)
+static void _tsIp2prPathSweepTimerFunc(void *arg)
{
struct ip2pr_path_element *path_elmt;
struct ip2pr_path_element *next_elmt;
@@ -1510,7 +1510,7 @@
/*..tsSdpPathRecordLookup -- resolve an ip address to a path record */
s32 tsIp2prPathRecordLookup(u32 dst_addr, u32 src_addr, u8 localroute,
s32 bound_dev_if, tIP2PR_PATH_LOOKUP_FUNC func,
- tPTR arg, tIP2PR_PATH_LOOKUP_ID * plid)
+ void *arg, tIP2PR_PATH_LOOKUP_ID * plid)
{
struct ip2pr_path_element *path_elmt;
struct ip2pr_ipoib_wait *ipoib_wait;
@@ -1908,7 +1908,7 @@
/*.._tsGid2prComplete -- path lookup complete, save result */
static s32 _tsGid2prComplete(tTS_IB_CLIENT_QUERY_TID tid, s32 status,
struct ib_path_record *path, s32 remaining,
- tPTR arg)
+ void *arg)
{
s32 result;
struct ip2pr_ipoib_wait *ipoib_wait = (struct ip2pr_ipoib_wait *) arg;
@@ -1971,7 +1971,7 @@
/* ========================================================================= */
/*..tsGid2prLookup -- Resolve a destination GD to Path Record */
s32 tsGid2prLookup(tTS_IB_GID src_gid, tTS_IB_GID dst_gid, u16 pkey,
- tGID2PR_LOOKUP_FUNC funcptr, tPTR arg,
+ tGID2PR_LOOKUP_FUNC funcptr, void *arg,
tIP2PR_PATH_LOOKUP_ID * plid)
{
struct ip2pr_sgid_element *gid_node;
@@ -2016,7 +2016,7 @@
0,
0,
0,
- (tPTR) funcptr,
+ (void *) funcptr,
arg, LOOKUP_GID2PR);
if (NULL == ipoib_wait) {
@@ -2361,7 +2361,7 @@
static s32 _tsIp2prCbInternal(tIP2PR_PATH_LOOKUP_ID plid, s32 status,
u32 src_addr, u32 dst_addr, tTS_IB_PORT hw_port,
struct ib_device *ca, struct ib_path_record *path,
- tPTR usr_arg)
+ void *usr_arg)
{
struct ip2pr_user_req *ureq;
@@ -2384,7 +2384,7 @@
/*..tsIp2prCbInternal -- Callback for Gid to Path Record Lookup */
static s32 _tsGid2prCbInternal(tIP2PR_PATH_LOOKUP_ID plid, s32 status,
tTS_IB_PORT hw_port, struct ib_device *ca,
- struct ib_path_record *path, tPTR usr_arg)
+ struct ib_path_record *path, void *usr_arg)
{
struct ip2pr_user_req *ureq;
@@ -2487,7 +2487,7 @@
ureq->status = 0;
sema_init(&ureq->sem, 0);
status = tsGid2prLookup(param.src_gid, param.dst_gid, param.pkey,
- _tsGid2prCbInternal, (tPTR) ureq, &plid);
+ _tsGid2prCbInternal, (void *) ureq, &plid);
if (status < 0) {
kmem_cache_free(_tsIp2prLinkRoot.user_req, ureq);
return (-EFAULT);
Index: drivers/infiniband/ulp/ipoib/ip2pr_proc.c
===================================================================
--- drivers/infiniband/ulp/ipoib/ip2pr_proc.c (revision 611)
+++ drivers/infiniband/ulp/ipoib/ip2pr_proc.c (working copy)
@@ -87,7 +87,7 @@
/* ========================================================================= */
/*.._tsIp2prProcReadParse -- read function for the injection table */
static s32 _tsIp2prProcReadParse(char *page, char **start, off_t offset,
- s32 count, s32 *eof, tPTR data)
+ s32 count, s32 *eof, void *data)
{
struct ip2pr_proc_sub_entry *sub_entry =
(struct ip2pr_proc_sub_entry *) data;
Index: drivers/infiniband/include/ib_legacy_types.h
===================================================================
--- drivers/infiniband/include/ib_legacy_types.h (revision 611)
+++ drivers/infiniband/include/ib_legacy_types.h (working copy)
@@ -193,7 +193,6 @@
typedef tUINT8 tSLOT; /* 1 based value */
typedef tUINT8 tCPU; /* 1 based value */
typedef tUINT8 tPORT;
-typedef void * tPTR;
typedef const void * tCONST_PTR;
typedef const char * tCONST_STR;
typedef tUINT32 tIFINDEX;
Index: drivers/infiniband/core/useraccess_cm.c
===================================================================
--- drivers/infiniband/core/useraccess_cm.c (revision 611)
+++ drivers/infiniband/core/useraccess_cm.c (working copy)
@@ -501,7 +501,7 @@
tTS_IB_PORT hw_port,
struct ib_device *ca,
struct ib_path_record *path,
- tPTR usr_arg)
+ void *usr_arg)
{
struct pathrecordlookup *prl = (struct pathrecordlookup *)usr_arg;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20040809/f58b6541/attachment.sig>
More information about the general
mailing list