From patchwork Thu Mar 8 13:11:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 10268043 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9608560211 for ; Thu, 8 Mar 2018 13:10:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8239229978 for ; Thu, 8 Mar 2018 13:10:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 80A2729980; Thu, 8 Mar 2018 13:10:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D72C829957 for ; Thu, 8 Mar 2018 13:10:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755744AbeCHNK0 (ORCPT ); Thu, 8 Mar 2018 08:10:26 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:46883 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751652AbeCHNKZ (ORCPT ); Thu, 8 Mar 2018 08:10:25 -0500 Received: by mail-pf0-f193.google.com with SMTP id z10so2306393pfh.13 for ; Thu, 08 Mar 2018 05:10:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=mQCYnj6IZtQDx9GgkAMGCAuJxgf/McTLXOp9PVWU2jU=; b=vP6MeQEwwStW9ogOYlPYnuBYT/VcdmZP9U9O5zz0Ou26KyjSrurwGuBJP0NJEAiMBF QZuh1DAquBO0EJsXWkpFwSClXxzVquXxQ02qK8Ks2/HVSS/FmLkJAw39mnra+ye3Uygq CIsNiUTJ0vPjPPIVJD8exbP7HaiCOKGcWkwZDgZu5z527Z3SjrUetnCA+m5UIEI9FX4H TZGPj+zJIcyM2Ymyg7g3Uo2dfLfvV/rGQjjBgBhkS8Syy+W2f4X3iU2elCXFewOZbk1o cth6bnpHY2a1sjMGmWQCTBp3hDmWEmLMpTTgVXBKPD79gMmm49Yc1a51R4F2Mp8I2u/R Hp1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=mQCYnj6IZtQDx9GgkAMGCAuJxgf/McTLXOp9PVWU2jU=; b=omPwJBrJh/zb9Nj5Tg5SJcx/AszPAy/hMw8+C8cK29/OXYpkAFFEk8Vh5PetoTyGlt 172hI6vwJo6VPs8JS3Gjh1nVS3CtHJZaeMqmpoZQIqvoHmaPiv/avx6q+Xh9/+V9s60D JEMEqBaTcInJIv6Rgok6CPX4S2tmT1JRLUFtGpHvmyxBvJ5UhhJD/T7VnBYsq1p7M1Bo 3fqYgGeUqLj9WkEUihSsIjG5T5JYM+nt7+nIuqKRwpAXlIW04WVf+UBnISXM6vl5Nwba 4DqkSyGFdkEVUwcs3Pav0CoHKW7w5/OArDvYDzczost3sIOjnf/RpP8fQILXmx5PuYwi AcsQ== X-Gm-Message-State: APf1xPBZo3jsD3UGOWS84Ez8FW2Q1SSLjmQpRi75cYcL/3fs+bI1GYvQ s1Dfb2GWZiO7MhIceJpNMw5xCQ== X-Google-Smtp-Source: AG47ELvhdWHFEd+HAYKWNLrHJSu0+MPcjC7nu+NfX5heYyLmpoELau4lO+yx4TmmhhKrgBEzvPJSgQ== X-Received: by 10.98.25.10 with SMTP id 10mr25961159pfz.136.1520514624649; Thu, 08 Mar 2018 05:10:24 -0800 (PST) Received: from jordon-HP-15-Notebook-PC ([49.205.216.31]) by smtp.gmail.com with ESMTPSA id o86sm49378657pfi.87.2018.03.08.05.10.22 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Mar 2018 05:10:23 -0800 (PST) Date: Thu, 8 Mar 2018 18:41:57 +0530 From: Souptick Joarder To: brking@linux.vnet.ibm.com, brking@us.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org Subject: [PATCH] scsi: ipr: Use dma_pool_zalloc() Message-ID: <20180308131157.GA30730@jordon-HP-15-Notebook-PC> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dma_pool_zalloc() instead of dma_pool_alloc + memset Signed-off-by: Souptick Joarder Acked-by: Brian King --- drivers/scsi/ipr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.9.1 diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index e07dd99..97387be 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -9684,14 +9684,14 @@ static int ipr_alloc_cmd_blks(struct ipr_ioa_cfg *ioa_cfg) } for (i = 0; i < IPR_NUM_CMD_BLKS; i++) { - ipr_cmd = dma_pool_alloc(ioa_cfg->ipr_cmd_pool, GFP_KERNEL, &dma_addr); + ipr_cmd = dma_pool_zalloc(ioa_cfg->ipr_cmd_pool, + GFP_KERNEL, &dma_addr); if (!ipr_cmd) { ipr_free_cmd_blks(ioa_cfg); return -ENOMEM; } - memset(ipr_cmd, 0, sizeof(*ipr_cmd)); ioa_cfg->ipr_cmnd_list[i] = ipr_cmd; ioa_cfg->ipr_cmnd_list_dma[i] = dma_addr;