From patchwork Thu Nov 19 07:34:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: saurabh X-Patchwork-Id: 7655621 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 899959F2EC for ; Thu, 19 Nov 2015 07:34:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C4C64205FF for ; Thu, 19 Nov 2015 07:34:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EF406205FA for ; Thu, 19 Nov 2015 07:34:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757691AbbKSHeX (ORCPT ); Thu, 19 Nov 2015 02:34:23 -0500 Received: from mail-pa0-f66.google.com ([209.85.220.66]:34381 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755008AbbKSHeW (ORCPT ); Thu, 19 Nov 2015 02:34:22 -0500 Received: by pacfl14 with SMTP id fl14so9279400pac.1; Wed, 18 Nov 2015 23:34:21 -0800 (PST) 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=WayNiaqZ8aGm4c7Hh814+BhyCsOpZ4aDRGbBXGC+qYs=; b=bgJyqUuds8XM3nqKT7GYW4+8GH1fiYl0KhhETlrPzTbQnIlEq08WOIz9zD0tTDR3GA uDTzVVz6Dvt3W8RHHfP36LyXLHuuOFUm7zoFES5gfTkz67BKeJqHFDVlFbpyLpQENe9s FKP7nopcZd86nO+A7S6WRGrYiUoa6CohS5RtxDuKSn2WjgfY2MxIDhUHXGJSIHBiGUds 9s40LgjnrtewNBrnkK6aja3bCSNpaaiWKgDWHHp4Btl8l11K1j1ATpY59g2ByYGlB4CV Y3uw6JwAUHV1IJhX03aLe2JjV+hNk7VYJibogMNiCWp9UlQZrkV4mMh6m8e7Ett8osbv XT+g== X-Received: by 10.66.55.105 with SMTP id r9mr8429154pap.137.1447918461812; Wed, 18 Nov 2015 23:34:21 -0800 (PST) Received: from saurabh-desktop.asia.polycom.com ([122.183.18.146]) by smtp.gmail.com with ESMTPSA id tu9sm529242pac.0.2015.11.18.23.34.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Nov 2015 23:34:21 -0800 (PST) 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 v2] lpfc: replaced kmalloc + memset with kzalloc Date: Thu, 19 Nov 2015 13:04:12 +0530 Message-Id: <1447918452-15299-1-git-send-email-saurabh.truth@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1446015219-16131-1-git-send-email-saurabh.truth@gmail.com> References: <1446015219-16131-1-git-send-email-saurabh.truth@gmail.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.3 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 --- v2 : I didn't got any response for my initial patch, I am sending it again on top of latest kernel(today's) 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 b6fa257..92dd204 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -4956,13 +4956,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;