From patchwork Thu Feb 15 16:25:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 10222301 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 4ED1E601D7 for ; Thu, 15 Feb 2018 16:23:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 403DC29464 for ; Thu, 15 Feb 2018 16:23:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 34E6729467; Thu, 15 Feb 2018 16:23:53 +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 D31D129457 for ; Thu, 15 Feb 2018 16:23:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424382AbeBOQXv (ORCPT ); Thu, 15 Feb 2018 11:23:51 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:45529 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424203AbeBOQXt (ORCPT ); Thu, 15 Feb 2018 11:23:49 -0500 Received: by mail-pg0-f67.google.com with SMTP id e11so117464pgq.12 for ; Thu, 15 Feb 2018 08:23:49 -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=ac7fU/zZu1feyntVAHJa7rru/9X0QiLMyEWRIAbUjRg=; b=qKeLZUk/wOU8KUcYkdi7bKdG+Of10IfET1wGeJR4gZbCshyHSto3pBqfe2WLEVIF1b bY3pdssuXrpI5qw6/zZyPEtQhlj7OXTe04eHasFg064omx5Lg2LzozRiA0AlenqWT21K Oj5Fd9UmPdX+clq0E91LFFfucb+634lLv+TL0D8lT62U57lAVIVJVALmn2WjwQUZXs33 K2ZCiyQSC6UHz9cxoAm0An9S05OiPfA7cNPPNLyypc8mrWw64OM3TfaNqYdFRSKFB0cJ /BJtNrS/LXAeb0g9PWVaUMzh/gi+h+or3xmQxAp8UcIqrEfG4YSRipNZgmYOdjEORnwW jHMw== 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=ac7fU/zZu1feyntVAHJa7rru/9X0QiLMyEWRIAbUjRg=; b=H6wswLARd5thqVf08xc3q9K/qg8xudzHryumgXUNtebGkcsTwSiewvYnR5XoNrdmMf 5wuWVhzEyMEKlrkTp1XZqj0ZQK8F31Z6YfsTcZEZksecZHOsr3vWgZn3nGDB7txXSGW9 lPcFOsEJ5jov1QO6GRcdF+x3iLBEPWAYqSRFPvRo9ZbmhQtLTCzMNMD2As8J4GdHNSia nI/kJO+vUjZxb3vdmxkvfaMRlBvtIzTDuil22JYOn9Q/ZI7hX0zelNEr/NL6/BDG4LRu jxTaWrhqB51bQdRurcGI/KW8617E9wilNQFclx1O/0qEEfP8/YiA4jVFtkLXbE4/p0ro vzqQ== X-Gm-Message-State: APf1xPAZPjYzvAV+AjQxZYRl98SSQQlO0VX80HJjxDzwFgj2c4clLl3q kcac6exD5ZQj/FGr2YQ+3/BIwA== X-Google-Smtp-Source: AH8x2247u/dqagjHdF8iGgO8w5qf5U7fnfgGKdkfjAezVHQ2mjglFRtXGJ7SQWsxvLC3web4uMujCQ== X-Received: by 10.99.170.77 with SMTP id x13mr2637539pgo.393.1518711828296; Thu, 15 Feb 2018 08:23:48 -0800 (PST) Received: from jordon-HP-15-Notebook-PC ([183.82.18.32]) by smtp.gmail.com with ESMTPSA id w27sm38566259pge.54.2018.02.15.08.23.45 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Feb 2018 08:23:46 -0800 (PST) Date: Thu, 15 Feb 2018 21:55:06 +0530 From: Souptick Joarder To: kashyap.desai@broadcom.com, sumit.saxena@broadcom.com, shivasharan.srikanteshwara@broadcom.com Cc: megaraidlinux.pdl@broadcom.com, linux-scsi@vger.kernel.org Subject: [PATCH] scsi: megaraid: Use dma_pool_zalloc() Message-ID: <20180215162506.GA9306@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 --- drivers/scsi/megaraid/megaraid_sas_base.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 1.9.1 diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index a71ee67..905ea36 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -4022,7 +4022,7 @@ static int megasas_create_frame_pool(struct megasas_instance *instance) cmd = instance->cmd_list[i]; - cmd->frame = dma_pool_alloc(instance->frame_dma_pool, + cmd->frame = dma_pool_zalloc(instance->frame_dma_pool, GFP_KERNEL, &cmd->frame_phys_addr); cmd->sense = dma_pool_alloc(instance->sense_dma_pool, @@ -4038,7 +4038,6 @@ static int megasas_create_frame_pool(struct megasas_instance *instance) return -ENOMEM; } - memset(cmd->frame, 0, instance->mfi_frame_size); cmd->frame->io.context = cpu_to_le32(cmd->index); cmd->frame->io.pad_0 = 0; if ((instance->adapter_type == MFI_SERIES) && reset_devices)