* [PATCH 1/6] iommu/arm-smmu: do some cleanup
@ 2023-07-05 13:04 ` Yangtao Li
0 siblings, 0 replies; 13+ messages in thread
From: Yangtao Li @ 2023-07-05 13:04 UTC (permalink / raw)
To: Rob Clark, Will Deacon, Robin Murphy, Joerg Roedel
Cc: Yangtao Li, iommu, linux-arm-msm, linux-arm-kernel, linux-kernel
Convert to use devm_platform_ioremap_resource() and fix return value
when platform_get_irq fails.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/iommu/arm/arm-smmu/qcom_iommu.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu/arm/arm-smmu/qcom_iommu.c b/drivers/iommu/arm/arm-smmu/qcom_iommu.c
index a503ed758ec3..abf798104830 100644
--- a/drivers/iommu/arm/arm-smmu/qcom_iommu.c
+++ b/drivers/iommu/arm/arm-smmu/qcom_iommu.c
@@ -633,7 +633,6 @@ static int qcom_iommu_ctx_probe(struct platform_device *pdev)
struct qcom_iommu_ctx *ctx;
struct device *dev = &pdev->dev;
struct qcom_iommu_dev *qcom_iommu = dev_get_drvdata(dev->parent);
- struct resource *res;
int ret, irq;
ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
@@ -643,14 +642,13 @@ static int qcom_iommu_ctx_probe(struct platform_device *pdev)
ctx->dev = dev;
platform_set_drvdata(pdev, ctx);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- ctx->base = devm_ioremap_resource(dev, res);
+ ctx->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(ctx->base))
return PTR_ERR(ctx->base);
irq = platform_get_irq(pdev, 0);
if (irq < 0)
- return -ENODEV;
+ return irq;
/* clear IRQs before registering fault handler, just in case the
* boot-loader left us a surprise:
--
2.39.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 1/6] iommu/arm-smmu: do some cleanup
@ 2023-07-05 13:04 ` Yangtao Li
0 siblings, 0 replies; 13+ messages in thread
From: Yangtao Li @ 2023-07-05 13:04 UTC (permalink / raw)
To: Rob Clark, Will Deacon, Robin Murphy, Joerg Roedel
Cc: Yangtao Li, iommu, linux-arm-msm, linux-arm-kernel, linux-kernel
Convert to use devm_platform_ioremap_resource() and fix return value
when platform_get_irq fails.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/iommu/arm/arm-smmu/qcom_iommu.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu/arm/arm-smmu/qcom_iommu.c b/drivers/iommu/arm/arm-smmu/qcom_iommu.c
index a503ed758ec3..abf798104830 100644
--- a/drivers/iommu/arm/arm-smmu/qcom_iommu.c
+++ b/drivers/iommu/arm/arm-smmu/qcom_iommu.c
@@ -633,7 +633,6 @@ static int qcom_iommu_ctx_probe(struct platform_device *pdev)
struct qcom_iommu_ctx *ctx;
struct device *dev = &pdev->dev;
struct qcom_iommu_dev *qcom_iommu = dev_get_drvdata(dev->parent);
- struct resource *res;
int ret, irq;
ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
@@ -643,14 +642,13 @@ static int qcom_iommu_ctx_probe(struct platform_device *pdev)
ctx->dev = dev;
platform_set_drvdata(pdev, ctx);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- ctx->base = devm_ioremap_resource(dev, res);
+ ctx->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(ctx->base))
return PTR_ERR(ctx->base);
irq = platform_get_irq(pdev, 0);
if (irq < 0)
- return -ENODEV;
+ return irq;
/* clear IRQs before registering fault handler, just in case the
* boot-loader left us a surprise:
--
2.39.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/6] iommu/omap: do some cleanup
2023-07-05 13:04 ` Yangtao Li
(?)
@ 2023-07-05 13:04 ` Yangtao Li
-1 siblings, 0 replies; 13+ messages in thread
From: Yangtao Li @ 2023-07-05 13:04 UTC (permalink / raw)
To: Joerg Roedel, Will Deacon, Robin Murphy; +Cc: Yangtao Li, iommu, linux-kernel
Convert to use devm_platform_ioremap_resource() and fix return value
when platform_get_irq fails.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/iommu/omap-iommu.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index 537e402f9bba..ed4a29478473 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -1163,7 +1163,6 @@ static int omap_iommu_probe(struct platform_device *pdev)
int err = -ENODEV;
int irq;
struct omap_iommu *obj;
- struct resource *res;
struct device_node *of = pdev->dev.of_node;
if (!of) {
@@ -1205,8 +1204,7 @@ static int omap_iommu_probe(struct platform_device *pdev)
spin_lock_init(&obj->iommu_lock);
spin_lock_init(&obj->page_table_lock);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- obj->regbase = devm_ioremap_resource(obj->dev, res);
+ obj->regbase = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(obj->regbase))
return PTR_ERR(obj->regbase);
@@ -1216,7 +1214,7 @@ static int omap_iommu_probe(struct platform_device *pdev)
irq = platform_get_irq(pdev, 0);
if (irq < 0)
- return -ENODEV;
+ return irq;
err = devm_request_irq(obj->dev, irq, iommu_fault_handler, IRQF_SHARED,
dev_name(obj->dev), obj);
--
2.39.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/6] iommu/msm: do some cleanup
2023-07-05 13:04 ` Yangtao Li
(?)
(?)
@ 2023-07-05 13:04 ` Yangtao Li
-1 siblings, 0 replies; 13+ messages in thread
From: Yangtao Li @ 2023-07-05 13:04 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Joerg Roedel,
Will Deacon, Robin Murphy
Cc: Yangtao Li, linux-arm-msm, iommu, linux-kernel
Convert to devm_platform_get_and_ioremap_resource(), remove redundant msg
and fix return value when platform_get_irq fails.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/iommu/msm_iommu.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c
index 79d89bad5132..349b46b4b714 100644
--- a/drivers/iommu/msm_iommu.c
+++ b/drivers/iommu/msm_iommu.c
@@ -735,17 +735,16 @@ static int msm_iommu_probe(struct platform_device *pdev)
return dev_err_probe(iommu->dev, ret, "could not prepare iommu_clk\n");
}
- r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- iommu->base = devm_ioremap_resource(iommu->dev, r);
+ iommu->base = devm_platform_get_and_ioremap_resource(pdev, 0, &r);
if (IS_ERR(iommu->base)) {
- ret = dev_err_probe(iommu->dev, PTR_ERR(iommu->base), "could not get iommu base\n");
+ ret = PTR_ERR(iommu->base);
goto fail;
}
ioaddr = r->start;
iommu->irq = platform_get_irq(pdev, 0);
if (iommu->irq < 0) {
- ret = -ENODEV;
+ ret = iommu->irq;
goto fail;
}
--
2.39.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/6] iommu/exynos: Convert to devm_platform_ioremap_resource()
2023-07-05 13:04 ` Yangtao Li
@ 2023-07-05 13:04 ` Yangtao Li
-1 siblings, 0 replies; 13+ messages in thread
From: Yangtao Li @ 2023-07-05 13:04 UTC (permalink / raw)
To: Marek Szyprowski, Joerg Roedel, Will Deacon, Robin Murphy,
Krzysztof Kozlowski, Alim Akhtar
Cc: Yangtao Li, iommu, linux-arm-kernel, linux-samsung-soc, linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/iommu/exynos-iommu.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
index c275fe71c4db..ab6208015997 100644
--- a/drivers/iommu/exynos-iommu.c
+++ b/drivers/iommu/exynos-iommu.c
@@ -725,19 +725,17 @@ static int exynos_sysmmu_probe(struct platform_device *pdev)
int irq, ret;
struct device *dev = &pdev->dev;
struct sysmmu_drvdata *data;
- struct resource *res;
data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
if (!data)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- data->sfrbase = devm_ioremap_resource(dev, res);
+ data->sfrbase = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(data->sfrbase))
return PTR_ERR(data->sfrbase);
irq = platform_get_irq(pdev, 0);
- if (irq <= 0)
+ if (irq < 0)
return irq;
ret = devm_request_irq(dev, irq, exynos_sysmmu_irq, 0,
--
2.39.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/6] iommu/exynos: Convert to devm_platform_ioremap_resource()
@ 2023-07-05 13:04 ` Yangtao Li
0 siblings, 0 replies; 13+ messages in thread
From: Yangtao Li @ 2023-07-05 13:04 UTC (permalink / raw)
To: Marek Szyprowski, Joerg Roedel, Will Deacon, Robin Murphy,
Krzysztof Kozlowski, Alim Akhtar
Cc: Yangtao Li, iommu, linux-arm-kernel, linux-samsung-soc, linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/iommu/exynos-iommu.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
index c275fe71c4db..ab6208015997 100644
--- a/drivers/iommu/exynos-iommu.c
+++ b/drivers/iommu/exynos-iommu.c
@@ -725,19 +725,17 @@ static int exynos_sysmmu_probe(struct platform_device *pdev)
int irq, ret;
struct device *dev = &pdev->dev;
struct sysmmu_drvdata *data;
- struct resource *res;
data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
if (!data)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- data->sfrbase = devm_ioremap_resource(dev, res);
+ data->sfrbase = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(data->sfrbase))
return PTR_ERR(data->sfrbase);
irq = platform_get_irq(pdev, 0);
- if (irq <= 0)
+ if (irq < 0)
return irq;
ret = devm_request_irq(dev, irq, exynos_sysmmu_irq, 0,
--
2.39.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 5/6] iommu/ipmmu-vmsa: Convert to devm_platform_ioremap_resource()
2023-07-05 13:04 ` Yangtao Li
` (3 preceding siblings ...)
(?)
@ 2023-07-05 13:04 ` Yangtao Li
-1 siblings, 0 replies; 13+ messages in thread
From: Yangtao Li @ 2023-07-05 13:04 UTC (permalink / raw)
To: Joerg Roedel, Will Deacon, Robin Murphy; +Cc: Yangtao Li, iommu, linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.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 9f64c5c9f5b9..01cf577e597c 100644
--- a/drivers/iommu/ipmmu-vmsa.c
+++ b/drivers/iommu/ipmmu-vmsa.c
@@ -976,7 +976,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;
@@ -996,8 +995,7 @@ static int ipmmu_probe(struct platform_device *pdev)
return ret;
/* 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.39.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 6/6] iommu/mediatek: Convert to devm_platform_ioremap_resource() and devm_platform_get_and_ioremap_resource()
2023-07-05 13:04 ` Yangtao Li
@ 2023-07-05 13:04 ` Yangtao Li
-1 siblings, 0 replies; 13+ messages in thread
From: Yangtao Li @ 2023-07-05 13:04 UTC (permalink / raw)
To: Yong Wu, Joerg Roedel, Will Deacon, Robin Murphy,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: Yangtao Li, iommu, linux-mediatek, linux-kernel, linux-arm-kernel
Use devm_platform_ioremap_resource() and
devm_platform_get_and_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/iommu/mtk_iommu.c | 9 +++------
drivers/iommu/mtk_iommu_v1.c | 4 +---
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index e93906d6e112..6595a25c103d 100644
--- a/drivers/iommu/mtk_iommu.c
+++ b/drivers/iommu/mtk_iommu.c
@@ -1264,16 +1264,13 @@ static int mtk_iommu_probe(struct platform_device *pdev)
}
banks_num = data->plat_data->banks_num;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res)
- return -EINVAL;
+ base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
+ if (IS_ERR(base))
+ return PTR_ERR(base);
if (resource_size(res) < banks_num * MTK_IOMMU_BANK_SZ) {
dev_err(dev, "banknr %d. res %pR is not enough.\n", banks_num, res);
return -EINVAL;
}
- base = devm_ioremap_resource(dev, res);
- if (IS_ERR(base))
- return PTR_ERR(base);
ioaddr = res->start;
data->bank = devm_kmalloc(dev, banks_num * sizeof(*data->bank), GFP_KERNEL);
diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c
index 8a0a5e5d049f..2e116241f80b 100644
--- a/drivers/iommu/mtk_iommu_v1.c
+++ b/drivers/iommu/mtk_iommu_v1.c
@@ -610,7 +610,6 @@ static int mtk_iommu_v1_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct mtk_iommu_v1_data *data;
- struct resource *res;
struct component_match *match = NULL;
void *protect;
int larb_nr, ret, i;
@@ -628,8 +627,7 @@ static int mtk_iommu_v1_probe(struct platform_device *pdev)
return -ENOMEM;
data->protect_base = ALIGN(virt_to_phys(protect), MTK_PROTECT_PA_ALIGN);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- data->base = devm_ioremap_resource(dev, res);
+ data->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(data->base))
return PTR_ERR(data->base);
--
2.39.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 6/6] iommu/mediatek: Convert to devm_platform_ioremap_resource() and devm_platform_get_and_ioremap_resource()
@ 2023-07-05 13:04 ` Yangtao Li
0 siblings, 0 replies; 13+ messages in thread
From: Yangtao Li @ 2023-07-05 13:04 UTC (permalink / raw)
To: Yong Wu, Joerg Roedel, Will Deacon, Robin Murphy,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: Yangtao Li, iommu, linux-mediatek, linux-kernel, linux-arm-kernel
Use devm_platform_ioremap_resource() and
devm_platform_get_and_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/iommu/mtk_iommu.c | 9 +++------
drivers/iommu/mtk_iommu_v1.c | 4 +---
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index e93906d6e112..6595a25c103d 100644
--- a/drivers/iommu/mtk_iommu.c
+++ b/drivers/iommu/mtk_iommu.c
@@ -1264,16 +1264,13 @@ static int mtk_iommu_probe(struct platform_device *pdev)
}
banks_num = data->plat_data->banks_num;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res)
- return -EINVAL;
+ base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
+ if (IS_ERR(base))
+ return PTR_ERR(base);
if (resource_size(res) < banks_num * MTK_IOMMU_BANK_SZ) {
dev_err(dev, "banknr %d. res %pR is not enough.\n", banks_num, res);
return -EINVAL;
}
- base = devm_ioremap_resource(dev, res);
- if (IS_ERR(base))
- return PTR_ERR(base);
ioaddr = res->start;
data->bank = devm_kmalloc(dev, banks_num * sizeof(*data->bank), GFP_KERNEL);
diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c
index 8a0a5e5d049f..2e116241f80b 100644
--- a/drivers/iommu/mtk_iommu_v1.c
+++ b/drivers/iommu/mtk_iommu_v1.c
@@ -610,7 +610,6 @@ static int mtk_iommu_v1_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct mtk_iommu_v1_data *data;
- struct resource *res;
struct component_match *match = NULL;
void *protect;
int larb_nr, ret, i;
@@ -628,8 +627,7 @@ static int mtk_iommu_v1_probe(struct platform_device *pdev)
return -ENOMEM;
data->protect_base = ALIGN(virt_to_phys(protect), MTK_PROTECT_PA_ALIGN);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- data->base = devm_ioremap_resource(dev, res);
+ data->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(data->base))
return PTR_ERR(data->base);
--
2.39.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 4/6] iommu/exynos: Convert to devm_platform_ioremap_resource()
2023-07-05 13:04 ` Yangtao Li
@ 2023-07-10 14:41 ` Marek Szyprowski
-1 siblings, 0 replies; 13+ messages in thread
From: Marek Szyprowski @ 2023-07-10 14:41 UTC (permalink / raw)
To: Yangtao Li, Joerg Roedel, Will Deacon, Robin Murphy,
Krzysztof Kozlowski, Alim Akhtar
Cc: iommu, linux-arm-kernel, linux-samsung-soc, linux-kernel
On 05.07.2023 15:04, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> drivers/iommu/exynos-iommu.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
> index c275fe71c4db..ab6208015997 100644
> --- a/drivers/iommu/exynos-iommu.c
> +++ b/drivers/iommu/exynos-iommu.c
> @@ -725,19 +725,17 @@ static int exynos_sysmmu_probe(struct platform_device *pdev)
> int irq, ret;
> struct device *dev = &pdev->dev;
> struct sysmmu_drvdata *data;
> - struct resource *res;
>
> data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
> if (!data)
> return -ENOMEM;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - data->sfrbase = devm_ioremap_resource(dev, res);
> + data->sfrbase = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(data->sfrbase))
> return PTR_ERR(data->sfrbase);
>
> irq = platform_get_irq(pdev, 0);
> - if (irq <= 0)
> + if (irq < 0)
> return irq;
>
> ret = devm_request_irq(dev, irq, exynos_sysmmu_irq, 0,
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 4/6] iommu/exynos: Convert to devm_platform_ioremap_resource()
@ 2023-07-10 14:41 ` Marek Szyprowski
0 siblings, 0 replies; 13+ messages in thread
From: Marek Szyprowski @ 2023-07-10 14:41 UTC (permalink / raw)
To: Yangtao Li, Joerg Roedel, Will Deacon, Robin Murphy,
Krzysztof Kozlowski, Alim Akhtar
Cc: iommu, linux-arm-kernel, linux-samsung-soc, linux-kernel
On 05.07.2023 15:04, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> drivers/iommu/exynos-iommu.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
> index c275fe71c4db..ab6208015997 100644
> --- a/drivers/iommu/exynos-iommu.c
> +++ b/drivers/iommu/exynos-iommu.c
> @@ -725,19 +725,17 @@ static int exynos_sysmmu_probe(struct platform_device *pdev)
> int irq, ret;
> struct device *dev = &pdev->dev;
> struct sysmmu_drvdata *data;
> - struct resource *res;
>
> data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
> if (!data)
> return -ENOMEM;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - data->sfrbase = devm_ioremap_resource(dev, res);
> + data->sfrbase = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(data->sfrbase))
> return PTR_ERR(data->sfrbase);
>
> irq = platform_get_irq(pdev, 0);
> - if (irq <= 0)
> + if (irq < 0)
> return irq;
>
> ret = devm_request_irq(dev, irq, exynos_sysmmu_irq, 0,
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/6] iommu/arm-smmu: do some cleanup
2023-07-05 13:04 ` Yangtao Li
@ 2023-08-01 20:41 ` Will Deacon
-1 siblings, 0 replies; 13+ messages in thread
From: Will Deacon @ 2023-08-01 20:41 UTC (permalink / raw)
To: Robin Murphy, Yangtao Li, Rob Clark, Joerg Roedel
Cc: catalin.marinas, kernel-team, Will Deacon, linux-arm-msm, iommu,
linux-kernel, linux-arm-kernel
On Wed, 5 Jul 2023 21:04:11 +0800, Yangtao Li wrote:
> Convert to use devm_platform_ioremap_resource() and fix return value
> when platform_get_irq fails.
>
>
Applied Arm SMMU patch to will (for-joerg/arm-smmu/updates), thanks!
[1/6] iommu/arm-smmu: Clean up resource handling during Qualcomm context probe
https://git.kernel.org/will/c/0a8c264d51ad
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/6] iommu/arm-smmu: do some cleanup
@ 2023-08-01 20:41 ` Will Deacon
0 siblings, 0 replies; 13+ messages in thread
From: Will Deacon @ 2023-08-01 20:41 UTC (permalink / raw)
To: Robin Murphy, Yangtao Li, Rob Clark, Joerg Roedel
Cc: catalin.marinas, kernel-team, Will Deacon, linux-arm-msm, iommu,
linux-kernel, linux-arm-kernel
On Wed, 5 Jul 2023 21:04:11 +0800, Yangtao Li wrote:
> Convert to use devm_platform_ioremap_resource() and fix return value
> when platform_get_irq fails.
>
>
Applied Arm SMMU patch to will (for-joerg/arm-smmu/updates), thanks!
[1/6] iommu/arm-smmu: Clean up resource handling during Qualcomm context probe
https://git.kernel.org/will/c/0a8c264d51ad
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2023-08-01 20:42 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-05 13:04 [PATCH 1/6] iommu/arm-smmu: do some cleanup Yangtao Li
2023-07-05 13:04 ` Yangtao Li
2023-07-05 13:04 ` [PATCH 2/6] iommu/omap: " Yangtao Li
2023-07-05 13:04 ` [PATCH 3/6] iommu/msm: " Yangtao Li
2023-07-05 13:04 ` [PATCH 4/6] iommu/exynos: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-05 13:04 ` Yangtao Li
2023-07-10 14:41 ` Marek Szyprowski
2023-07-10 14:41 ` Marek Szyprowski
2023-07-05 13:04 ` [PATCH 5/6] iommu/ipmmu-vmsa: " Yangtao Li
2023-07-05 13:04 ` [PATCH 6/6] iommu/mediatek: Convert to devm_platform_ioremap_resource() and devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-05 13:04 ` Yangtao Li
2023-08-01 20:41 ` [PATCH 1/6] iommu/arm-smmu: do some cleanup Will Deacon
2023-08-01 20:41 ` Will Deacon
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.