From patchwork Wed Jun 4 08:52:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 4292601 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C3B7DBEEA7 for ; Wed, 4 Jun 2014 08:55:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0B8C720176 for ; Wed, 4 Jun 2014 08:55:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3181F201C8 for ; Wed, 4 Jun 2014 08:55:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751662AbaFDIzk (ORCPT ); Wed, 4 Jun 2014 04:55:40 -0400 Received: from cmexedge1.ext.emulex.com ([138.239.224.99]:35800 "EHLO CMEXEDGE1.ext.emulex.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751710AbaFDIzj (ORCPT ); Wed, 4 Jun 2014 04:55:39 -0400 Received: from CMEXHTCAS1.ad.emulex.com (138.239.115.217) by CMEXEDGE1.ext.emulex.com (138.239.224.99) with Microsoft SMTP Server (TLS) id 14.3.174.1; Wed, 4 Jun 2014 01:56:28 -0700 Received: from localhost.localdomain (10.192.201.1) by smtp.emulex.com (138.239.115.207) with Microsoft SMTP Server id 14.3.174.1; Wed, 4 Jun 2014 01:55:37 -0700 From: Selvin Xavier To: CC: , Selvin Xavier Subject: [PATCH for-next 15/15] RDMA/ocrdma: Fixing a sparse warning Date: Wed, 4 Jun 2014 14:22:46 +0530 X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1401871966-20408-15-git-send-email-selvin.xavier@emulex.com> References: <1401871966-20408-1-git-send-email-selvin.xavier@emulex.com> <1401871966-20408-2-git-send-email-selvin.xavier@emulex.com> <1401871966-20408-3-git-send-email-selvin.xavier@emulex.com> <1401871966-20408-4-git-send-email-selvin.xavier@emulex.com> <1401871966-20408-5-git-send-email-selvin.xavier@emulex.com> <1401871966-20408-6-git-send-email-selvin.xavier@emulex.com> <1401871966-20408-7-git-send-email-selvin.xavier@emulex.com> <1401871966-20408-8-git-send-email-selvin.xavier@emulex.com> <1401871966-20408-9-git-send-email-selvin.xavier@emulex.com> <1401871966-20408-10-git-send-email-selvin.xavier@emulex.com> <1401871966-20408-11-git-send-email-selvin.xavier@emulex.com> <1401871966-20408-12-git-send-email-selvin.xavier@emulex.com> <1401871966-20408-13-git-send-email-selvin.xavier@emulex.com> <1401871966-20408-14-git-send-email-selvin.xavier@emulex.com> <1401871966-20408-15-git-send-email-selvin.xavier@emulex.com> MIME-Version: 1.0 Message-ID: <16798461-18bb-4b6a-a1a0-183ecac2ad92@CMEXHTCAS1.ad.emulex.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixing the warning about the usage of plain integer as NULL pointer Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c index 105659d..a4d27c7 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c @@ -661,7 +661,7 @@ static void ocrdma_dispatch_ibevent(struct ocrdma_dev *dev, { struct ocrdma_qp *qp = NULL; struct ocrdma_cq *cq = NULL; - struct ib_event ib_evt = { 0 }; + struct ib_event ib_evt; int cq_event = 0; int qp_event = 1; int srq_event = 0; @@ -674,6 +674,8 @@ static void ocrdma_dispatch_ibevent(struct ocrdma_dev *dev, if (cqe->cqvalid_cqid & OCRDMA_AE_MCQE_CQVALID) cq = dev->cq_tbl[cqe->cqvalid_cqid & OCRDMA_AE_MCQE_CQID_MASK]; + memset(&ib_evt, 0, sizeof(ib_evt)); + ib_evt.device = &dev->ibdev; switch (type) {