Re: [PATCH v2 04/10] crypto: marvell - replace deprecated PCI functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(Reduced Cc list a lot)

On Mon, Aug 05, 2024 at 10:01:31AM +0200, Philipp Stanner wrote:
> pcim_iomap_table() and pcim_iomap_regions_request_all() have been
> deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate
> pcim_iomap_table(), pcim_iomap_regions_request_all()").
> 
> Replace these functions with their successors, pcim_iomap() and
> pcim_request_all_regions()

Missing period at the end.

...

> -	/* Map PF's configuration registers */
> -	err = pcim_iomap_regions_request_all(pdev, 1 << PCI_PF_REG_BAR_NUM,
> -					     OTX2_CPT_DRV_NAME);
> +	err = pcim_request_all_regions(pdev, OTX2_CPT_DRV_NAME);
>  	if (err) {
> -		dev_err(dev, "Couldn't get PCI resources 0x%x\n", err);
> +		dev_err(dev, "Couldn't request PCI resources 0x%x\n", err);
>  		goto clear_drvdata;
>  	}

I haven't looked at the implementation differences of those two, but would it
be really an equivalent change now?

Note, the resource may be requested, OR mapped, OR both. In accordance with the
naming above I assume that this is not equivalent change with potential
breakages.


> -	cptpf->reg_base = pcim_iomap_table(pdev)[PCI_PF_REG_BAR_NUM];
> +	/* Map PF's configuration registers */
> +	cptpf->reg_base = pcim_iomap(pdev, PCI_PF_REG_BAR_NUM, 0);
> +	if (!cptpf->reg_base) {
> +		err = -ENOMEM;
> +		dev_err(dev, "Couldn't ioremap PCI resource 0x%x\n", err);
> +		goto clear_drvdata;
> +	}

(Yes, I see this).

...

> --- a/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c
> +++ b/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c

Ditto. here.

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux