From patchwork Fri Oct 23 20:03:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: punit vara X-Patchwork-Id: 7478421 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E1627BEEA4 for ; Fri, 23 Oct 2015 20:04:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2698220A19 for ; Fri, 23 Oct 2015 20:04:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 56C9120A18 for ; Fri, 23 Oct 2015 20:04:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752221AbbJWUEU (ORCPT ); Fri, 23 Oct 2015 16:04:20 -0400 Received: from mail-wi0-f194.google.com ([209.85.212.194]:35110 "EHLO mail-wi0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752073AbbJWUER (ORCPT ); Fri, 23 Oct 2015 16:04:17 -0400 Received: by wicuv6 with SMTP id uv6so7174327wic.2; Fri, 23 Oct 2015 13:04:16 -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=KWu6Zget3JUlBMC/kalBskrsiIQ02qzTnPARbdqo/ak=; b=VOH1lKpt3n/qiMWlezRzDMvcq185IqqzqGD+vwF131yDGf9PP6koqTw/Sh8dzLsNu7 O9aL9mA9vMQrqqPqmiIH/1oDxcoudALKDOKfCHo9J4LDR3NGBRRf+VQUEUKpVT+MGEoa BfCIqAKmsQe7wwbxp8HQ0RixPgmQVyDzupoaj0Jrn4QdKSviPSjvlWVLIS1w+3Q4DIyP gp2T0NbY64XvnyEGKu+ObP5jVrreUaEpfVtiLO4GkOtEEovnf/bglzBa+YzsFgAJK7Yb 0j2xcSn0TMn8z0Mt8T5H3+jwHAsFDh9+AAepe7Xt5v1Q0uyD/rOWLUVRFUVRPEf5CxfO J1/A== X-Received: by 10.180.188.97 with SMTP id fz1mr6792193wic.28.1445630656336; Fri, 23 Oct 2015 13:04:16 -0700 (PDT) Received: from localhost.localdomain ([163.47.14.14]) by smtp.gmail.com with ESMTPSA id i10sm4107408wij.9.2015.10.23.13.04.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 23 Oct 2015 13:04:15 -0700 (PDT) From: Punit Vara To: JBottomley@odin.com Cc: don.brace@pmcs.com, storagedev@pmcs.com, iss_storagedev@hp.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Punit Vara Subject: [PATCH 1/2] scsi: lpfc: Use kzalloc instead of kmalloc Date: Sat, 24 Oct 2015 01:33:52 +0530 Message-Id: <1445630633-14209-2-git-send-email-punitvara@gmail.com> X-Mailer: git-send-email 2.5.3 In-Reply-To: <1445630633-14209-1-git-send-email-punitvara@gmail.com> References: <1445630633-14209-1-git-send-email-punitvara@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=-3.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SBL_CSS, 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 This patch is to the lpfc_els.c which resolves following warning reported by coccicheck: WARNING: kzalloc should be used for rdp_context, instead of kmalloc/memset Signed-off-by: Punit Vara --- drivers/scsi/lpfc/lpfc_els.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 36bf58b..422c800 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -4990,7 +4990,7 @@ 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;