aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/send.c
diff options
context:
space:
mode:
authorAndy Grover <andy.grover@oracle.com>2010-01-12 14:56:44 -0500
committerAndy Grover <andy.grover@oracle.com>2010-09-08 21:11:32 -0400
commit8690bfa17aea4c42da1bcf90a7af93d161eca624 (patch)
tree88c4c5fa63aab0c18cf13228c4b3a6f980aa74be /net/rds/send.c
parent2dc393573430f853e56e25bf4b41c34ba2aa8fd6 (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/send.c')
-rw-r--r--net/rds/send.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/rds/send.c b/net/rds/send.c
index 725fb0419797..817997daf785 100644
--- a/net/rds/send.c
+++ b/net/rds/send.c
@@ -164,7 +164,7 @@ int rds_send_xmit(struct rds_connection *conn)
164 * offset and S/G temporaries. 164 * offset and S/G temporaries.
165 */ 165 */
166 rm = conn->c_xmit_rm; 166 rm = conn->c_xmit_rm;
167 if (rm != NULL && 167 if (rm &&
168 conn->c_xmit_hdr_off == sizeof(struct rds_header) && 168 conn->c_xmit_hdr_off == sizeof(struct rds_header) &&
169 conn->c_xmit_sg == rm->m_nents) { 169 conn->c_xmit_sg == rm->m_nents) {
170 conn->c_xmit_rm = NULL; 170 conn->c_xmit_rm = NULL;
@@ -180,8 +180,8 @@ int rds_send_xmit(struct rds_connection *conn)
180 180
181 /* If we're asked to send a cong map update, do so. 181 /* If we're asked to send a cong map update, do so.
182 */ 182 */
183 if (rm == NULL && test_and_clear_bit(0, &conn->c_map_queued)) { 183 if (!rm && test_and_clear_bit(0, &conn->c_map_queued)) {
184 if (conn->c_trans->xmit_cong_map != NULL) { 184 if (conn->c_trans->xmit_cong_map) {
185 conn->c_map_offset = 0; 185 conn->c_map_offset = 0;
186 conn->c_map_bytes = sizeof(struct rds_header) + 186 conn->c_map_bytes = sizeof(struct rds_header) +
187 RDS_CONG_MAP_BYTES; 187 RDS_CONG_MAP_BYTES;
@@ -204,7 +204,7 @@ int rds_send_xmit(struct rds_connection *conn)
204 * the connction. We can use this ref while holding the 204 * the connction. We can use this ref while holding the
205 * send_sem.. rds_send_reset() is serialized with it. 205 * send_sem.. rds_send_reset() is serialized with it.
206 */ 206 */
207 if (rm == NULL) { 207 if (!rm) {
208 unsigned int len; 208 unsigned int len;
209 209
210 spin_lock_irqsave(&conn->c_lock, flags); 210 spin_lock_irqsave(&conn->c_lock, flags);
@@ -224,7 +224,7 @@ int rds_send_xmit(struct rds_connection *conn)
224 224
225 spin_unlock_irqrestore(&conn->c_lock, flags); 225 spin_unlock_irqrestore(&conn->c_lock, flags);
226 226
227 if (rm == NULL) { 227 if (!rm) {
228 was_empty = 1; 228 was_empty = 1;
229 break; 229 break;
230 } 230 }
@@ -875,7 +875,7 @@ int rds_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
875 goto out; 875 goto out;
876 876
877 if ((rm->m_rdma_cookie || rm->m_rdma_op) && 877 if ((rm->m_rdma_cookie || rm->m_rdma_op) &&
878 conn->c_trans->xmit_rdma == NULL) { 878 !conn->c_trans->xmit_rdma) {
879 if (printk_ratelimit()) 879 if (printk_ratelimit())
880 printk(KERN_NOTICE "rdma_op %p conn xmit_rdma %p\n", 880 printk(KERN_NOTICE "rdma_op %p conn xmit_rdma %p\n",
881 rm->m_rdma_op, conn->c_trans->xmit_rdma); 881 rm->m_rdma_op, conn->c_trans->xmit_rdma);
@@ -961,7 +961,7 @@ rds_send_pong(struct rds_connection *conn, __be16 dport)
961 int ret = 0; 961 int ret = 0;
962 962
963 rm = rds_message_alloc(0, GFP_ATOMIC); 963 rm = rds_message_alloc(0, GFP_ATOMIC);
964 if (rm == NULL) { 964 if (!rm) {
965 ret = -ENOMEM; 965 ret = -ENOMEM;
966 goto out; 966 goto out;
967 } 967 }