All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yangtao Li <tiny.windzz@gmail.com>
To: m.szyprowski@samsung.com, joro@8bytes.org, kgene@kernel.org,
	krzk@kernel.org, matthias.bgg@gmail.com, agross@kernel.org,
	bjorn.andersson@linaro.org, robdclark@gmail.com, heiko@sntech.de,
	mst@redhat.com, jasowang@redhat.com,
	iommu@lists.linux-foundation.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mediatek@lists.infradead.org,
	linux-arm-msm@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	virtualization@lists.linux-foundation.org
Cc: Yangtao Li <tiny.windzz@gmail.com>
Subject: [PATCH 4/6] iommu/ipmmu-vmsa: convert to devm_platform_ioremap_resource
Date: Mon, 23 Dec 2019 18:59:16 +0000	[thread overview]
Message-ID: <20191223185918.9877-5-tiny.windzz@gmail.com> (raw)
In-Reply-To: <20191223185918.9877-1-tiny.windzz@gmail.com>

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/iommu/ipmmu-vmsa.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
index d02edd2751f3..3124e28fee85 100644
--- a/drivers/iommu/ipmmu-vmsa.c
+++ b/drivers/iommu/ipmmu-vmsa.c
@@ -1015,7 +1015,6 @@ static const struct of_device_id ipmmu_of_ids[] = {
 static int ipmmu_probe(struct platform_device *pdev)
 {
 	struct ipmmu_vmsa_device *mmu;
-	struct resource *res;
 	int irq;
 	int ret;
 
@@ -1033,8 +1032,7 @@ static int ipmmu_probe(struct platform_device *pdev)
 	dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(40));
 
 	/* Map I/O memory and request IRQ. */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mmu->base = devm_ioremap_resource(&pdev->dev, res);
+	mmu->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(mmu->base))
 		return PTR_ERR(mmu->base);
 
-- 
2.17.1


WARNING: multiple messages have this Message-ID (diff)
From: Yangtao Li <tiny.windzz@gmail.com>
To: m.szyprowski@samsung.com, joro@8bytes.org, kgene@kernel.org,
	krzk@kernel.org, matthias.bgg@gmail.com, agross@kernel.org,
	bjorn.andersson@linaro.org, robdclark@gmail.com, heiko@sntech.de,
	mst@redhat.com, jasowang@redhat.com,
	iommu@lists.linux-foundation.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mediatek@lists.infradead.org,
	linux-arm-msm@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	virtualization@lists.linux-foundation.org
Cc: Yangtao Li <tiny.windzz@gmail.com>
Subject: [PATCH 4/6] iommu/ipmmu-vmsa: convert to devm_platform_ioremap_resource
Date: Mon, 23 Dec 2019 18:59:16 +0000	[thread overview]
Message-ID: <20191223185918.9877-5-tiny.windzz@gmail.com> (raw)
In-Reply-To: <20191223185918.9877-1-tiny.windzz@gmail.com>

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/iommu/ipmmu-vmsa.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
index d02edd2751f3..3124e28fee85 100644
--- a/drivers/iommu/ipmmu-vmsa.c
+++ b/drivers/iommu/ipmmu-vmsa.c
@@ -1015,7 +1015,6 @@ static const struct of_device_id ipmmu_of_ids[] = {
 static int ipmmu_probe(struct platform_device *pdev)
 {
 	struct ipmmu_vmsa_device *mmu;
-	struct resource *res;
 	int irq;
 	int ret;
 
@@ -1033,8 +1032,7 @@ static int ipmmu_probe(struct platform_device *pdev)
 	dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(40));
 
 	/* Map I/O memory and request IRQ. */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mmu->base = devm_ioremap_resource(&pdev->dev, res);
+	mmu->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(mmu->base))
 		return PTR_ERR(mmu->base);
 
-- 
2.17.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

WARNING: multiple messages have this Message-ID (diff)
From: Yangtao Li <tiny.windzz@gmail.com>
To: m.szyprowski@samsung.com, joro@8bytes.org, kgene@kernel.org,
	krzk@kernel.org, matthias.bgg@gmail.com, agross@kernel.org,
	bjorn.andersson@linaro.org, robdclark@gmail.com, heiko@sntech.de,
	mst@redhat.com, jasowang@redhat.com,
	iommu@lists.linux-foundation.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mediatek@lists.infradead.org,
	linux-arm-msm@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	virtualization@lists.linux-foundation.org
Cc: Yangtao Li <tiny.windzz@gmail.com>
Subject: [PATCH 4/6] iommu/ipmmu-vmsa: convert to devm_platform_ioremap_resource
Date: Mon, 23 Dec 2019 18:59:16 +0000	[thread overview]
Message-ID: <20191223185918.9877-5-tiny.windzz@gmail.com> (raw)
In-Reply-To: <20191223185918.9877-1-tiny.windzz@gmail.com>

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/iommu/ipmmu-vmsa.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
index d02edd2751f3..3124e28fee85 100644
--- a/drivers/iommu/ipmmu-vmsa.c
+++ b/drivers/iommu/ipmmu-vmsa.c
@@ -1015,7 +1015,6 @@ static const struct of_device_id ipmmu_of_ids[] = {
 static int ipmmu_probe(struct platform_device *pdev)
 {
 	struct ipmmu_vmsa_device *mmu;
-	struct resource *res;
 	int irq;
 	int ret;
 
@@ -1033,8 +1032,7 @@ static int ipmmu_probe(struct platform_device *pdev)
 	dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(40));
 
 	/* Map I/O memory and request IRQ. */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mmu->base = devm_ioremap_resource(&pdev->dev, res);
+	mmu->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(mmu->base))
 		return PTR_ERR(mmu->base);
 
-- 
2.17.1


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Yangtao Li <tiny.windzz@gmail.com>
To: m.szyprowski@samsung.com, joro@8bytes.org, kgene@kernel.org,
	krzk@kernel.org, matthias.bgg@gmail.com, agross@kernel.org,
	bjorn.andersson@linaro.org, robdclark@gmail.com, heiko@sntech.de,
	mst@redhat.com, jasowang@redhat.com,
	iommu@lists.linux-foundation.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mediatek@lists.infradead.org,
	linux-arm-msm@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	virtualization@lists.linux-foundation.org
Cc: Yangtao Li <tiny.windzz@gmail.com>
Subject: [PATCH 4/6] iommu/ipmmu-vmsa: convert to devm_platform_ioremap_resource
Date: Mon, 23 Dec 2019 18:59:16 +0000	[thread overview]
Message-ID: <20191223185918.9877-5-tiny.windzz@gmail.com> (raw)
In-Reply-To: <20191223185918.9877-1-tiny.windzz@gmail.com>

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/iommu/ipmmu-vmsa.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
index d02edd2751f3..3124e28fee85 100644
--- a/drivers/iommu/ipmmu-vmsa.c
+++ b/drivers/iommu/ipmmu-vmsa.c
@@ -1015,7 +1015,6 @@ static const struct of_device_id ipmmu_of_ids[] = {
 static int ipmmu_probe(struct platform_device *pdev)
 {
 	struct ipmmu_vmsa_device *mmu;
-	struct resource *res;
 	int irq;
 	int ret;
 
@@ -1033,8 +1032,7 @@ static int ipmmu_probe(struct platform_device *pdev)
 	dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(40));
 
 	/* Map I/O memory and request IRQ. */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mmu->base = devm_ioremap_resource(&pdev->dev, res);
+	mmu->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(mmu->base))
 		return PTR_ERR(mmu->base);
 
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2019-12-23 18:59 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-23 18:59 [PATCH 1/6] iommu/omap: convert to devm_platform_ioremap_resource Yangtao Li
2019-12-23 18:59 ` Yangtao Li
2019-12-23 18:59 ` Yangtao Li
2019-12-23 18:59 ` Yangtao Li
2019-12-23 18:59 ` [PATCH] virtio-mmio: " Yangtao Li
2019-12-23 18:59   ` Yangtao Li
2019-12-23 18:59   ` Yangtao Li
2019-12-23 18:59   ` Yangtao Li
2019-12-23 19:00   ` Frank Lee
2019-12-23 19:00     ` Frank Lee
2019-12-23 19:00     ` Frank Lee
2019-12-23 19:00     ` Frank Lee
2019-12-23 19:00   ` Frank Lee
2019-12-23 18:59 ` Yangtao Li
2019-12-23 18:59 ` [PATCH 2/6] iommu/exynos: " Yangtao Li
2019-12-23 18:59   ` Yangtao Li
2019-12-23 18:59   ` Yangtao Li
2019-12-23 18:59   ` Yangtao Li
2019-12-23 18:59 ` [PATCH 3/6] iommu/qcom: " Yangtao Li
2019-12-23 18:59   ` Yangtao Li
2019-12-23 18:59   ` Yangtao Li
2019-12-23 18:59   ` Yangtao Li
2019-12-23 18:59 ` Yangtao Li [this message]
2019-12-23 18:59   ` [PATCH 4/6] iommu/ipmmu-vmsa: " Yangtao Li
2019-12-23 18:59   ` Yangtao Li
2019-12-23 18:59   ` Yangtao Li
2019-12-23 18:59 ` [PATCH 5/6] iommu/mediatek: " Yangtao Li
2019-12-23 18:59 ` Yangtao Li
2019-12-23 18:59   ` Yangtao Li
2019-12-23 18:59   ` Yangtao Li
2019-12-23 18:59   ` Yangtao Li
2019-12-23 18:59 ` [PATCH 6/6] iommu/rockchip: " Yangtao Li
2019-12-23 18:59 ` Yangtao Li
2019-12-23 18:59   ` Yangtao Li
2019-12-23 18:59   ` Yangtao Li
2019-12-23 18:59   ` Yangtao Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191223185918.9877-5-tiny.windzz@gmail.com \
    --to=tiny.windzz@gmail.com \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=heiko@sntech.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jasowang@redhat.com \
    --cc=joro@8bytes.org \
    --cc=kgene@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mst@redhat.com \
    --cc=robdclark@gmail.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.