linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] scsi: hisi_sas: use devm_platform_ioremap_resource() to simplify code
@ 2019-09-04 13:02 YueHaibing
  2019-09-04 13:44 ` John Garry
  2019-09-07 20:41 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2019-09-04 13:02 UTC (permalink / raw)
  To: john.garry, jejb, martin.petersen; +Cc: linux-scsi, linux-kernel, YueHaibing

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/scsi/hisi_sas/hisi_sas_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index d60eaaa..d34e398 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -2579,8 +2579,7 @@ static struct Scsi_Host *hisi_sas_shost_alloc(struct platform_device *pdev,
 		goto err_out;
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	hisi_hba->regs = devm_ioremap_resource(dev, res);
+	hisi_hba->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(hisi_hba->regs))
 		goto err_out;
 
-- 
2.7.4



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

* Re: [PATCH -next] scsi: hisi_sas: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:02 [PATCH -next] scsi: hisi_sas: use devm_platform_ioremap_resource() to simplify code YueHaibing
@ 2019-09-04 13:44 ` John Garry
  2019-09-07 20:41 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: John Garry @ 2019-09-04 13:44 UTC (permalink / raw)
  To: YueHaibing, jejb, martin.petersen; +Cc: linux-scsi, linux-kernel

On 04/09/2019 14:02, YueHaibing wrote:
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Acked-by: John Garry <john.garry@huawei.com>

> ---
>  drivers/scsi/hisi_sas/hisi_sas_main.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
> index d60eaaa..d34e398 100644
> --- a/drivers/scsi/hisi_sas/hisi_sas_main.c
> +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
> @@ -2579,8 +2579,7 @@ static struct Scsi_Host *hisi_sas_shost_alloc(struct platform_device *pdev,
>  		goto err_out;
>  	}
>
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	hisi_hba->regs = devm_ioremap_resource(dev, res);
> +	hisi_hba->regs = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(hisi_hba->regs))
>  		goto err_out;
>
>



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

* Re: [PATCH -next] scsi: hisi_sas: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:02 [PATCH -next] scsi: hisi_sas: use devm_platform_ioremap_resource() to simplify code YueHaibing
  2019-09-04 13:44 ` John Garry
@ 2019-09-07 20:41 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2019-09-07 20:41 UTC (permalink / raw)
  To: YueHaibing; +Cc: john.garry, jejb, martin.petersen, linux-scsi, linux-kernel


YueHaibing,

> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.

Applied to 5.4/scsi-queue, thanks.

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2019-09-07 20:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04 13:02 [PATCH -next] scsi: hisi_sas: use devm_platform_ioremap_resource() to simplify code YueHaibing
2019-09-04 13:44 ` John Garry
2019-09-07 20:41 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).