From patchwork Thu Feb 15 16:39:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 10222387 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 7928F6055C for ; Thu, 15 Feb 2018 16:38:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B2CB29482 for ; Thu, 15 Feb 2018 16:38:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6014F29493; Thu, 15 Feb 2018 16:38:43 +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 04E3529482 for ; Thu, 15 Feb 2018 16:38:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423969AbeBOQil (ORCPT ); Thu, 15 Feb 2018 11:38:41 -0500 Received: from mail-pl0-f65.google.com ([209.85.160.65]:34122 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423976AbeBOQig (ORCPT ); Thu, 15 Feb 2018 11:38:36 -0500 Received: by mail-pl0-f65.google.com with SMTP id bd10so129158plb.1 for ; Thu, 15 Feb 2018 08:38:36 -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=vh+j6xMIFazHgGr/UFpxCRll7phfORWaL+x4Tsmp/qY=; b=Ev7y8KrWTrE/UqHzk/HJd8IbVeDvgGlrtfvHSOWqS1d1eviDd32FARPHZaE8yDIepK lvQpNVe/9kaZJUSFVVRfVthOXiT7DpOjlD2cc6gWGMG6DKkztzkhZ2GszCABmoXig3To SKZ+SJ5WJMOMmezrIlpeB42N+jkJxL1vht9YQK3P9Xe2ZSY66Ig37HT3e9zXeOkITgTh zkxcb3gmzv30wxGSt+mh8RnA+O7CQ7lovR6rGLcECOd904SGlnU1lrD15LIUp92Iw8GM hiDCK/bcCciSilyBmRUdMwu3kU2u7mnzxxvl+TZ4galursAIc943FFil8I1eMxKb6i4T lpQQ== 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=vh+j6xMIFazHgGr/UFpxCRll7phfORWaL+x4Tsmp/qY=; b=IojrZjdWwczVNqKBVTRHJlQqq3O8dTIl2L4bBIqXVPiVZKPkVwkyz3f42RdElFYPtu zL/W3xFqjUZKd9k8s/aD3QcBBZ086qhn2dXJqhQMiiKY2rfu5Z+jyqmt3ikIJzJ/fSHZ 8UFml3My/58gsEQFUJp1ScAcjcphavbLdB8b3veTuU1LBeJCL4bWZVjPP4h4VjdAGIpb giTts/Q0HRIv39QmauhWAAKovZ4d1VPMsmRbcGflf0It+29fDgmvl4/f8xyzoW3m2MqD RWJOVKk8MhdYThSGZeWQZZ3B6Uq+8yoybVt2oiGcBtXZKM9XHqV/ml5ZJ6YacL7KRuXy XHOg== X-Gm-Message-State: APf1xPDDKIimVZtuTRz8Cx5K2T+GJraUZPqRsy51xHtQeajUwHhy8VPl fiqr7Sy49sk6bPWLiIcCeDOUJA== X-Google-Smtp-Source: AH8x2252GaFtETqJqxZFqwB/7yJtQ5u4zZvwDLNiTn6jRbjReDoZ0qFHBg+/UmR7BQbit0rEm9DUyQ== X-Received: by 2002:a17:902:718e:: with SMTP id b14-v6mr3162116pll.38.1518712715883; Thu, 15 Feb 2018 08:38:35 -0800 (PST) Received: from jordon-HP-15-Notebook-PC ([183.82.18.32]) by smtp.gmail.com with ESMTPSA id i27sm15520965pfi.32.2018.02.15.08.38.34 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Feb 2018 08:38:34 -0800 (PST) Date: Thu, 15 Feb 2018 22:09:53 +0530 From: Souptick Joarder To: linux-scsi@vger.kernel.org Subject: [PATCH] scsi: aic94xx: Use dma_pool_zalloc() Message-ID: <20180215163953.GA9545@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/aic94xx/aic94xx_hwi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 1.9.1 diff --git a/drivers/scsi/aic94xx/aic94xx_hwi.c b/drivers/scsi/aic94xx/aic94xx_hwi.c index 2dbc833..1b13133 100644 --- a/drivers/scsi/aic94xx/aic94xx_hwi.c +++ b/drivers/scsi/aic94xx/aic94xx_hwi.c @@ -1055,14 +1055,13 @@ static struct asd_ascb *asd_ascb_alloc(struct asd_ha_struct *asd_ha, if (ascb) { ascb->dma_scb.size = sizeof(struct scb); - ascb->dma_scb.vaddr = dma_pool_alloc(asd_ha->scb_pool, + ascb->dma_scb.vaddr = dma_pool_zalloc(asd_ha->scb_pool, gfp_flags, &ascb->dma_scb.dma_handle); if (!ascb->dma_scb.vaddr) { kmem_cache_free(asd_ascb_cache, ascb); return NULL; } - memset(ascb->dma_scb.vaddr, 0, sizeof(struct scb)); asd_init_ascb(asd_ha, ascb); spin_lock_irqsave(&seq->tc_index_lock, flags);