From patchwork Tue Oct 2 05:26:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 10623035 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3ABD513BB for ; Tue, 2 Oct 2018 05:23:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18C2A26E40 for ; Tue, 2 Oct 2018 05:23:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 09A9326E75; Tue, 2 Oct 2018 05:23:19 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,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 AFB2D26E40 for ; Tue, 2 Oct 2018 05:23:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726362AbeJBMEi (ORCPT ); Tue, 2 Oct 2018 08:04:38 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:43071 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726304AbeJBMEi (ORCPT ); Tue, 2 Oct 2018 08:04:38 -0400 Received: by mail-io1-f65.google.com with SMTP id y10-v6so1094831ioa.10; Mon, 01 Oct 2018 22:23:17 -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=ae8sSpM0vQ0WX6UMuR6yY2DIJEC73vMziqohwF/+LoM=; b=GhWvLw/F5O+lvRRGFrlGYMs7jc8qQ9xLd5qKqlOI7WRDmbKdItuzR3y0FTys511z+U HGaBHTrtz/Y8IzzcR5UvYAVeUCzeNcMonxaA8V4N32xZ7O2cj4iRfXY8zLiDV0MeGLKn kDR8VFbsQ2d8QAlXBd/n1EsbDQVk0FMZLIwgSF6lBNxCr4rJJjEIPrjDoRGy0wk1hW1o 6JkYsxMF6+d0N8cXsJXw04DBb0kkwhXcEV4XH7XPw6keRVjUNic0igz3lTBJjkSIGPAG oCWri99pVG+ISCvBtcLnvP9bTCNOUcu4dtSqvf9ZS996BmQfdz0ao2w4+hnk//Ej+obS UMFg== 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=ae8sSpM0vQ0WX6UMuR6yY2DIJEC73vMziqohwF/+LoM=; b=qn4hlChx48XE/Avvy/Iiq2eHMqFc8S3Cbv96vmtlQrDFqFSyQgCGACbQyDMZ+aXJXC 7yN6c9gpe8j/VUlCBnmuMEpq9Ti5LZkpTuq3jp/ZyooIZus8AwZEJPGVx4BmabYjSQax xWKF+0Px5L7e0eB+odAHE2t2WM7+lOJKdOBmIE9N8vJ0/Kf+UoRphfj4qgj/lhO8wd2o UDBrLtrT+PMLKLg2Zv+PcWYtK7d5VVBTihKBEeWGf7+HTe7wLeGkIXYBu9luPPXuh9P6 218JZHfGOvPYdn2MchZhJZIug6RarZ+6uN1hwdWdFEkHzuFeOf+VaIwXrD7p7lDn32gQ 4zfQ== X-Gm-Message-State: ABuFfoigphJeDDLd52lHHBqCeFyHLxx3JXR4OXbPIakRAo3KQ/WSJH2j G6s1EnB+ei2s3SN/zLNUs9ci6hKf X-Google-Smtp-Source: ACcGV602qJaYeG1FOGzRVAU9QIOxLGiRkJA4bqFjq+wM778RbET3FJ8jPlAy4/dqoqwcP20kasgfsA== X-Received: by 2002:a62:63c2:: with SMTP id x185-v6mr14619663pfb.13.1538457795231; Mon, 01 Oct 2018 22:23:15 -0700 (PDT) Received: from jordon-HP-15-Notebook-PC ([49.205.217.11]) by smtp.gmail.com with ESMTPSA id u9-v6sm22710041pfi.104.2018.10.01.22.23.13 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Oct 2018 22:23:14 -0700 (PDT) Date: Tue, 2 Oct 2018 10:56:32 +0530 From: Souptick Joarder To: jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, sabyasachi.linux@gmail.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi/pmcraid.c: Use dma_pool_zalloc Message-ID: <20181002052631.GA2853@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 Replaced dma_pool_alloc + memset with dma_pool_zalloc. Signed-off-by: Sabyasachi Gupta Signed-off-by: Souptick Joarder --- drivers/scsi/pmcraid.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index 4e86994..84a2734 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c @@ -4681,7 +4681,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)); @@ -4690,8 +4690,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; }