diff options
author | Andy Grover <andy.grover@oracle.com> | 2010-01-12 14:56:44 -0500 |
---|---|---|
committer | Andy Grover <andy.grover@oracle.com> | 2010-09-08 21:11:32 -0400 |
commit | 8690bfa17aea4c42da1bcf90a7af93d161eca624 (patch) | |
tree | 88c4c5fa63aab0c18cf13228c4b3a6f980aa74be /net/rds/iw_cm.c | |
parent | 2dc393573430f853e56e25bf4b41c34ba2aa8fd6 (diff) |
RDS: cleanup: remove "== NULL"s and "!= NULL"s in ptr comparisons
Favor "if (foo)" style over "if (foo != NULL)".
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Diffstat (limited to 'net/rds/iw_cm.c')
-rw-r--r-- | net/rds/iw_cm.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/rds/iw_cm.c b/net/rds/iw_cm.c index b5dd6ac39be8..712cf2d1f28e 100644 --- a/net/rds/iw_cm.c +++ b/net/rds/iw_cm.c | |||
@@ -257,7 +257,7 @@ static int rds_iw_setup_qp(struct rds_connection *conn) | |||
257 | * the rds_iwdev at all. | 257 | * the rds_iwdev at all. |
258 | */ | 258 | */ |
259 | rds_iwdev = ib_get_client_data(dev, &rds_iw_client); | 259 | rds_iwdev = ib_get_client_data(dev, &rds_iw_client); |
260 | if (rds_iwdev == NULL) { | 260 | if (!rds_iwdev) { |
261 | if (printk_ratelimit()) | 261 | if (printk_ratelimit()) |
262 | printk(KERN_NOTICE "RDS/IW: No client_data for device %s\n", | 262 | printk(KERN_NOTICE "RDS/IW: No client_data for device %s\n", |
263 | dev->name); | 263 | dev->name); |
@@ -292,7 +292,7 @@ static int rds_iw_setup_qp(struct rds_connection *conn) | |||
292 | ic->i_send_ring.w_nr * | 292 | ic->i_send_ring.w_nr * |
293 | sizeof(struct rds_header), | 293 | sizeof(struct rds_header), |
294 | &ic->i_send_hdrs_dma, GFP_KERNEL); | 294 | &ic->i_send_hdrs_dma, GFP_KERNEL); |
295 | if (ic->i_send_hdrs == NULL) { | 295 | if (!ic->i_send_hdrs) { |
296 | ret = -ENOMEM; | 296 | ret = -ENOMEM; |
297 | rdsdebug("ib_dma_alloc_coherent send failed\n"); | 297 | rdsdebug("ib_dma_alloc_coherent send failed\n"); |
298 | goto out; | 298 | goto out; |
@@ -302,7 +302,7 @@ static int rds_iw_setup_qp(struct rds_connection *conn) | |||
302 | ic->i_recv_ring.w_nr * | 302 | ic->i_recv_ring.w_nr * |
303 | sizeof(struct rds_header), | 303 | sizeof(struct rds_header), |
304 | &ic->i_recv_hdrs_dma, GFP_KERNEL); | 304 | &ic->i_recv_hdrs_dma, GFP_KERNEL); |
305 | if (ic->i_recv_hdrs == NULL) { | 305 | if (!ic->i_recv_hdrs) { |
306 | ret = -ENOMEM; | 306 | ret = -ENOMEM; |
307 | rdsdebug("ib_dma_alloc_coherent recv failed\n"); | 307 | rdsdebug("ib_dma_alloc_coherent recv failed\n"); |
308 | goto out; | 308 | goto out; |
@@ -310,14 +310,14 @@ static int rds_iw_setup_qp(struct rds_connection *conn) | |||
310 | 310 | ||
311 | ic->i_ack = ib_dma_alloc_coherent(dev, sizeof(struct rds_header), | 311 | ic->i_ack = ib_dma_alloc_coherent(dev, sizeof(struct rds_header), |
312 | &ic->i_ack_dma, GFP_KERNEL); | 312 | &ic->i_ack_dma, GFP_KERNEL); |
313 | if (ic->i_ack == NULL) { | 313 | if (!ic->i_ack) { |
314 | ret = -ENOMEM; | 314 | ret = -ENOMEM; |
315 | rdsdebug("ib_dma_alloc_coherent ack failed\n"); | 315 | rdsdebug("ib_dma_alloc_coherent ack failed\n"); |
316 | goto out; | 316 | goto out; |
317 | } | 317 | } |
318 | 318 | ||
319 | ic->i_sends = vmalloc(ic->i_send_ring.w_nr * sizeof(struct rds_iw_send_work)); | 319 | ic->i_sends = vmalloc(ic->i_send_ring.w_nr * sizeof(struct rds_iw_send_work)); |
320 | if (ic->i_sends == NULL) { | 320 | if (!ic->i_sends) { |
321 | ret = -ENOMEM; | 321 | ret = -ENOMEM; |
322 | rdsdebug("send allocation failed\n"); | 322 | rdsdebug("send allocation failed\n"); |
323 | goto out; | 323 | goto out; |
@@ -325,7 +325,7 @@ static int rds_iw_setup_qp(struct rds_connection *conn) | |||
325 | rds_iw_send_init_ring(ic); | 325 | rds_iw_send_init_ring(ic); |
326 | 326 | ||
327 | ic->i_recvs = vmalloc(ic->i_recv_ring.w_nr * sizeof(struct rds_iw_recv_work)); | 327 | ic->i_recvs = vmalloc(ic->i_recv_ring.w_nr * sizeof(struct rds_iw_recv_work)); |
328 | if (ic->i_recvs == NULL) { | 328 | if (!ic->i_recvs) { |
329 | ret = -ENOMEM; | 329 | ret = -ENOMEM; |
330 | rdsdebug("recv allocation failed\n"); | 330 | rdsdebug("recv allocation failed\n"); |
331 | goto out; | 331 | goto out; |
@@ -696,7 +696,7 @@ int rds_iw_conn_alloc(struct rds_connection *conn, gfp_t gfp) | |||
696 | 696 | ||
697 | /* XXX too lazy? */ | 697 | /* XXX too lazy? */ |
698 | ic = kzalloc(sizeof(struct rds_iw_connection), GFP_KERNEL); | 698 | ic = kzalloc(sizeof(struct rds_iw_connection), GFP_KERNEL); |
699 | if (ic == NULL) | 699 | if (!ic) |
700 | return -ENOMEM; | 700 | return -ENOMEM; |
701 | 701 | ||
702 | INIT_LIST_HEAD(&ic->iw_node); | 702 | INIT_LIST_HEAD(&ic->iw_node); |