Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934222AbdHYQLo (ORCPT ); Fri, 25 Aug 2017 12:11:44 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35755 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933814AbdHYQLm (ORCPT ); Fri, 25 Aug 2017 12:11:42 -0400 From: Himanshu Jha To: selvin.xavier@broadcom.com Cc: devesh.sharma@broadcom.com, somnath.kotur@broadcom.com, dledford@redhat.com, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Himanshu Jha Subject: [PATCH] RDMA/bnxt_re: remove unnecessary call to memset Date: Fri, 25 Aug 2017 21:41:02 +0530 Message-Id: <1503677462-24238-1-git-send-email-himanshujha199640@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 931 Lines: 31 call to memset to assign 0 value immediately after allocating memory with kzalloc is unnecesaary as kzalloc allocates the memory filled with 0 value. Signed-off-by: Himanshu Jha --- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c index f0e01b3..fa6fbac 100644 --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c @@ -969,7 +969,6 @@ static struct bnxt_re_ah *bnxt_re_create_shadow_qp_ah if (!ah) return NULL; - memset(ah, 0, sizeof(*ah)); ah->rdev = rdev; ah->qplib_ah.pd = &pd->qplib_pd; @@ -1016,7 +1015,6 @@ static struct bnxt_re_qp *bnxt_re_create_shadow_qp if (!qp) return NULL; - memset(qp, 0, sizeof(*qp)); qp->rdev = rdev; /* Initialize the shadow QP structure from the QP1 values */ -- 2.7.4