All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: ufs: Replace deprecated PCI functions
@ 2024-10-28 10:24 Philipp Stanner
  2024-10-28 11:55 ` Bean Huo
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Philipp Stanner @ 2024-10-28 10:24 UTC (permalink / raw)
  To: Pedro Sousa, James E.J. Bottomley, Martin K. Petersen,
	Bart Van Assche, Minwoo Im, Adrian Hunter
  Cc: linux-scsi, linux-kernel, Philipp Stanner

pcim_iomap_regions() and pcim_iomap_table() have been deprecated in
commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(),
pcim_iomap_regions_request_all()").

Replace these functions with pcim_iomap_region().

Signed-off-by: Philipp Stanner <pstanner@redhat.com>
---
 drivers/ufs/host/tc-dwc-g210-pci.c | 8 +++-----
 drivers/ufs/host/ufshcd-pci.c      | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/ufs/host/tc-dwc-g210-pci.c b/drivers/ufs/host/tc-dwc-g210-pci.c
index 876781fd6861..0167d8bef71a 100644
--- a/drivers/ufs/host/tc-dwc-g210-pci.c
+++ b/drivers/ufs/host/tc-dwc-g210-pci.c
@@ -80,14 +80,12 @@ tc_dwc_g210_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 
 	pci_set_master(pdev);
 
-	err = pcim_iomap_regions(pdev, 1 << 0, UFSHCD);
-	if (err < 0) {
+	mmio_base = pcim_iomap_region(pdev, 0, UFSHCD);
+	if (IS_ERR(mmio_base)) {
 		dev_err(&pdev->dev, "request and iomap failed\n");
-		return err;
+		return PTR_ERR(mmio_base);
 	}
 
-	mmio_base = pcim_iomap_table(pdev)[0];
-
 	err = ufshcd_alloc_host(&pdev->dev, &hba);
 	if (err) {
 		dev_err(&pdev->dev, "Allocation failed\n");
diff --git a/drivers/ufs/host/ufshcd-pci.c b/drivers/ufs/host/ufshcd-pci.c
index 54e0cc0653a2..ea39c5d5b8cf 100644
--- a/drivers/ufs/host/ufshcd-pci.c
+++ b/drivers/ufs/host/ufshcd-pci.c
@@ -588,14 +588,12 @@ ufshcd_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 
 	pci_set_master(pdev);
 
-	err = pcim_iomap_regions(pdev, 1 << 0, UFSHCD);
-	if (err < 0) {
+	mmio_base = pcim_iomap_region(pdev, 0, UFSHCD);
+	if (IS_ERR(mmio_base)) {
 		dev_err(&pdev->dev, "request and iomap failed\n");
-		return err;
+		return PTR_ERR(mmio_base);
 	}
 
-	mmio_base = pcim_iomap_table(pdev)[0];
-
 	err = ufshcd_alloc_host(&pdev->dev, &hba);
 	if (err) {
 		dev_err(&pdev->dev, "Allocation failed\n");
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: ufs: Replace deprecated PCI functions
  2024-10-28 10:24 [PATCH] scsi: ufs: Replace deprecated PCI functions Philipp Stanner
@ 2024-10-28 11:55 ` Bean Huo
  2024-10-30 13:41 ` Adrian Hunter
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Bean Huo @ 2024-10-28 11:55 UTC (permalink / raw)
  To: Philipp Stanner, Pedro Sousa, James E.J. Bottomley,
	Martin K. Petersen, Bart Van Assche, Minwoo Im, Adrian Hunter
  Cc: linux-scsi, linux-kernel

On Mon, 2024-10-28 at 11:24 +0100, Philipp Stanner wrote:
> pcim_iomap_regions() and pcim_iomap_table() have been deprecated in
> commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(),
> pcim_iomap_regions_request_all()").
> 
> Replace these functions with pcim_iomap_region().
> 
> Signed-off-by: Philipp Stanner <pstanner@redhat.com>

Reviewed-by: Bean Huo <beanhuo@micron.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: ufs: Replace deprecated PCI functions
  2024-10-28 10:24 [PATCH] scsi: ufs: Replace deprecated PCI functions Philipp Stanner
  2024-10-28 11:55 ` Bean Huo
@ 2024-10-30 13:41 ` Adrian Hunter
  2024-11-03  0:27 ` Martin K. Petersen
  2024-11-14  2:50 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Adrian Hunter @ 2024-10-30 13:41 UTC (permalink / raw)
  To: Philipp Stanner, Pedro Sousa, James E.J. Bottomley,
	Martin K. Petersen, Bart Van Assche, Minwoo Im
  Cc: linux-scsi, linux-kernel

On 28/10/24 12:24, Philipp Stanner wrote:
> pcim_iomap_regions() and pcim_iomap_table() have been deprecated in
> commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(),
> pcim_iomap_regions_request_all()").
> 
> Replace these functions with pcim_iomap_region().
> 
> Signed-off-by: Philipp Stanner <pstanner@redhat.com>

Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
>  drivers/ufs/host/tc-dwc-g210-pci.c | 8 +++-----
>  drivers/ufs/host/ufshcd-pci.c      | 8 +++-----
>  2 files changed, 6 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/ufs/host/tc-dwc-g210-pci.c b/drivers/ufs/host/tc-dwc-g210-pci.c
> index 876781fd6861..0167d8bef71a 100644
> --- a/drivers/ufs/host/tc-dwc-g210-pci.c
> +++ b/drivers/ufs/host/tc-dwc-g210-pci.c
> @@ -80,14 +80,12 @@ tc_dwc_g210_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>  
>  	pci_set_master(pdev);
>  
> -	err = pcim_iomap_regions(pdev, 1 << 0, UFSHCD);
> -	if (err < 0) {
> +	mmio_base = pcim_iomap_region(pdev, 0, UFSHCD);
> +	if (IS_ERR(mmio_base)) {
>  		dev_err(&pdev->dev, "request and iomap failed\n");
> -		return err;
> +		return PTR_ERR(mmio_base);
>  	}
>  
> -	mmio_base = pcim_iomap_table(pdev)[0];
> -
>  	err = ufshcd_alloc_host(&pdev->dev, &hba);
>  	if (err) {
>  		dev_err(&pdev->dev, "Allocation failed\n");
> diff --git a/drivers/ufs/host/ufshcd-pci.c b/drivers/ufs/host/ufshcd-pci.c
> index 54e0cc0653a2..ea39c5d5b8cf 100644
> --- a/drivers/ufs/host/ufshcd-pci.c
> +++ b/drivers/ufs/host/ufshcd-pci.c
> @@ -588,14 +588,12 @@ ufshcd_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>  
>  	pci_set_master(pdev);
>  
> -	err = pcim_iomap_regions(pdev, 1 << 0, UFSHCD);
> -	if (err < 0) {
> +	mmio_base = pcim_iomap_region(pdev, 0, UFSHCD);
> +	if (IS_ERR(mmio_base)) {
>  		dev_err(&pdev->dev, "request and iomap failed\n");
> -		return err;
> +		return PTR_ERR(mmio_base);
>  	}
>  
> -	mmio_base = pcim_iomap_table(pdev)[0];
> -
>  	err = ufshcd_alloc_host(&pdev->dev, &hba);
>  	if (err) {
>  		dev_err(&pdev->dev, "Allocation failed\n");


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: ufs: Replace deprecated PCI functions
  2024-10-28 10:24 [PATCH] scsi: ufs: Replace deprecated PCI functions Philipp Stanner
  2024-10-28 11:55 ` Bean Huo
  2024-10-30 13:41 ` Adrian Hunter
@ 2024-11-03  0:27 ` Martin K. Petersen
  2024-11-14  2:50 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2024-11-03  0:27 UTC (permalink / raw)
  To: Philipp Stanner
  Cc: Pedro Sousa, James E.J. Bottomley, Martin K. Petersen,
	Bart Van Assche, Minwoo Im, Adrian Hunter, linux-scsi,
	linux-kernel


Philipp,

> pcim_iomap_regions() and pcim_iomap_table() have been deprecated in
> commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(),
> pcim_iomap_regions_request_all()").
>
> Replace these functions with pcim_iomap_region().

Applied to 6.13/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi: ufs: Replace deprecated PCI functions
  2024-10-28 10:24 [PATCH] scsi: ufs: Replace deprecated PCI functions Philipp Stanner
                   ` (2 preceding siblings ...)
  2024-11-03  0:27 ` Martin K. Petersen
@ 2024-11-14  2:50 ` Martin K. Petersen
  3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2024-11-14  2:50 UTC (permalink / raw)
  To: Pedro Sousa, James E.J. Bottomley, Bart Van Assche, Minwoo Im,
	Adrian Hunter, Philipp Stanner
  Cc: Martin K . Petersen, linux-scsi, linux-kernel

On Mon, 28 Oct 2024 11:24:29 +0100, Philipp Stanner wrote:

> pcim_iomap_regions() and pcim_iomap_table() have been deprecated in
> commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(),
> pcim_iomap_regions_request_all()").
> 
> Replace these functions with pcim_iomap_region().
> 
> 
> [...]

Applied to 6.13/scsi-queue, thanks!

[1/1] scsi: ufs: Replace deprecated PCI functions
      https://git.kernel.org/mkp/scsi/c/84c1e27e6c64

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-11-14  2:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-28 10:24 [PATCH] scsi: ufs: Replace deprecated PCI functions Philipp Stanner
2024-10-28 11:55 ` Bean Huo
2024-10-30 13:41 ` Adrian Hunter
2024-11-03  0:27 ` Martin K. Petersen
2024-11-14  2:50 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.