From patchwork Fri Dec 15 19:31:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 10115915 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 B890B60327 for ; Fri, 15 Dec 2017 19:31:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A84A02A12C for ; Fri, 15 Dec 2017 19:31:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D3312A135; Fri, 15 Dec 2017 19:31:52 +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 2FDE12A12C for ; Fri, 15 Dec 2017 19:31:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756500AbdLOTbt (ORCPT ); Fri, 15 Dec 2017 14:31:49 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:37516 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756286AbdLOTbk (ORCPT ); Fri, 15 Dec 2017 14:31:40 -0500 Received: by mail-wm0-f66.google.com with SMTP id f140so19550322wmd.2; Fri, 15 Dec 2017 11:31:39 -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=tBtICgQQ1bytD73vycnfRvWwaRTQZU0R0e68paHj6bQ=; b=XCYq6ahkp2NNpK0LSW3HUdaQ7VETLQeNyV4CWGAVhIjvOSDUocegT/fyZF5UJmcmfX HNeyUGhH6Y1TNXdaEKjJ/o6nW4+xAHcHSkGyPtFmrGY9wSxpsNJgCfmanTB329IsXUre y4IdEUUEvANJ4zDYYhwL5XFjuvxguazgVIGInYXKML03Z92c/6yM3ZzdeohH0sf6nUMy bzY43JtAH+bK4FCccU302SlnE8xBa9VWAHxAYzCausYBrzm57gCzAQ77GiUs+QbqE0kJ LclOxe8AdENWOg3Cj9mwN1islfLt8C1Q8bN0+N8O09rW5V9vp7nnk8H+YsvL69YWfOJb dCOw== 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=tBtICgQQ1bytD73vycnfRvWwaRTQZU0R0e68paHj6bQ=; b=TUEaF9UpnDWN0l6LWZGkPamWHRDIvb669YnHPA3NMZ41qCqthBebfv/REYIvIjaC4I /aD/erJXsNZIA02zwPrnaymBuhszmH/7U4GY8gfytYaPCxyAD60ej2wYy57V2dp/z6AC xB9oqJz1ttKbDZWQ2eL6m0ljtMBnZQ14VRp55u5EY+QTVoy3qCmXi8CAD632UZozJe1H p23mqavDMn8W5ni75OzK4JJTwBtJF+eCjM1sxPFn7fdpDEwt9dOMzqmTWkBsFDw8RD7M qD5mca7siVRXHyB8B1+A3u4pwRNwSl9k4oGGanbQwFGkeABplzJuQPQoGx1VRJQjZuBv jzBA== X-Gm-Message-State: AKGB3mJemDyz3za5nxKG5jScao/iO3DMk/CTr++aGla/hzsvidCQqzyA NQMWAIC2xULZuVdeyFXc8NWbzHr1GRM= X-Google-Smtp-Source: ACJfBoudVXN4fshnsBb0NavM2TCqvYfU0S+nRybWEbo4g+cz2HjTyIrQfuxIkiY363xqYFEwDkQ0QA== X-Received: by 10.28.111.15 with SMTP id k15mr5993373wmc.139.1513366298377; Fri, 15 Dec 2017 11:31:38 -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 c6sm3534521wmd.21.2017.12.15.11.31.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Dec 2017 11:31:37 -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 3/4] hinic: Replace PCI pool old API Date: Fri, 15 Dec 2017 20:31:22 +0100 Message-Id: <20171215193123.13395-4-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: David S. Miller --- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 10 +++++----- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c b/drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c index 7d95f0866fb0..28a81ac97af5 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c @@ -143,7 +143,7 @@ int hinic_alloc_cmdq_buf(struct hinic_cmdqs *cmdqs, struct hinic_hwif *hwif = cmdqs->hwif; struct pci_dev *pdev = hwif->pdev; - cmdq_buf->buf = pci_pool_alloc(cmdqs->cmdq_buf_pool, GFP_KERNEL, + cmdq_buf->buf = dma_pool_alloc(cmdqs->cmdq_buf_pool, GFP_KERNEL, &cmdq_buf->dma_addr); if (!cmdq_buf->buf) { dev_err(&pdev->dev, "Failed to allocate cmd from the pool\n"); @@ -161,7 +161,7 @@ int hinic_alloc_cmdq_buf(struct hinic_cmdqs *cmdqs, void hinic_free_cmdq_buf(struct hinic_cmdqs *cmdqs, struct hinic_cmdq_buf *cmdq_buf) { - pci_pool_free(cmdqs->cmdq_buf_pool, cmdq_buf->buf, cmdq_buf->dma_addr); + dma_pool_free(cmdqs->cmdq_buf_pool, cmdq_buf->buf, cmdq_buf->dma_addr); } static unsigned int cmdq_wqe_size_from_bdlen(enum bufdesc_len len) @@ -875,7 +875,7 @@ int hinic_init_cmdqs(struct hinic_cmdqs *cmdqs, struct hinic_hwif *hwif, int err; cmdqs->hwif = hwif; - cmdqs->cmdq_buf_pool = pci_pool_create("hinic_cmdq", pdev, + cmdqs->cmdq_buf_pool = dma_pool_create("hinic_cmdq", &pdev->dev, HINIC_CMDQ_BUF_SIZE, HINIC_CMDQ_BUF_SIZE, 0); if (!cmdqs->cmdq_buf_pool) @@ -916,7 +916,7 @@ int hinic_init_cmdqs(struct hinic_cmdqs *cmdqs, struct hinic_hwif *hwif, devm_kfree(&pdev->dev, cmdqs->saved_wqs); err_saved_wqs: - pci_pool_destroy(cmdqs->cmdq_buf_pool); + dma_pool_destroy(cmdqs->cmdq_buf_pool); return err; } @@ -942,5 +942,5 @@ void hinic_free_cmdqs(struct hinic_cmdqs *cmdqs) devm_kfree(&pdev->dev, cmdqs->saved_wqs); - pci_pool_destroy(cmdqs->cmdq_buf_pool); + dma_pool_destroy(cmdqs->cmdq_buf_pool); } diff --git a/drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.h b/drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.h index b35583400cb6..23f8d39eab68 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.h +++ b/drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.h @@ -157,7 +157,7 @@ struct hinic_cmdq { struct hinic_cmdqs { struct hinic_hwif *hwif; - struct pci_pool *cmdq_buf_pool; + struct dma_pool *cmdq_buf_pool; struct hinic_wq *saved_wqs;