From patchwork Fri Dec 15 19:31:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 10115933 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 6BC8260327 for ; Fri, 15 Dec 2017 19:33:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C6032A12C for ; Fri, 15 Dec 2017 19:33:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 505742A135; Fri, 15 Dec 2017 19:33:28 +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=unavailable 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 D2B792A12C for ; Fri, 15 Dec 2017 19:33:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756638AbdLOTdK (ORCPT ); Fri, 15 Dec 2017 14:33:10 -0500 Received: from mail-wr0-f195.google.com ([209.85.128.195]:39107 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755928AbdLOTbi (ORCPT ); Fri, 15 Dec 2017 14:31:38 -0500 Received: by mail-wr0-f195.google.com with SMTP id a41so8912156wra.6; Fri, 15 Dec 2017 11:31:37 -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=3XQMaT0iP4SAI/ucOhQHZv123lPYnoaU9XDNSBXiroM=; b=hi+/QP++M42CrB56nYtMeHrFjRJJTtSuxirnnjFFMqpFTEXSGfTCPDNQzBlo0Ng+/Y C3MuwBB09+ndv7SjCshXFme3Fg78dQ7s3EPLtZSFgqx1LC4QfSR5wVm1YFSf/wqm1lOA JiI53hex97xgJZrT9X11c9jFNl0A/z9HYYH047AUFYWEsu3cANtUD7sxUKroSNDT8yJ5 Dfyw6NXa3/E0KExD+fA0g6ApCTyDifnlUypybh6h8D15eXPhD4RZrVS5lXmDdd2WZfCE FV1ulYOvkAGgQhQ2ZA5CYXNiL2Vya2UukjCyzln6PhDfUuvVMQCy7o3gOf//wNZujCrd 4uKQ== 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=3XQMaT0iP4SAI/ucOhQHZv123lPYnoaU9XDNSBXiroM=; b=LYHXb2CzHXdH7FfcNe/l/pMg5SfztHnvqlZLjMgKzjZ5ijCikyAf0j3/jmDgxxAE0U O1IIhgnbo9GA11iBL3SLnUrG22CVFRcaxctgoE1Ff7C15c6lJXRO7zZ7FKlHNJvNlsNp yo4ICGt8m0F5dJBvbFMuOvcIRGrBR5MK08rbS2lPKjocHmBN04PZscrntZahl6MS/s8h 1VTxS7Tj28EBO2vFUqVylkaoWkmAgrTV2qv9jDGLNqIxYJIUta+JzENcSHeDG7UzCbyf AHOPx30PaIHXNpCTu6UYsa+94ixR99zN/55XDTCPmlCiNDr0q9BsUM9dS1kKbop7IOeE W4bg== X-Gm-Message-State: AKGB3mIXoPQoLpSMYbCj9zBqxPUT8lF2LiumKpEQGmEHLdI5VB1c6yWc dN8S7Ah4UMUBFnzd4i1p6Wc= X-Google-Smtp-Source: ACJfBou+mkRM8dmVRl/8yMHT0dey8EELegjaF/XOxQd3nM6IcDsUhMEIFkPmCQhqiXuYScojIplyIQ== X-Received: by 10.223.173.129 with SMTP id w1mr10224869wrc.19.1513366297068; Fri, 15 Dec 2017 11:31:37 -0800 (PST) Received: from rperier-xps-l502x (AToulouse-651-1-93-21.w90-16.abo.wanadoo.fr. [90.16.212.21]) by smtp.gmail.com with ESMTPSA id o88sm17351772wrc.10.2017.12.15.11.31.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Dec 2017 11:31:36 -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 v16 2/4] net: e100: Replace PCI pool old API Date: Fri, 15 Dec 2017 20:31:21 +0100 Message-Id: <20171215193123.13395-3-romain.perier@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171215193123.13395-1-romain.perier@gmail.com> References: <20171215193123.13395-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 From: Romain Perier 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 Acked-by: Peter Senna Tschudin Acked-by: Jeff Kirsher Tested-by: Peter Senna Tschudin Acked-by: David S. Miller --- drivers/net/ethernet/intel/e100.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c index 44b3937f7e81..29486478836e 100644 --- a/drivers/net/ethernet/intel/e100.c +++ b/drivers/net/ethernet/intel/e100.c @@ -607,7 +607,7 @@ struct nic { struct mem *mem; dma_addr_t dma_addr; - struct pci_pool *cbs_pool; + struct dma_pool *cbs_pool; dma_addr_t cbs_dma_addr; u8 adaptive_ifs; u8 tx_threshold; @@ -1892,7 +1892,7 @@ static void e100_clean_cbs(struct nic *nic) nic->cb_to_clean = nic->cb_to_clean->next; nic->cbs_avail++; } - pci_pool_free(nic->cbs_pool, nic->cbs, nic->cbs_dma_addr); + dma_pool_free(nic->cbs_pool, nic->cbs, nic->cbs_dma_addr); nic->cbs = NULL; nic->cbs_avail = 0; } @@ -1910,7 +1910,7 @@ static int e100_alloc_cbs(struct nic *nic) nic->cb_to_use = nic->cb_to_send = nic->cb_to_clean = NULL; nic->cbs_avail = 0; - nic->cbs = pci_pool_zalloc(nic->cbs_pool, GFP_KERNEL, + nic->cbs = dma_pool_zalloc(nic->cbs_pool, GFP_KERNEL, &nic->cbs_dma_addr); if (!nic->cbs) return -ENOMEM; @@ -2960,8 +2960,8 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent) netif_err(nic, probe, nic->netdev, "Cannot register net device, aborting\n"); goto err_out_free; } - nic->cbs_pool = pci_pool_create(netdev->name, - nic->pdev, + nic->cbs_pool = dma_pool_create(netdev->name, + &nic->pdev->dev, nic->params.cbs.max * sizeof(struct cb), sizeof(u32), 0); @@ -3001,7 +3001,7 @@ static void e100_remove(struct pci_dev *pdev) unregister_netdev(netdev); e100_free(nic); pci_iounmap(pdev, nic->csr); - pci_pool_destroy(nic->cbs_pool); + dma_pool_destroy(nic->cbs_pool); free_netdev(netdev); pci_release_regions(pdev); pci_disable_device(pdev);