Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp916649imm; Mon, 1 Oct 2018 22:45:09 -0700 (PDT) X-Google-Smtp-Source: ACcGV62LV+1z3XaJSHBs1Jrm+wBHkmbCYIGnrgpH2dz4Ik1AWIrrECyXNXNIqkB/8L04L96cO0+X X-Received: by 2002:a17:902:8502:: with SMTP id bj2-v6mr15001899plb.295.1538459109648; Mon, 01 Oct 2018 22:45:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538459109; cv=none; d=google.com; s=arc-20160816; b=JhWljnnWIvjCkdBnt+jglsNUOhZjsxUHIznvJErbGqtlwv4oxMGWEs5ufA/XTP7aqj +/o/7H2nfUxivYixAqQyPzWJ9o05eKkfOLlcDhCIX60BX99cosZYsdrN5lx+bv3O1DNi 3eTEgm0TfD4pnzyX9TsFZatZyQ/TI7sN3wIVsDwM4BONiKsZdEyAZAnxL3fMbymvvfQv rR7GDrn5/ZxfZ53TFO94ENQIyufBaoD0ZvVD5UdEziNyWUoseGV1J8goIIYdmRchXo4I tKBRDDsHH2w6wwmJPOsVRxoxWMv8Jpv+q0eJ6GJzfXa7q0puUWhnJRUT/UzVsxBLZMkd AeaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=mWIRY+fxZKlf3hZ/+YCd2DIXt8CKPqagyhrO4MqaBQ0=; b=F2ko137JA38Fmd+40ghqWSOvttOFS3uG9bMJOVyRvOdoJk2GB5eKT7bRtEuuNBN/ok 9kKNTtQZQOHMbfavvMrVGcVs5DmHDDXV8Xas7XgPWJB46E7ns2RrgjPLqB4suvrM4Nyq GT3NpaYEZCDt29VPL2isD6O7xH71FYHQaZLcgzkqggeHHFyosWQsg+p3CUJaDUKExk6L sAZ/ubcL1S4W+lqmyy+NvmXcBIUS5JJsa7xnDWma3QsjA5cDsnZ5WHYwjMMiqSwP1CU+ SE8XQj5og8Or5gehiGQzrAET89pMYvlOjNGsYlWb+QUBG7HIQa15v5nJernTRnSEQtz7 +llA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GioNp5LJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n10-v6si2184442pgj.165.2018.10.01.22.44.54; Mon, 01 Oct 2018 22:45:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GioNp5LJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726637AbeJBM0O (ORCPT + 99 others); Tue, 2 Oct 2018 08:26:14 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:34294 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726518AbeJBM0O (ORCPT ); Tue, 2 Oct 2018 08:26:14 -0400 Received: by mail-pl1-f196.google.com with SMTP id f18-v6so23967plr.1; Mon, 01 Oct 2018 22:44:48 -0700 (PDT) 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=mWIRY+fxZKlf3hZ/+YCd2DIXt8CKPqagyhrO4MqaBQ0=; b=GioNp5LJkIjv+EgYrMlxUMUANrH5LEglfosNscqQ/XikkD6EFEqom6kKegkzMRIWrY V6Pr0fEp7BacMlANjJLO5DquNKWkmO30pzZCs1rfwPS4OqpJg7GfXTgBWeAUMmYbv5dJ rXEF+Mo5OTvHGk5d5owWuHrz2tkzofNY6ABV6zvtxzKA11EvMQyJ7CnSeMe+6ZlWVWGY 6/QxbUhqjTIKonBWKQg9f6ftGtvoDbJ7GUmQsaU8pprAmLfQFtkNBN9RbgmtGm0+4A99 FuEncHSFyihKZXIkUzsiHGSM4wrBmss0vT7MjZL2V9mU7lBeUfbo/yhqkoXDTg4SQ8gl 3wAg== 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=mWIRY+fxZKlf3hZ/+YCd2DIXt8CKPqagyhrO4MqaBQ0=; b=IlUMdN5A+oPQy/Un/tf6sqTpXF+Vulx/fEgJaYXS9VrJ/jRUtGkxcHGe0LqGHRLNm+ kolkna787Qq3YPgeh6E2KbO1Yh5msH3HAUsoD1FcnSX6XFRpePfjEIVJPHckUEkkV+uO 9x1eg7K/dCjWeUlH01R+QhrUf9rW4s31vEzQheJjK3/Iw/Bak5PiAPG8OBIRRfmx/2kB T4A2mqm+M21xPRvIil6Iw001cNVz3eMhCnLzQ7L+cGU/FIpcg+HjzgYdCmkNH5eifBDE FNaKDHhYirdPJXrtjZ6fb/A6az7w2VhPY85LWzC0A0VGIrlzaDADbu38CWn3R89X1r7v tI7A== X-Gm-Message-State: ABuFfoi1IqNQRnS3Bf83sD2QIAUcZZn+SlsEcVEYxOvemIK53Cr80etb HrH2EQhn8PaRo2fcBTlx0JUgdOay X-Received: by 2002:a63:61d0:: with SMTP id v199-v6mr13220970pgb.242.1538459087798; Mon, 01 Oct 2018 22:44:47 -0700 (PDT) Received: from jordon-HP-15-Notebook-PC ([49.205.217.11]) by smtp.gmail.com with ESMTPSA id o12-v6sm23807765pfh.20.2018.10.01.22.44.45 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Oct 2018 22:44:46 -0700 (PDT) Date: Tue, 2 Oct 2018 11:18:04 +0530 From: Souptick Joarder To: sathya.prakash@broadcom.com, chaitra.basappa@broadcom.com, suganath-prabu.subramani@broadcom.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, brajeswar.linux@gmail.com Cc: MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi/mpt3sas: Use dma_pool_zalloc Message-ID: <20181002054804.GA11315@jordon-HP-15-Notebook-PC> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replaced dma_pool_alloc + memset with dma_pool_zalloc. Signed-off-by: Brajeswar Ghosh Signed-off-by: Souptick Joarder --- drivers/scsi/mpt3sas/mpt3sas_base.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 59d7844..d7ef671 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -4516,7 +4516,7 @@ void mpt3sas_base_clear_st(struct MPT3SAS_ADAPTER *ioc, i = 0; do { ioc->reply_post[i].reply_post_free = - dma_pool_alloc(ioc->reply_post_free_dma_pool, + dma_pool_zalloc(ioc->reply_post_free_dma_pool, GFP_KERNEL, &ioc->reply_post[i].reply_post_free_dma); if (!ioc->reply_post[i].reply_post_free) { @@ -4525,7 +4525,6 @@ void mpt3sas_base_clear_st(struct MPT3SAS_ADAPTER *ioc, ioc->name); goto out; } - memset(ioc->reply_post[i].reply_post_free, 0, sz); dinitprintk(ioc, pr_info(MPT3SAS_FMT "reply post free pool (0x%p): depth(%d)," "element_size(%d), pool_size(%d kB)\n", ioc->name, @@ -4852,14 +4851,13 @@ void mpt3sas_base_clear_st(struct MPT3SAS_ADAPTER *ioc, ioc->name); goto out; } - ioc->reply_free = dma_pool_alloc(ioc->reply_free_dma_pool, GFP_KERNEL, + ioc->reply_free = dma_pool_zalloc(ioc->reply_free_dma_pool, GFP_KERNEL, &ioc->reply_free_dma); if (!ioc->reply_free) { pr_err(MPT3SAS_FMT "reply_free pool: dma_pool_alloc failed\n", ioc->name); goto out; } - memset(ioc->reply_free, 0, sz); dinitprintk(ioc, pr_info(MPT3SAS_FMT "reply_free pool(0x%p): " \ "depth(%d), element_size(%d), pool_size(%d kB)\n", ioc->name, ioc->reply_free, ioc->reply_free_queue_depth, 4, sz/1024)); -- 1.9.1