aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/hw/amso1100/c2_vq.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/amso1100/c2_vq.c b/drivers/infiniband/hw/amso1100/c2_vq.c
index 9ce7819b7b2e..2ec716fb2edb 100644
--- a/drivers/infiniband/hw/amso1100/c2_vq.c
+++ b/drivers/infiniband/hw/amso1100/c2_vq.c
@@ -107,7 +107,7 @@ struct c2_vq_req *vq_req_alloc(struct c2_dev *c2dev)
107 r = kmalloc(sizeof(struct c2_vq_req), GFP_KERNEL); 107 r = kmalloc(sizeof(struct c2_vq_req), GFP_KERNEL);
108 if (r) { 108 if (r) {
109 init_waitqueue_head(&r->wait_object); 109 init_waitqueue_head(&r->wait_object);
110 r->reply_msg = (u64) NULL; 110 r->reply_msg = 0;
111 r->event = 0; 111 r->event = 0;
112 r->cm_id = NULL; 112 r->cm_id = NULL;
113 r->qp = NULL; 113 r->qp = NULL;
@@ -123,7 +123,7 @@ struct c2_vq_req *vq_req_alloc(struct c2_dev *c2dev)
123 */ 123 */
124void vq_req_free(struct c2_dev *c2dev, struct c2_vq_req *r) 124void vq_req_free(struct c2_dev *c2dev, struct c2_vq_req *r)
125{ 125{
126 r->reply_msg = (u64) NULL; 126 r->reply_msg = 0;
127 if (atomic_dec_and_test(&r->refcnt)) { 127 if (atomic_dec_and_test(&r->refcnt)) {
128 kfree(r); 128 kfree(r);
129 } 129 }
@@ -151,7 +151,7 @@ void vq_req_get(struct c2_dev *c2dev, struct c2_vq_req *r)
151void vq_req_put(struct c2_dev *c2dev, struct c2_vq_req *r) 151void vq_req_put(struct c2_dev *c2dev, struct c2_vq_req *r)
152{ 152{
153 if (atomic_dec_and_test(&r->refcnt)) { 153 if (atomic_dec_and_test(&r->refcnt)) {
154 if (r->reply_msg != (u64) NULL) 154 if (r->reply_msg != 0)
155 vq_repbuf_free(c2dev, 155 vq_repbuf_free(c2dev,
156 (void *) (unsigned long) r->reply_msg); 156 (void *) (unsigned long) r->reply_msg);
157 kfree(r); 157 kfree(r);