lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20170208182758.GG16878@collabora.com>
Date:   Wed, 8 Feb 2017 19:27:58 +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 07/19] wireless: ipw2200: Replace PCI pool old API

On Wed, Feb 08, 2017 at 05:34:45PM +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.



> 
> Signed-off-by: Romain Perier <romain.perier@...labora.com>
> ---
>  drivers/net/wireless/intel/ipw2x00/ipw2200.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
> index 5ef3c5c..6d77870 100644
> --- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
> +++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
> @@ -3211,7 +3211,7 @@ static int ipw_load_firmware(struct ipw_priv *priv, u8 * data, size_t len)
>  	struct fw_chunk *chunk;
>  	int total_nr = 0;
>  	int i;
> -	struct pci_pool *pool;
> +	struct dma_pool *pool;
>  	void **virts;
>  	dma_addr_t *phys;
>  
> @@ -3228,9 +3228,9 @@ static int ipw_load_firmware(struct ipw_priv *priv, u8 * data, size_t len)
>  		kfree(virts);
>  		return -ENOMEM;
>  	}
> -	pool = pci_pool_create("ipw2200", priv->pci_dev, CB_MAX_LENGTH, 0, 0);
> +	pool = dma_pool_create("ipw2200", &priv->pci_dev->dev, CB_MAX_LENGTH, 0, 0);
Introduces line over 80 characters warning. Please fix and resubmit.
Other than that looks good. Tested by compiling it.
>  	if (!pool) {
> -		IPW_ERROR("pci_pool_create failed\n");
> +		IPW_ERROR("dma_pool_create failed\n");
>  		kfree(phys);
>  		kfree(virts);
>  		return -ENOMEM;
> @@ -3255,7 +3255,7 @@ static int ipw_load_firmware(struct ipw_priv *priv, u8 * data, size_t len)
>  
>  		nr = (chunk_len + CB_MAX_LENGTH - 1) / CB_MAX_LENGTH;
>  		for (i = 0; i < nr; i++) {
> -			virts[total_nr] = pci_pool_alloc(pool, GFP_KERNEL,
> +			virts[total_nr] = dma_pool_alloc(pool, GFP_KERNEL,
>  							 &phys[total_nr]);
>  			if (!virts[total_nr]) {
>  				ret = -ENOMEM;
> @@ -3299,9 +3299,9 @@ static int ipw_load_firmware(struct ipw_priv *priv, u8 * data, size_t len)
>  	}
>   out:
>  	for (i = 0; i < total_nr; i++)
> -		pci_pool_free(pool, virts[i], phys[i]);
> +		dma_pool_free(pool, virts[i], phys[i]);
>  
> -	pci_pool_destroy(pool);
> +	dma_pool_destroy(pool);
>  	kfree(phys);
>  	kfree(virts);
>  
> -- 
> 2.9.3
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ