From patchwork Thu Jan 17 03:40:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 10767493 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 3E72014E5 for ; Thu, 17 Jan 2019 03:40:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D2912F882 for ; Thu, 17 Jan 2019 03:40:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21D422F88F; Thu, 17 Jan 2019 03:40:56 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 C1A002F882 for ; Thu, 17 Jan 2019 03:40:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728189AbfAQDkz (ORCPT ); Wed, 16 Jan 2019 22:40:55 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:46775 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728177AbfAQDky (ORCPT ); Wed, 16 Jan 2019 22:40:54 -0500 Received: by mail-pg1-f193.google.com with SMTP id w7so3767905pgp.13 for ; Wed, 16 Jan 2019 19:40:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=areca-com-tw.20150623.gappssmtp.com; s=20150623; h=subject:from:to:cc:date:message-id:mime-version :content-transfer-encoding; bh=073snM5C8tLLsyr5QOcJderOjEQwtrw46iKbrgLbkBY=; b=aBQAJ/QGLLKeo/Sh+bpsPimJwKkiCu2r3sZxYeYZ65oJioO+i2hR2KE3guTBs45W7N D8xiYLt0kmMU+A4sh05qf34za0WEN86EdKbp/rB4VND/1CJfWoeUFlqT8samKtLVC+Ca cFVKtXpNEYQh77/9bXgYnbhW3bObFRTHp0ckbMW2codGcuNXT8ndKo+TuSGVNSdXan8r 9ES5/yAZsHvvm10cixoBcegaBxgKaSF3F5nB8HFRWiC/pzQcJjHXMAEwi8asiGIXGuri qSWdxPtcpw33LOjNN61J/LuQSPfYVLjR4fqkENX9XxRIyPwrx8bBcTKLXWIzGPdyHRjb 92+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:date:message-id:mime-version :content-transfer-encoding; bh=073snM5C8tLLsyr5QOcJderOjEQwtrw46iKbrgLbkBY=; b=plmxLofaS1dyX/+uJHQ+0s4QPva6ZKSgncswnrCQWCEq98AfWmR9I2Z9r5BogX5W68 sYwhqhGvoBr/h5G76fTdrCKo4+oI7GNl4CTxgDFHTO9/h0n91n4dsHRah7SUzWQMbdrH 5WA8Vv3s+nEU0K/ryYQfna4IcuprtBfZ8qGGDhuiA9De2Q+dlUzDp+yI1wyqEglz/iHB Yzia22IWOtoef0xqzeQBv/OT1T5p2fx1sNI8RYSyM/PlSwYaAgk3KZ7dEcu0c8hx2BHe cFsGTfuOKsCriqRohbcP7/JiU2jpW3DpDEH42UpwAq8Ozk592Fe2BGRbiMQkoj+YiJdK m76w== X-Gm-Message-State: AJcUuke7KVgvumebHXB9+Z4WM8Hv31DRdl0gtm6xgh3dsgX7K/M9ywML 3SqGlwzajywM3yRFK5aMhXN2Ng== X-Google-Smtp-Source: ALg8bN62ewq3wexhbsp9rdT0SIBdLBjJT6A30XdieuHDlDSqzl+LFvZBuLmzqtSsfC5tG8ppM8RhPw== X-Received: by 2002:a62:4641:: with SMTP id t62mr13092128pfa.141.1547696453925; Wed, 16 Jan 2019 19:40:53 -0800 (PST) Received: from [192.168.0.79] (60-248-88-209.HINET-IP.hinet.net. [60.248.88.209]) by smtp.gmail.com with ESMTPSA id f67sm360605pff.29.2019.01.16.19.40.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Jan 2019 19:40:53 -0800 (PST) Subject: [PATCH 1/3] scsi: arcmsr: Use dma_alloc_coherent to replace dma_zalloc_coherent From: Ching Huang To: martin.petersen@oracle.com, James.Bottomley@HansenPartnership.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: dan.carpenter@oracle.com, hch@infradead.org, colin.king@canonical.com Date: Thu, 17 Jan 2019 11:40:50 +0800 Message-ID: <1547696450.4339.17.camel@Centos6.3-64> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 (2.32.3-37.el6) 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 From Ching Huang Due to dma_zalloc_coherent will be phase out, so use dma_alloc_coherent to replace it. Signed-off-by: Ching Huang diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 9f85d5a..5736434 100755 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -642,7 +642,7 @@ static bool arcmsr_alloc_io_queue(struct AdapterControlBlock *acb) switch (acb->adapter_type) { case ACB_ADAPTER_TYPE_B: { acb->ioqueue_size = roundup(sizeof(struct MessageUnit_B), 32); - dma_coherent = dma_zalloc_coherent(&pdev->dev, acb->ioqueue_size, + dma_coherent = dma_alloc_coherent(&pdev->dev, acb->ioqueue_size, &dma_coherent_handle, GFP_KERNEL); if (!dma_coherent) { pr_notice("arcmsr%d: DMA allocation failed\n", acb->host->host_no); @@ -656,7 +656,7 @@ static bool arcmsr_alloc_io_queue(struct AdapterControlBlock *acb) break; case ACB_ADAPTER_TYPE_D: { acb->ioqueue_size = roundup(sizeof(struct MessageUnit_D), 32); - dma_coherent = dma_zalloc_coherent(&pdev->dev, acb->ioqueue_size, + dma_coherent = dma_alloc_coherent(&pdev->dev, acb->ioqueue_size, &dma_coherent_handle, GFP_KERNEL); if (!dma_coherent) { pr_notice("arcmsr%d: DMA allocation failed\n", acb->host->host_no); @@ -672,7 +672,7 @@ static bool arcmsr_alloc_io_queue(struct AdapterControlBlock *acb) uint32_t completeQ_size; completeQ_size = sizeof(struct deliver_completeQ) * ARCMSR_MAX_HBE_DONEQUEUE + 128; acb->ioqueue_size = roundup(completeQ_size, 32); - dma_coherent = dma_zalloc_coherent(&pdev->dev, acb->ioqueue_size, + dma_coherent = dma_alloc_coherent(&pdev->dev, acb->ioqueue_size, &dma_coherent_handle, GFP_KERNEL); if (!dma_coherent){ pr_notice("arcmsr%d: DMA allocation failed\n", acb->host->host_no);