Linux-SCSI Archive on lore.kernel.org
 help / color / 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	[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, back to index

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

Linux-SCSI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-scsi/0 linux-scsi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-scsi linux-scsi/ https://lore.kernel.org/linux-scsi \
		linux-scsi@vger.kernel.org linux-scsi@archiver.kernel.org
	public-inbox-index linux-scsi


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-scsi


AGPL code for this site: git clone https://public-inbox.org/ public-inbox