* [PATCH -next 1/3] drm/mediatek: Use devm_platform_ioremap_resource()
@ 2023-04-12 6:46 Yang Li
2023-04-12 6:46 ` [PATCH -next 2/3] " Yang Li
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Yang Li @ 2023-04-12 6:46 UTC (permalink / raw)
To: airlied
Cc: daniel, matthias.bgg, chunkuang.hu, p.zabel,
angelogioacchino.delregno, dri-devel, linux-mediatek,
linux-kernel, linux-arm-kernel, Yang Li
Remove variable 'res' and convert platform_get_resource(),
devm_ioremap_resource() to a single call to
devm_platform_ioremap_resource(), as this is exactly what this function
does.
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/gpu/drm/mediatek/mtk_cec.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_cec.c b/drivers/gpu/drm/mediatek/mtk_cec.c
index b640bc0559e7..03aae9f95606 100644
--- a/drivers/gpu/drm/mediatek/mtk_cec.c
+++ b/drivers/gpu/drm/mediatek/mtk_cec.c
@@ -185,7 +185,6 @@ static int mtk_cec_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct mtk_cec *cec;
- struct resource *res;
int ret;
cec = devm_kzalloc(dev, sizeof(*cec), GFP_KERNEL);
@@ -195,8 +194,7 @@ static int mtk_cec_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, cec);
spin_lock_init(&cec->lock);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- cec->regs = devm_ioremap_resource(dev, res);
+ cec->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(cec->regs)) {
ret = PTR_ERR(cec->regs);
dev_err(dev, "Failed to ioremap cec: %d\n", ret);
--
2.20.1.7.g153144c
_______________________________________________
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] 10+ messages in thread
* [PATCH -next 2/3] drm/mediatek: Use devm_platform_ioremap_resource()
2023-04-12 6:46 [PATCH -next 1/3] drm/mediatek: Use devm_platform_ioremap_resource() Yang Li
@ 2023-04-12 6:46 ` Yang Li
2023-04-12 11:15 ` Matthias Brugger
2023-04-12 13:49 ` Alexandre Mergnat
2023-04-12 6:46 ` [PATCH -next 3/3] " Yang Li
` (2 subsequent siblings)
3 siblings, 2 replies; 10+ messages in thread
From: Yang Li @ 2023-04-12 6:46 UTC (permalink / raw)
To: airlied
Cc: daniel, matthias.bgg, chunkuang.hu, p.zabel,
angelogioacchino.delregno, dri-devel, linux-mediatek,
linux-kernel, linux-arm-kernel, Yang Li
Remove variable 'res' and convert platform_get_resource(),
devm_ioremap_resource() to a single call to
devm_platform_ioremap_resource(), as this is exactly what this function
does.
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/gpu/drm/mediatek/mtk_disp_aal.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_disp_aal.c b/drivers/gpu/drm/mediatek/mtk_disp_aal.c
index 434e8a9ce8ab..391fa0ece22c 100644
--- a/drivers/gpu/drm/mediatek/mtk_disp_aal.c
+++ b/drivers/gpu/drm/mediatek/mtk_disp_aal.c
@@ -104,7 +104,6 @@ static int mtk_disp_aal_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct mtk_disp_aal *priv;
- struct resource *res;
int ret;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
@@ -117,8 +116,7 @@ static int mtk_disp_aal_probe(struct platform_device *pdev)
return PTR_ERR(priv->clk);
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- priv->regs = devm_ioremap_resource(dev, res);
+ priv->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(priv->regs)) {
dev_err(dev, "failed to ioremap aal\n");
return PTR_ERR(priv->regs);
--
2.20.1.7.g153144c
_______________________________________________
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] 10+ messages in thread
* [PATCH -next 3/3] drm/mediatek: Use devm_platform_ioremap_resource()
2023-04-12 6:46 [PATCH -next 1/3] drm/mediatek: Use devm_platform_ioremap_resource() Yang Li
2023-04-12 6:46 ` [PATCH -next 2/3] " Yang Li
@ 2023-04-12 6:46 ` Yang Li
2023-04-12 11:16 ` Matthias Brugger
2023-04-12 13:49 ` Alexandre Mergnat
2023-04-12 11:15 ` [PATCH -next 1/3] " Matthias Brugger
2023-04-12 13:48 ` Alexandre Mergnat
3 siblings, 2 replies; 10+ messages in thread
From: Yang Li @ 2023-04-12 6:46 UTC (permalink / raw)
To: airlied
Cc: daniel, matthias.bgg, chunkuang.hu, p.zabel,
angelogioacchino.delregno, dri-devel, linux-mediatek,
linux-kernel, linux-arm-kernel, Yang Li
Remove variable 'res' and convert platform_get_resource(),
devm_ioremap_resource() to a single call to
devm_platform_ioremap_resource(), as this is exactly what this function
does.
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/gpu/drm/mediatek/mtk_disp_ccorr.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c b/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c
index 1773379b2439..5cee84cce0be 100644
--- a/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c
+++ b/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c
@@ -159,7 +159,6 @@ static int mtk_disp_ccorr_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct mtk_disp_ccorr *priv;
- struct resource *res;
int ret;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
@@ -172,8 +171,7 @@ static int mtk_disp_ccorr_probe(struct platform_device *pdev)
return PTR_ERR(priv->clk);
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- priv->regs = devm_ioremap_resource(dev, res);
+ priv->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(priv->regs)) {
dev_err(dev, "failed to ioremap ccorr\n");
return PTR_ERR(priv->regs);
--
2.20.1.7.g153144c
_______________________________________________
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] 10+ messages in thread
* Re: [PATCH -next 1/3] drm/mediatek: Use devm_platform_ioremap_resource()
2023-04-12 6:46 [PATCH -next 1/3] drm/mediatek: Use devm_platform_ioremap_resource() Yang Li
2023-04-12 6:46 ` [PATCH -next 2/3] " Yang Li
2023-04-12 6:46 ` [PATCH -next 3/3] " Yang Li
@ 2023-04-12 11:15 ` Matthias Brugger
2023-04-12 13:48 ` Alexandre Mergnat
3 siblings, 0 replies; 10+ messages in thread
From: Matthias Brugger @ 2023-04-12 11:15 UTC (permalink / raw)
To: Yang Li, airlied
Cc: daniel, chunkuang.hu, p.zabel, angelogioacchino.delregno,
dri-devel, linux-mediatek, linux-kernel, linux-arm-kernel
On 12/04/2023 08:46, Yang Li wrote:
> Remove variable 'res' and convert platform_get_resource(),
> devm_ioremap_resource() to a single call to
> devm_platform_ioremap_resource(), as this is exactly what this function
> does.
>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
> ---
> drivers/gpu/drm/mediatek/mtk_cec.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_cec.c b/drivers/gpu/drm/mediatek/mtk_cec.c
> index b640bc0559e7..03aae9f95606 100644
> --- a/drivers/gpu/drm/mediatek/mtk_cec.c
> +++ b/drivers/gpu/drm/mediatek/mtk_cec.c
> @@ -185,7 +185,6 @@ static int mtk_cec_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> struct mtk_cec *cec;
> - struct resource *res;
> int ret;
>
> cec = devm_kzalloc(dev, sizeof(*cec), GFP_KERNEL);
> @@ -195,8 +194,7 @@ static int mtk_cec_probe(struct platform_device *pdev)
> platform_set_drvdata(pdev, cec);
> spin_lock_init(&cec->lock);
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - cec->regs = devm_ioremap_resource(dev, res);
> + cec->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(cec->regs)) {
> ret = PTR_ERR(cec->regs);
> dev_err(dev, "Failed to ioremap cec: %d\n", ret);
_______________________________________________
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] 10+ messages in thread
* Re: [PATCH -next 2/3] drm/mediatek: Use devm_platform_ioremap_resource()
2023-04-12 6:46 ` [PATCH -next 2/3] " Yang Li
@ 2023-04-12 11:15 ` Matthias Brugger
2023-04-12 13:49 ` Alexandre Mergnat
1 sibling, 0 replies; 10+ messages in thread
From: Matthias Brugger @ 2023-04-12 11:15 UTC (permalink / raw)
To: Yang Li, airlied
Cc: daniel, chunkuang.hu, p.zabel, angelogioacchino.delregno,
dri-devel, linux-mediatek, linux-kernel, linux-arm-kernel
On 12/04/2023 08:46, Yang Li wrote:
> Remove variable 'res' and convert platform_get_resource(),
> devm_ioremap_resource() to a single call to
> devm_platform_ioremap_resource(), as this is exactly what this function
> does.
>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
> ---
> drivers/gpu/drm/mediatek/mtk_disp_aal.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_aal.c b/drivers/gpu/drm/mediatek/mtk_disp_aal.c
> index 434e8a9ce8ab..391fa0ece22c 100644
> --- a/drivers/gpu/drm/mediatek/mtk_disp_aal.c
> +++ b/drivers/gpu/drm/mediatek/mtk_disp_aal.c
> @@ -104,7 +104,6 @@ static int mtk_disp_aal_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> struct mtk_disp_aal *priv;
> - struct resource *res;
> int ret;
>
> priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> @@ -117,8 +116,7 @@ static int mtk_disp_aal_probe(struct platform_device *pdev)
> return PTR_ERR(priv->clk);
> }
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - priv->regs = devm_ioremap_resource(dev, res);
> + priv->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(priv->regs)) {
> dev_err(dev, "failed to ioremap aal\n");
> return PTR_ERR(priv->regs);
_______________________________________________
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] 10+ messages in thread
* Re: [PATCH -next 3/3] drm/mediatek: Use devm_platform_ioremap_resource()
2023-04-12 6:46 ` [PATCH -next 3/3] " Yang Li
@ 2023-04-12 11:16 ` Matthias Brugger
2023-04-12 13:49 ` Alexandre Mergnat
1 sibling, 0 replies; 10+ messages in thread
From: Matthias Brugger @ 2023-04-12 11:16 UTC (permalink / raw)
To: Yang Li, airlied
Cc: daniel, chunkuang.hu, p.zabel, angelogioacchino.delregno,
dri-devel, linux-mediatek, linux-kernel, linux-arm-kernel
On 12/04/2023 08:46, Yang Li wrote:
> Remove variable 'res' and convert platform_get_resource(),
> devm_ioremap_resource() to a single call to
> devm_platform_ioremap_resource(), as this is exactly what this function
> does.
>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
> ---
> drivers/gpu/drm/mediatek/mtk_disp_ccorr.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c b/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c
> index 1773379b2439..5cee84cce0be 100644
> --- a/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c
> +++ b/drivers/gpu/drm/mediatek/mtk_disp_ccorr.c
> @@ -159,7 +159,6 @@ static int mtk_disp_ccorr_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> struct mtk_disp_ccorr *priv;
> - struct resource *res;
> int ret;
>
> priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> @@ -172,8 +171,7 @@ static int mtk_disp_ccorr_probe(struct platform_device *pdev)
> return PTR_ERR(priv->clk);
> }
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - priv->regs = devm_ioremap_resource(dev, res);
> + priv->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(priv->regs)) {
> dev_err(dev, "failed to ioremap ccorr\n");
> return PTR_ERR(priv->regs);
_______________________________________________
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] 10+ messages in thread
* Re: [PATCH -next 1/3] drm/mediatek: Use devm_platform_ioremap_resource()
2023-04-12 6:46 [PATCH -next 1/3] drm/mediatek: Use devm_platform_ioremap_resource() Yang Li
` (2 preceding siblings ...)
2023-04-12 11:15 ` [PATCH -next 1/3] " Matthias Brugger
@ 2023-04-12 13:48 ` Alexandre Mergnat
3 siblings, 0 replies; 10+ messages in thread
From: Alexandre Mergnat @ 2023-04-12 13:48 UTC (permalink / raw)
To: Yang Li, airlied
Cc: daniel, matthias.bgg, chunkuang.hu, p.zabel,
angelogioacchino.delregno, dri-devel, linux-mediatek,
linux-kernel, linux-arm-kernel
On 12/04/2023 08:46, Yang Li wrote:
> Remove variable 'res' and convert platform_get_resource(),
> devm_ioremap_resource() to a single call to
> devm_platform_ioremap_resource(), as this is exactly what this function
> does.
>
> Signed-off-by: Yang Li<yang.lee@linux.alibaba.com>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
--
Regards,
Alexandre
_______________________________________________
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] 10+ messages in thread
* Re: [PATCH -next 2/3] drm/mediatek: Use devm_platform_ioremap_resource()
2023-04-12 6:46 ` [PATCH -next 2/3] " Yang Li
2023-04-12 11:15 ` Matthias Brugger
@ 2023-04-12 13:49 ` Alexandre Mergnat
1 sibling, 0 replies; 10+ messages in thread
From: Alexandre Mergnat @ 2023-04-12 13:49 UTC (permalink / raw)
To: Yang Li, airlied
Cc: daniel, matthias.bgg, chunkuang.hu, p.zabel,
angelogioacchino.delregno, dri-devel, linux-mediatek,
linux-kernel, linux-arm-kernel
On 12/04/2023 08:46, Yang Li wrote:
> Remove variable 'res' and convert platform_get_resource(),
> devm_ioremap_resource() to a single call to
> devm_platform_ioremap_resource(), as this is exactly what this function
> does.
>
> Signed-off-by: Yang Li<yang.lee@linux.alibaba.com>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
--
Regards,
Alexandre
_______________________________________________
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] 10+ messages in thread
* Re: [PATCH -next 3/3] drm/mediatek: Use devm_platform_ioremap_resource()
2023-04-12 6:46 ` [PATCH -next 3/3] " Yang Li
2023-04-12 11:16 ` Matthias Brugger
@ 2023-04-12 13:49 ` Alexandre Mergnat
2023-12-07 16:03 ` Chun-Kuang Hu
1 sibling, 1 reply; 10+ messages in thread
From: Alexandre Mergnat @ 2023-04-12 13:49 UTC (permalink / raw)
To: Yang Li, airlied
Cc: daniel, matthias.bgg, chunkuang.hu, p.zabel,
angelogioacchino.delregno, dri-devel, linux-mediatek,
linux-kernel, linux-arm-kernel
On 12/04/2023 08:46, Yang Li wrote:
> Remove variable 'res' and convert platform_get_resource(),
> devm_ioremap_resource() to a single call to
> devm_platform_ioremap_resource(), as this is exactly what this function
> does.
>
> Signed-off-by: Yang Li<yang.lee@linux.alibaba.com>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
--
Regards,
Alexandre
_______________________________________________
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] 10+ messages in thread
* Re: [PATCH -next 3/3] drm/mediatek: Use devm_platform_ioremap_resource()
2023-04-12 13:49 ` Alexandre Mergnat
@ 2023-12-07 16:03 ` Chun-Kuang Hu
0 siblings, 0 replies; 10+ messages in thread
From: Chun-Kuang Hu @ 2023-12-07 16:03 UTC (permalink / raw)
To: Alexandre Mergnat
Cc: Yang Li, airlied, daniel, matthias.bgg, chunkuang.hu, p.zabel,
angelogioacchino.delregno, dri-devel, linux-mediatek,
linux-kernel, linux-arm-kernel
Hi, Yang:
Alexandre Mergnat <amergnat@baylibre.com> 於 2023年4月12日 週三 下午9:49寫道:
>
> On 12/04/2023 08:46, Yang Li wrote:
> > Remove variable 'res' and convert platform_get_resource(),
> > devm_ioremap_resource() to a single call to
> > devm_platform_ioremap_resource(), as this is exactly what this function
> > does.
> >
> > Signed-off-by: Yang Li<yang.lee@linux.alibaba.com>
>
> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
>
Applied to mediatek-drm-next [1], thanks.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next
Regards,
Chun-Kuang.
> --
> Regards,
> Alexandre
>
_______________________________________________
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] 10+ messages in thread
end of thread, other threads:[~2023-12-07 16:04 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-12 6:46 [PATCH -next 1/3] drm/mediatek: Use devm_platform_ioremap_resource() Yang Li
2023-04-12 6:46 ` [PATCH -next 2/3] " Yang Li
2023-04-12 11:15 ` Matthias Brugger
2023-04-12 13:49 ` Alexandre Mergnat
2023-04-12 6:46 ` [PATCH -next 3/3] " Yang Li
2023-04-12 11:16 ` Matthias Brugger
2023-04-12 13:49 ` Alexandre Mergnat
2023-12-07 16:03 ` Chun-Kuang Hu
2023-04-12 11:15 ` [PATCH -next 1/3] " Matthias Brugger
2023-04-12 13:48 ` Alexandre Mergnat
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).