From patchwork Mon Nov 20 19:32:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 10067137 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 92662603FA for ; Mon, 20 Nov 2017 19:35:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 868BA291CB for ; Mon, 20 Nov 2017 19:35:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B88A29144; Mon, 20 Nov 2017 19:35:10 +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 0316F28D1A for ; Mon, 20 Nov 2017 19:35:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752743AbdKTTe5 (ORCPT ); Mon, 20 Nov 2017 14:34:57 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:44651 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752400AbdKTTdJ (ORCPT ); Mon, 20 Nov 2017 14:33:09 -0500 Received: by mail-wm0-f66.google.com with SMTP id r68so21154857wmr.3; Mon, 20 Nov 2017 11:33:08 -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=dDIa8T4qGha6SgRFbsbtWrY/3ImlaXuTwfSVIXukEUq4EdI4nHUsruy7qhD8/Mc7WF 6F9ulghP0tlyadUyxGv7RWiuvfxMAo84x86OB19wLgIcg2PjJW6Ms+IgUbD2YnG4z3aK nr1rfdlV9/Oh79FGrnzuLnPX4w9eGkuJ0rg0hlTB5wZlqbLlCDa68cf3Vnvea99SWcbG OuXOGqoW1VJTzxGBhGXtuglae10iEMjUvfeWskqIRBuZkbavMxCJhc0jVajKnmu0Pbdg hVEbLns/1rokWGZtnh0AY+/DsXozZ7OyA5OiehqqSx+SdBrJiPamMgrcfkyKFefUFK64 it5w== 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=mWystk80H1uFNOQTjZT/PVnL01wmac8TBI/AOWjEKcF2/ZmPvpDE6JfCd+No0OrdgK TTj4kb8qBZAubl2c3jYOzaQAW1jGTBztc6r2ya9Ds7CrHZ1hPo2fcO6pJguzZue1/vWI boxy4xydW+SL1YRpMS5dpqeMAxOeu0ZW66qC61itcEplOz3EdxQtPJsNWp908g38+hQp DOT/ql5+MkJwgvDAB3cglJNUWP/wLt4VMFKBXjNGVxYCsArw6qPpNNEJzABN3O2xvwmf AhU+sYMlIBj1QsZOF1XvQAc0E9kI/aWp6ocqLXKN5rZ8EdqvoCgj4mxLbOMrXHcRTvP1 c2BQ== X-Gm-Message-State: AJaThX5L1GPW2YLFicOlEwuF8uUA/eDxmyCv31oCnw4bOnEBW+2XKC6K M6n2d2hV/kaqkPrB8Cai4q8= X-Google-Smtp-Source: AGs4zMavxCZWCK2A8EEdy0Y2bnRCGss3kfrRAP8qk6efAanOMbl1EC1AALaGoRUUPnqT1+qaaFI4XA== X-Received: by 10.28.217.144 with SMTP id q138mr11777089wmg.9.1511206387518; Mon, 20 Nov 2017 11:33:07 -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 d63sm3707994wmh.3.2017.11.20.11.33.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Nov 2017 11:33:06 -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 2/5] net: e100: Replace PCI pool old API Date: Mon, 20 Nov 2017 20:32:44 +0100 Message-Id: <20171120193247.8187-3-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 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 --- 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);