From patchwork Thu Feb 15 15:58:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 10222135 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 DDF3B602CB for ; Thu, 15 Feb 2018 15:57:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CCDB22890E for ; Thu, 15 Feb 2018 15:57:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BF5062896D; Thu, 15 Feb 2018 15:57:27 +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 592C22890E for ; Thu, 15 Feb 2018 15:57:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1425057AbeBOP5Z (ORCPT ); Thu, 15 Feb 2018 10:57:25 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:38713 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424925AbeBOP5X (ORCPT ); Thu, 15 Feb 2018 10:57:23 -0500 Received: by mail-pg0-f68.google.com with SMTP id l24so74577pgc.5 for ; Thu, 15 Feb 2018 07:57:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=zgbi36SJv1UgUWNpW7Q0BzJu4qYym9lQ537zmU9n00Y=; b=fiHcG+u/x5kg6ous3cxxerckg9XNJ0DLEEYaiYQzZYXs+j2UnXAHJ/gPmqJ+9nIR0e qAIvN4P4BWrI0m0dnhn29BcU86PxaeEiLdMUyM9kI2mbZQQ3QVN8ldBGzGdvw6H4+aUx pG4hLTCsAX/73+ut94L66D/shRlD3i5aipH5wFKhtWXbL60PoLU1AUNAOAUTb2jdgZGw lgXtqVWUO1r1/mea13rn7VSauToayCha8rynRbnXZrf+VPZWBU99CzV73KpmPe6ejMeI DQ21LrdaDvK2afABDm97wSUCc0J5aZX496dLqXEr63f1TObAuW1mHX7j8dSIQWt28G4E obrg== 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:subject:message-id:mime-version :content-disposition:user-agent; bh=zgbi36SJv1UgUWNpW7Q0BzJu4qYym9lQ537zmU9n00Y=; b=Z1rZ2nkqsAUoa84evzWpb+msmp62ojlGDxrTI5mDMvdmZLHMFqdLq7G0KXClPge9sa LPLq3N/ynB5hykU3khP6DSrEAaOXQOMe5ehYkWbVWwfMCzYIrwhdLLAOLkHx3MufJMTg Xp4RvV6q8N84LqGM07Zy0kQEKbtqw/I+OBgt82yjhLT+KfHkWLvhF7d4t1EgZP/0tjl2 mBcMvBL/XR66ynXDNB6Be7nomeygeAOlIoluKENTe6Q7s3eKP5E4m0Z3QSqR4TZMAWEV NhQVW61zpw5Rje4uxDEnB3Xqg47wKRiOJUVDd8gEDcDqaC/wy27du0Ru7dBKtLak8SlU oCJA== X-Gm-Message-State: APf1xPB7gfTPyJZXA5RUCvy1BYGcSWAu1ab11DXEbLdAsJbl8urBmw++ Mw5n/b0ZddvUZC3ib4DprGYmDA== X-Google-Smtp-Source: AH8x225hDxiLBWiMaVB2bFyJ18jJuw8DDyrigA9t4BboV8kzpxUVe+jfocw7NaRgnxD37MgQ/CzJ5g== X-Received: by 10.99.107.200 with SMTP id g191mr2541974pgc.165.1518710242682; Thu, 15 Feb 2018 07:57:22 -0800 (PST) Received: from jordon-HP-15-Notebook-PC ([183.82.18.32]) by smtp.gmail.com with ESMTPSA id n25sm40952094pfk.152.2018.02.15.07.57.19 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Feb 2018 07:57:20 -0800 (PST) Date: Thu, 15 Feb 2018 21:28:39 +0530 From: Souptick Joarder To: linux-scsi@vger.kernel.org Subject: [PATCH] scsi: mvsas: Use dma_pool_zalloc() Message-ID: <20180215155839.GA8967@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/mvsas/mv_sas.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 1.9.1 diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c index cff43bd..d00d37d 100644 --- a/drivers/scsi/mvsas/mv_sas.c +++ b/drivers/scsi/mvsas/mv_sas.c @@ -790,12 +790,11 @@ static int mvs_task_prep(struct sas_task *task, struct mvs_info *mvi, int is_tmf slot->n_elem = n_elem; slot->slot_tag = tag; - slot->buf = dma_pool_alloc(mvi->dma_pool, GFP_ATOMIC, &slot->buf_dma); + slot->buf = dma_pool_zalloc(mvi->dma_pool, GFP_ATOMIC, &slot->buf_dma); if (!slot->buf) { rc = -ENOMEM; goto err_out_tag; } - memset(slot->buf, 0, MVS_SLOT_BUF_SZ); tei.task = task; tei.hdr = &mvi->slot[tag];