From patchwork Wed Oct 28 06:53:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: saurabh X-Patchwork-Id: 7506771 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E16C79F40A for ; Wed, 28 Oct 2015 06:54:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2A90A2062B for ; Wed, 28 Oct 2015 06:54:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 627CE20616 for ; Wed, 28 Oct 2015 06:54:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755291AbbJ1Gxt (ORCPT ); Wed, 28 Oct 2015 02:53:49 -0400 Received: from mail-pa0-f67.google.com ([209.85.220.67]:34536 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754774AbbJ1Gxs (ORCPT ); Wed, 28 Oct 2015 02:53:48 -0400 Received: by padda3 with SMTP id da3so27441669pad.1; Tue, 27 Oct 2015 23:53:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5B1Mwy50ll152V4ZQCZiV+DLdA/MzSwR2tuIpmW0uaA=; b=VRPd9D60jMKYrR6D0DcUEqIor0S8vmTI7IAtxURzRaP6Bu9kFne4ITiCTpCCf8xZ7F UVHvL3faD0Pd5HVSJFjf5Qa0EvwnM5e9wr46ui7VDQSaysqh7LH255LpYIOXHWrd0jLZ K7Jweb3XhUHNWLhZKtbCvm8mnl0SVtpeEoG6sQh2g1Y0hQjZ5pA/o7HXG5tIHG7XezNZ cYzCK06s8JLJazmZZahaB4idGrpNR1losLepuhgo57KIpS29TKzX0qOh3Pw2Dr2E6zJp oFTGOv4AGxUaiwx3r2Xeke9eBF6twZ4eFNmIWh+0DM8WipVpdHPFODAguyg8UiuDeECU Xs+w== X-Received: by 10.68.218.37 with SMTP id pd5mr32817361pbc.95.1446015227529; Tue, 27 Oct 2015 23:53:47 -0700 (PDT) Received: from localhost.localdomain ([122.175.75.225]) by smtp.gmail.com with ESMTPSA id nj1sm43316074pbc.2.2015.10.27.23.53.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Oct 2015 23:53:47 -0700 (PDT) From: Saurabh Sengar To: james.smart@avagotech.com, dick.kennedy@avagotech.com, JBottomley@odin.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Saurabh Sengar Subject: [PATCH] lpfc: replaced kmalloc + memset with kzalloc Date: Wed, 28 Oct 2015 12:23:39 +0530 Message-Id: <1446015219-16131-1-git-send-email-saurabh.truth@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 replacing kmalloc and memset by a single call of kzalloc Signed-off-by: Saurabh Sengar --- drivers/scsi/lpfc/lpfc_els.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 36bf58b..9729ab1 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -4990,13 +4990,12 @@ lpfc_els_rcv_rdp(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, if (RDP_NPORT_ID_SIZE != be32_to_cpu(rdp_req->nport_id_desc.length)) goto rjt_logerr; - rdp_context = kmalloc(sizeof(struct lpfc_rdp_context), GFP_KERNEL); + rdp_context = kzalloc(sizeof(struct lpfc_rdp_context), GFP_KERNEL); if (!rdp_context) { rjt_err = LSRJT_UNABLE_TPC; goto error; } - memset(rdp_context, 0, sizeof(struct lpfc_rdp_context)); cmd = &cmdiocb->iocb; rdp_context->ndlp = lpfc_nlp_get(ndlp); rdp_context->ox_id = cmd->unsli3.rcvsli3.ox_id;