[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20170208184235.GN16878@collabora.com>
Date: Wed, 8 Feb 2017 19:42:35 +0100
From: Peter Senna Tschudin <peter.senna@...labora.com>
To: Romain Perier <romain.perier@...labora.com>
Cc: Dan Williams <dan.j.williams@...el.com>,
Doug Ledford <dledford@...hat.com>,
Sean Hefty <sean.hefty@...el.com>,
Hal Rosenstock <hal.rosenstock@...il.com>,
jeffrey.t.kirsher@...el.com,
"David S. Miller" <davem@...emloft.net>, stas.yakovlev@...il.com,
"James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Felipe Balbi <balbi@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-rdma@...r.kernel.org, netdev@...r.kernel.org,
linux-usb@...r.kernel.org, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org,
Peter Senna Tschudin <peter.senna@...labora.co.uk>
Subject: Re: [RFC 14/19] scsi: pmcraid: Replace PCI pool old API
On Wed, Feb 08, 2017 at 05:34:52PM +0100, Romain Perier wrote:
> The PCI pool API is deprecated. This commits replaces the PCI pool old
> API by the appropriated function with the DMA pool API.
>
Tested by compilation only.
Acked-by: Peter Senna Tschudin <peter.senna@...labora.com>
Tested-by: Peter Senna Tschudin <peter.senna@...labora.com>
> Signed-off-by: Romain Perier <romain.perier@...labora.com>
> ---
> drivers/scsi/pmcraid.c | 10 +++++-----
> drivers/scsi/pmcraid.h | 2 +-
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
> index 49e70a3..0f893c4 100644
> --- a/drivers/scsi/pmcraid.c
> +++ b/drivers/scsi/pmcraid.c
> @@ -4699,13 +4699,13 @@ pmcraid_release_control_blocks(
> return;
>
> for (i = 0; i < max_index; i++) {
> - pci_pool_free(pinstance->control_pool,
> + dma_pool_free(pinstance->control_pool,
> pinstance->cmd_list[i]->ioa_cb,
> pinstance->cmd_list[i]->ioa_cb_bus_addr);
> pinstance->cmd_list[i]->ioa_cb = NULL;
> pinstance->cmd_list[i]->ioa_cb_bus_addr = 0;
> }
> - pci_pool_destroy(pinstance->control_pool);
> + dma_pool_destroy(pinstance->control_pool);
> pinstance->control_pool = NULL;
> }
>
> @@ -4762,8 +4762,8 @@ static int pmcraid_allocate_control_blocks(struct pmcraid_instance *pinstance)
> pinstance->host->unique_id);
>
> pinstance->control_pool =
> - pci_pool_create(pinstance->ctl_pool_name,
> - pinstance->pdev,
> + dma_pool_create(pinstance->ctl_pool_name,
> + &pinstance->pdev->dev,
> sizeof(struct pmcraid_control_block),
> PMCRAID_IOARCB_ALIGNMENT, 0);
>
> @@ -4772,7 +4772,7 @@ static int pmcraid_allocate_control_blocks(struct pmcraid_instance *pinstance)
>
> for (i = 0; i < PMCRAID_MAX_CMD; i++) {
> pinstance->cmd_list[i]->ioa_cb =
> - pci_pool_alloc(
> + dma_pool_alloc(
> pinstance->control_pool,
> GFP_KERNEL,
> &(pinstance->cmd_list[i]->ioa_cb_bus_addr));
> diff --git a/drivers/scsi/pmcraid.h b/drivers/scsi/pmcraid.h
> index 568b18a..acf5a7b 100644
> --- a/drivers/scsi/pmcraid.h
> +++ b/drivers/scsi/pmcraid.h
> @@ -755,7 +755,7 @@ struct pmcraid_instance {
>
> /* structures related to command blocks */
> struct kmem_cache *cmd_cachep; /* cache for cmd blocks */
> - struct pci_pool *control_pool; /* pool for control blocks */
> + struct dma_pool *control_pool; /* pool for control blocks */
> char cmd_pool_name[64]; /* name of cmd cache */
> char ctl_pool_name[64]; /* name of control cache */
>
> --
> 2.9.3
>
Powered by blists - more mailing lists