linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] scsi: ufshcd: use devm_platform_ioremap_resource() to simplify code
@ 2019-09-04 13:03 YueHaibing
  2019-09-04 13:38 ` Avri Altman
  2019-09-07 20:42 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2019-09-04 13:03 UTC (permalink / raw)
  To: alim.akhtar, avri.altman, pedrom.sousa, jejb, martin.petersen,
	stanley.chu, beanhuo, yuehaibing, arnd
  Cc: linux-scsi, linux-kernel

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/ufs/ufshcd-pltfrm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c
index d7d521b..8d40dc9 100644
--- a/drivers/scsi/ufs/ufshcd-pltfrm.c
+++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
@@ -391,12 +391,10 @@ int ufshcd_pltfrm_init(struct platform_device *pdev,
 {
 	struct ufs_hba *hba;
 	void __iomem *mmio_base;
-	struct resource *mem_res;
 	int irq, err;
 	struct device *dev = &pdev->dev;
 
-	mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mmio_base = devm_ioremap_resource(dev, mem_res);
+	mmio_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(mmio_base)) {
 		err = PTR_ERR(mmio_base);
 		goto out;
-- 
2.7.4



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

* RE: [PATCH -next] scsi: ufshcd: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:03 [PATCH -next] scsi: ufshcd: use devm_platform_ioremap_resource() to simplify code YueHaibing
@ 2019-09-04 13:38 ` Avri Altman
  2019-09-07 20:42 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Avri Altman @ 2019-09-04 13:38 UTC (permalink / raw)
  To: YueHaibing, alim.akhtar, pedrom.sousa, jejb, martin.petersen,
	stanley.chu, beanhuo, arnd
  Cc: linux-scsi, linux-kernel

> 
> 
> 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>
Reviewed-by: Avri Altman <avri.altman@wdc.com>

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

* Re: [PATCH -next] scsi: ufshcd: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:03 [PATCH -next] scsi: ufshcd: use devm_platform_ioremap_resource() to simplify code YueHaibing
  2019-09-04 13:38 ` Avri Altman
@ 2019-09-07 20:42 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2019-09-07 20:42 UTC (permalink / raw)
  To: YueHaibing
  Cc: alim.akhtar, avri.altman, pedrom.sousa, jejb, martin.petersen,
	stanley.chu, beanhuo, arnd, 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:43 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:03 [PATCH -next] scsi: ufshcd: use devm_platform_ioremap_resource() to simplify code YueHaibing
2019-09-04 13:38 ` Avri Altman
2019-09-07 20:42 ` 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).