From patchwork Thu Feb 15 15:14:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 10221473 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 B3CCE602CB for ; Thu, 15 Feb 2018 15:13:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0795293D5 for ; Thu, 15 Feb 2018 15:13:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 93D5F293F8; Thu, 15 Feb 2018 15:13:23 +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 310C8293D5 for ; Thu, 15 Feb 2018 15:13:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033724AbeBOPNW (ORCPT ); Thu, 15 Feb 2018 10:13:22 -0500 Received: from mail-pl0-f67.google.com ([209.85.160.67]:46902 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033584AbeBOPNU (ORCPT ); Thu, 15 Feb 2018 10:13:20 -0500 Received: by mail-pl0-f67.google.com with SMTP id x19so1877504plr.13 for ; Thu, 15 Feb 2018 07:13:20 -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=s8p7YrQ33Ij6BZjApQhYa/N8Va39gia40b6LazMNNDI=; b=Vw8Q8u2vW2Mn5i8Iy08rQrH/nUQzLo2NB/grAMToCrQeHP385I8KSINFPSFXwB4kaH Oy7+ENzizzQNtHEiQjgvYI3y35OPeJaXsrpmh1xRbfiJeriD+bsBJ9opjd3RVQC47Fcq +tOUo/TErYE5yaTLT+V8TzsH4FjjLPXJBAV85wEaYKf8Wdi4JKwVaSJduqOeKKE4fRIP 7ISbFp6AZvKglIcxxcivbGMtq09pQDFRiizDnTbw53Nw1BiV0w260Fn7SjG7uCoubHs6 bYvxtGRLmqVPTJsS6BbGwMS1eHzcXYdc1LmwsWBAvDYDqmyxu+R8L6ermUvC4DhHPwgy vg5Q== 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=s8p7YrQ33Ij6BZjApQhYa/N8Va39gia40b6LazMNNDI=; b=awrdD0t4MH77LHyRSI/sxsQyBYy64VebqtkCHkyrHNrM3tFQkLmsp1VdocxdMykY5b ckMIaO4rdQFIqJnjUh3++TZSaKL0SxtcI3xWKBCWOHMO6X05LT5DDGYAV0JxtMJYalqH PE8teFsjgzDA/CWfDtKvAcaGKAN2y0YTXawJ6NIWdH6zPPxD9xcvQ65EWk3w71J24T6s Rph/65/Y2RiXT7n2LqSEyLAf4uNXBRb4wsPDJnI9bKqIgWYlenuuQwqp1Ue4Cjy6UwM7 qKJJVluoju9CM+/I7exmbZ7EnYkzuaN3uFY5ZkXl4MjQZIlR2gab75giiunJKojMgE9H GM4A== X-Gm-Message-State: APf1xPCJipEZBKBdlxMS99k8gfPDj2PP1js1Vyb9nVHG9j/QpBT2jCEa rlcWBPA2UNW1lkLyl6O7DsvgLQ== X-Google-Smtp-Source: AH8x225N6wwrNN8RMciBkV29kzenioTrYCZzmENHDnJVhkdgcbLhPl64FE57Pc56nWl/bShxFSDsIQ== X-Received: by 2002:a17:902:34e:: with SMTP id 72-v6mr2863462pld.277.1518707599769; Thu, 15 Feb 2018 07:13:19 -0800 (PST) Received: from jordon-HP-15-Notebook-PC ([183.82.18.32]) by smtp.gmail.com with ESMTPSA id j3sm40363091pfj.180.2018.02.15.07.13.17 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Feb 2018 07:13:18 -0800 (PST) Date: Thu, 15 Feb 2018 20:44:38 +0530 From: Souptick Joarder To: linux-scsi@vger.kernel.org Subject: [PATCH] scsi: pmcraid: Use dma_pool_zalloc() Message-ID: <20180215151438.GA8253@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/pmcraid.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 1.9.1 diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index 201c8de..7535161 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c @@ -4716,7 +4716,7 @@ static int pmcraid_allocate_control_blocks(struct pmcraid_instance *pinstance) for (i = 0; i < PMCRAID_MAX_CMD; i++) { pinstance->cmd_list[i]->ioa_cb = - dma_pool_alloc( + dma_pool_zalloc( pinstance->control_pool, GFP_KERNEL, &(pinstance->cmd_list[i]->ioa_cb_bus_addr)); @@ -4725,8 +4725,6 @@ static int pmcraid_allocate_control_blocks(struct pmcraid_instance *pinstance) pmcraid_release_control_blocks(pinstance, i); return -ENOMEM; } - memset(pinstance->cmd_list[i]->ioa_cb, 0, - sizeof(struct pmcraid_control_block)); } return 0; }