From patchwork Tue Jan 2 17:53:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 10141133 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 385726034B for ; Tue, 2 Jan 2018 17:55:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 269D728C63 for ; Tue, 2 Jan 2018 17:55:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A6C328C90; Tue, 2 Jan 2018 17:55:40 +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 B5A8528C63 for ; Tue, 2 Jan 2018 17:55:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751584AbeABRz1 (ORCPT ); Tue, 2 Jan 2018 12:55:27 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:45802 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751283AbeABRyN (ORCPT ); Tue, 2 Jan 2018 12:54:13 -0500 Received: by mail-wr0-f194.google.com with SMTP id o15so17079520wrf.12; Tue, 02 Jan 2018 09:54:12 -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=+/zBrUIzTw2pJ0VenjMLb5j6cnC5lAEe7XnKScaoH0I=; b=ifDQJaWCIxZ7TN2z0Ez1cX6kDMmTxRpZGzIGv/Wx2q+h5fmuyzE5Yj9lsB/gdG3XBm 5a1s7rYoN9RAApQlYFRg1b/RqY83y80atNt6cG9gw9Rn8Dur5fUgFPMy3PQVH+2s9Xy1 eRwGBt4uUxPSjBgEnj4kKBFuh5OTsv1aSjKiTox8CYO91wt8LZRss2pUTf0E4FEHG9RO O8kNsg7XxbAsiZ6ApN3eOszFEfc7u4CwF10bABdXOg+GssayOuQzTt3nQgmCMpNAcRqG DC+1SWpmGcm6x8qZlT4XtKE1r6X9bcYNT8vG/cc/jg27HAInPhqg6hqDek5PkbsETdGZ nxtw== 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=+/zBrUIzTw2pJ0VenjMLb5j6cnC5lAEe7XnKScaoH0I=; b=iNyhE3iVpH+VIY4cZ5aUKVuPtULlah6Q2Y9SMGJjQ0XuHqQkZ/L+nBDtJ4Ywq1L0ZE VbpZoC0mmqKGtXrao8sKAbWGgEedj8ZIwIuO/3Uiu1rl6QWE2WR9O5VGx2MLhQ08bOmF vRgKfKV9OUD2xyaqHsftEDwhZUtJuR/SRpl5YLwZzvn2CiST2sToYUcHv51lAyEuoYQv AV899mzRbh997VO++/m5Ota1PBwqBoEq9bbfAs3NXBj19dAhGg78nqCZ4q08MbN2wVd7 kkTWFJPrju9upa/1gOGZhipA6+ikNc3c4m9LhSoGmsapJiw6TCpwQQcRknWPhD7uPF/f EFgg== X-Gm-Message-State: AKGB3mJDUMoOnXQwdsXtmLLyVH04xbV+aeENsC6T6fZRnCL8JScTiPb3 P9MwlgPPLWF/BARmoGE6ndw= X-Google-Smtp-Source: ACJfBosihXQg+um/3q8fMYeRq9rx0F+zdoQQqgC7Du995EbC9w5rKszcdzmXvsD0OWAIv5IU3ugqZQ== X-Received: by 10.223.163.76 with SMTP id d12mr41804473wrb.85.1514915651799; Tue, 02 Jan 2018 09:54:11 -0800 (PST) Received: from rperier-xps-l502x (AToulouse-651-1-229-42.w90-38.abo.wanadoo.fr. [90.38.44.42]) by smtp.gmail.com with ESMTPSA id v62sm39638568wrc.13.2018.01.02.09.54.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jan 2018 09:54:10 -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, "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Romain Perier Subject: [PATCH v17 2/4] net: e100: Replace PCI pool old API Date: Tue, 2 Jan 2018 18:53:54 +0100 Message-Id: <20180102175356.7999-3-romain.perier@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180102175356.7999-1-romain.perier@gmail.com> References: <20180102175356.7999-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 Acked-by: David S. Miller Tested-by: Peter Senna Tschudin --- 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);