Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107655632
D44533.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D44533.diff
View Options
diff --git a/sys/ofed/drivers/infiniband/core/ib_rdma_core.c b/sys/ofed/drivers/infiniband/core/ib_rdma_core.c
--- a/sys/ofed/drivers/infiniband/core/ib_rdma_core.c
+++ b/sys/ofed/drivers/infiniband/core/ib_rdma_core.c
@@ -293,8 +293,6 @@
return uobj;
}
-#define NULL_IB_UOBJECT ((struct ib_uobject *)1)
-
static int idr_add_uobj(struct ib_uobject *uobj)
{
/*
@@ -302,7 +300,7 @@
* object which isn't initialized yet. We'll replace it later on with
* the real object once we commit.
*/
- return xa_alloc(&uobj->ufile->idr, &uobj->id, NULL_IB_UOBJECT, xa_limit_32b,
+ return xa_alloc(&uobj->ufile->idr, &uobj->id, NULL, xa_limit_32b,
GFP_KERNEL);
}
@@ -325,7 +323,7 @@
* kfree() could be called at any time.
*/
uobj = xa_load(&ufile->idr, id);
- if (!uobj || uobj == NULL_IB_UOBJECT || !kref_get_unless_zero(&uobj->ref))
+ if (!uobj || !kref_get_unless_zero(&uobj->ref))
uobj = ERR_PTR(-ENOENT);
rcu_read_unlock();
return uobj;
@@ -589,7 +587,7 @@
* It will be put by remove_commit_idr_uobject()
*/
old = xa_store(&ufile->idr, uobj->id, uobj, GFP_KERNEL);
- WARN_ON(old != NULL_IB_UOBJECT);
+ WARN_ON(old != NULL);
}
static void alloc_commit_fd_uobject(struct ib_uobject *uobj)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 18, 6:10 AM (16 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15851243
Default Alt Text
D44533.diff (1 KB)
Attached To
Mode
D44533: ibcore: Remove the use of NULL_IB_OBJECT
Attached
Detach File
Event Timeline
Log In to Comment