From patchwork Thu Oct 13 19:56:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 9375677 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B7CB9607FD for ; Thu, 13 Oct 2016 19:57:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AFB9E2A1A7 for ; Thu, 13 Oct 2016 19:57:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4C192A1AA; Thu, 13 Oct 2016 19:57:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29BD22A1A7 for ; Thu, 13 Oct 2016 19:57:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754956AbcJMT5X (ORCPT ); Thu, 13 Oct 2016 15:57:23 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:40261 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755317AbcJMT5L (ORCPT ); Thu, 13 Oct 2016 15:57:11 -0400 Received: from [83.175.99.196] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.85_2 #1 (Red Hat Linux)) id 1bum7X-0000xf-Ll for linux-rdma@vger.kernel.org; Thu, 13 Oct 2016 19:56:52 +0000 From: Christoph Hellwig To: linux-rdma@vger.kernel.org Subject: [PATCH 11/17] ocrdma: use NULL instead of 0 for NULL pointers Date: Thu, 13 Oct 2016 21:56:10 +0200 Message-Id: <1476388576-22863-12-git-send-email-hch@lst.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1476388576-22863-1-git-send-email-hch@lst.de> References: <1476388576-22863-1-git-send-email-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Christoph Hellwig --- providers/ocrdma/ocrdma_verbs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/providers/ocrdma/ocrdma_verbs.c b/providers/ocrdma/ocrdma_verbs.c index c5dd74b..7e066dc 100644 --- a/providers/ocrdma/ocrdma_verbs.c +++ b/providers/ocrdma/ocrdma_verbs.c @@ -455,7 +455,7 @@ int ocrdma_destroy_srq(struct ibv_srq *ibsrq) free(srq->rqe_wr_id_tbl); if (srq->db_va) { munmap((void *)srq->db_va, srq->db_size); - srq->db_va = 0; + srq->db_va = NULL; } if (srq->rq.va) { munmap(srq->rq.va, srq->rq.len); @@ -591,7 +591,7 @@ struct ibv_qp *ocrdma_create_qp(struct ibv_pd *pd, } else { if (qp->dpp_cq) { ocrdma_destroy_cq(&qp->dpp_cq->ibv_cq); - qp->dpp_cq = 0; + qp->dpp_cq = NULL; } } qp->state = OCRDMA_QPS_RST; @@ -1789,7 +1789,7 @@ static void ocrdma_update_free_srq_cqe(struct ibv_wc *ibwc, struct ocrdma_cqe *cqe, struct ocrdma_qp *qp) { - struct ocrdma_srq *srq = 0; + struct ocrdma_srq *srq = NULL; uint32_t wqe_idx; srq = get_ocrdma_srq(qp->ibv_qp.srq);