From patchwork Mon Nov 20 19:32:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 10067109 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 AE30D603FA for ; Mon, 20 Nov 2017 19:33:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A04D728D2F for ; Mon, 20 Nov 2017 19:33:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 94F542930F; Mon, 20 Nov 2017 19:33:58 +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 4571D292E5 for ; Mon, 20 Nov 2017 19:33:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752148AbdKTTdy (ORCPT ); Mon, 20 Nov 2017 14:33:54 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:42227 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752484AbdKTTdL (ORCPT ); Mon, 20 Nov 2017 14:33:11 -0500 Received: by mail-wr0-f193.google.com with SMTP id o14so9125584wrf.9; Mon, 20 Nov 2017 11:33:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Xf/LVX0oLhlvMFPCmAREQhUiAVhRyIADZO/O2qOmyOI=; b=f/e6Cn3OSy9ERVzlAFyToiWiDZl2bKEMJaNard6YsqPwip6cciQLtvXcd4IRhnTTrw aA6tBn6ryjLFLWwWK5poAV2hfC4BZrBk2RqcTboeOLFOSTuQ5lZiicGa7mrfQS3bw1cP QQl4oxu+RX2Ju61oSffR1c61BEDdorSNXom9flSnnu/EAeKJgqnQkeQ2wALBzqvx8oSj 53tY72l52Dnq003jcvoOq5xivyU8QD/UUIU56VbzSLYt1eYw7wf4CkHtRbycPG42nKYn ezaXineTrnu/Axb7P9M02uW1WqHoTwG0omzB6vApAlfVXct2OUCOERqCz2iply6qbIj+ lYAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Xf/LVX0oLhlvMFPCmAREQhUiAVhRyIADZO/O2qOmyOI=; b=MRLH4KGJSV2wKDgUJcGYC8Cft8Gb/2UsZ9nzKU3ICDlVUQU6/3Glhi3Dgs/Lb0p1t1 dahuc1eyR/Pb5erg9UISPHQmQ5tXAHxVKnn2yLpQ5g1IG4l8cpO48eGBrNnZ0UZb8b+E YQM5GxWX46cTPRBqffOEOQEtob6zz0ZemI55LBJsgaBKa5LQTtndaRcZeeZ/IaW4SJ04 Jev2n3Guzpte59cUhPZbB9dOT4yVEh5+gU8Rsww/1kvQEW4mTR8RaTnIdpo6HSvaNdgx /Z54OMu2rt3zL/uRzE/2ElfwNzee1jDEU3G+Jq8u+tKe/S80vntGeJj3yQ50fljtsrui pn5w== X-Gm-Message-State: AJaThX7k8zwWNDTjAbPBeSW17I3RPQTR9TgMIRyT9RElI1Uzn/cfzFjQ 1u6PYqWNN/9suQ3wwZfcrTU= X-Google-Smtp-Source: AGs4zMZq+qNZ5pcv2OKHTcPFbJ4d6eddal+tXg3+j+IGHQJe2Oe/aaMbhXjLGF7NSzvbh6sxtgZqJQ== X-Received: by 10.223.163.215 with SMTP id m23mr10841866wrb.220.1511206390174; Mon, 20 Nov 2017 11:33:10 -0800 (PST) Received: from rperier-xps-l502x (AToulouse-651-1-44-123.w92-134.abo.wanadoo.fr. [92.134.227.123]) by smtp.gmail.com with ESMTPSA id v18sm4754028wrv.37.2017.11.20.11.33.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Nov 2017 11:33:09 -0800 (PST) From: Romain Perier To: Jens Axboe , Andrew Morton , Dan Williams , Vinod Koul , Jeff Kirsher , Aviad Krawczyk , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, Bjorn Helgaas , linux-pci@vger.kernel.org Cc: dmaengine@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Romain Perier Subject: [PATCH v15 4/5] scsi: mpt3sas: Replace PCI pool old API Date: Mon, 20 Nov 2017 20:32:46 +0100 Message-Id: <20171120193247.8187-5-romain.perier@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171120193247.8187-1-romain.perier@gmail.com> References: <20171120193247.8187-1-romain.perier@gmail.com> 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 The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier --- drivers/scsi/mpt3sas/mpt3sas_base.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 8027de465d47..08237b8659ae 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -3790,12 +3790,12 @@ _base_release_memory_pools(struct MPT3SAS_ADAPTER *ioc) if (ioc->pcie_sgl_dma_pool) { for (i = 0; i < ioc->scsiio_depth; i++) { if (ioc->scsi_lookup[i].pcie_sg_list.pcie_sgl) - pci_pool_free(ioc->pcie_sgl_dma_pool, + dma_pool_free(ioc->pcie_sgl_dma_pool, ioc->scsi_lookup[i].pcie_sg_list.pcie_sgl, ioc->scsi_lookup[i].pcie_sg_list.pcie_sgl_dma); } if (ioc->pcie_sgl_dma_pool) - pci_pool_destroy(ioc->pcie_sgl_dma_pool); + dma_pool_destroy(ioc->pcie_sgl_dma_pool); } if (ioc->config_page) { @@ -4204,21 +4204,21 @@ _base_allocate_memory_pools(struct MPT3SAS_ADAPTER *ioc) sz = nvme_blocks_needed * ioc->page_size; ioc->pcie_sgl_dma_pool = - pci_pool_create("PCIe SGL pool", ioc->pdev, sz, 16, 0); + dma_pool_create("PCIe SGL pool", &ioc->pdev->dev, sz, 16, 0); if (!ioc->pcie_sgl_dma_pool) { pr_info(MPT3SAS_FMT - "PCIe SGL pool: pci_pool_create failed\n", + "PCIe SGL pool: dma_pool_create failed\n", ioc->name); goto out; } for (i = 0; i < ioc->scsiio_depth; i++) { ioc->scsi_lookup[i].pcie_sg_list.pcie_sgl = - pci_pool_alloc(ioc->pcie_sgl_dma_pool, + dma_pool_alloc(ioc->pcie_sgl_dma_pool, GFP_KERNEL, &ioc->scsi_lookup[i].pcie_sg_list.pcie_sgl_dma); if (!ioc->scsi_lookup[i].pcie_sg_list.pcie_sgl) { pr_info(MPT3SAS_FMT - "PCIe SGL pool: pci_pool_alloc failed\n", + "PCIe SGL pool: dma_pool_alloc failed\n", ioc->name); goto out; }