* [PATCH] fbdev: imxfb: Convert to devm_platform_ioremap_resource()
@ 2023-07-04 9:36 ` Yangtao Li
0 siblings, 0 replies; 18+ messages in thread
From: Yangtao Li @ 2023-07-04 9:36 UTC (permalink / raw)
To: Sascha Hauer, Pengutronix Kernel Team, Helge Deller, Shawn Guo,
Fabio Estevam, NXP Linux Team
Cc: Yangtao Li, linux-fbdev, linux-arm-kernel, dri-devel, linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/video/fbdev/imxfb.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
index adf36690c342..517eb65bbaa6 100644
--- a/drivers/video/fbdev/imxfb.c
+++ b/drivers/video/fbdev/imxfb.c
@@ -868,7 +868,6 @@ static int imxfb_probe(struct platform_device *pdev)
struct imxfb_info *fbi;
struct lcd_device *lcd;
struct fb_info *info;
- struct resource *res;
struct imx_fb_videomode *m;
const struct of_device_id *of_id;
struct device_node *display_np;
@@ -885,10 +884,6 @@ static int imxfb_probe(struct platform_device *pdev)
if (of_id)
pdev->id_entry = of_id->data;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res)
- return -ENODEV;
-
info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev);
if (!info)
return -ENOMEM;
@@ -970,7 +965,7 @@ static int imxfb_probe(struct platform_device *pdev)
goto failed_getclock;
}
- fbi->regs = devm_ioremap_resource(&pdev->dev, res);
+ fbi->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(fbi->regs)) {
ret = PTR_ERR(fbi->regs);
goto failed_ioremap;
@@ -1043,7 +1038,6 @@ static int imxfb_probe(struct platform_device *pdev)
failed_map:
failed_ioremap:
failed_getclock:
- release_mem_region(res->start, resource_size(res));
failed_of_parse:
kfree(info->pseudo_palette);
failed_init:
--
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] 18+ messages in thread
* [PATCH] fbdev: imxfb: Convert to devm_platform_ioremap_resource()
@ 2023-07-04 9:36 ` Yangtao Li
0 siblings, 0 replies; 18+ messages in thread
From: Yangtao Li @ 2023-07-04 9:36 UTC (permalink / raw)
To: Sascha Hauer, Pengutronix Kernel Team, Helge Deller, Shawn Guo,
Fabio Estevam, NXP Linux Team
Cc: Yangtao Li, linux-fbdev, linux-arm-kernel, dri-devel, linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/video/fbdev/imxfb.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
index adf36690c342..517eb65bbaa6 100644
--- a/drivers/video/fbdev/imxfb.c
+++ b/drivers/video/fbdev/imxfb.c
@@ -868,7 +868,6 @@ static int imxfb_probe(struct platform_device *pdev)
struct imxfb_info *fbi;
struct lcd_device *lcd;
struct fb_info *info;
- struct resource *res;
struct imx_fb_videomode *m;
const struct of_device_id *of_id;
struct device_node *display_np;
@@ -885,10 +884,6 @@ static int imxfb_probe(struct platform_device *pdev)
if (of_id)
pdev->id_entry = of_id->data;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res)
- return -ENODEV;
-
info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev);
if (!info)
return -ENOMEM;
@@ -970,7 +965,7 @@ static int imxfb_probe(struct platform_device *pdev)
goto failed_getclock;
}
- fbi->regs = devm_ioremap_resource(&pdev->dev, res);
+ fbi->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(fbi->regs)) {
ret = PTR_ERR(fbi->regs);
goto failed_ioremap;
@@ -1043,7 +1038,6 @@ static int imxfb_probe(struct platform_device *pdev)
failed_map:
failed_ioremap:
failed_getclock:
- release_mem_region(res->start, resource_size(res));
failed_of_parse:
kfree(info->pseudo_palette);
failed_init:
--
2.39.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH] fbdev: imxfb: Convert to devm_platform_ioremap_resource()
@ 2023-07-04 9:36 ` Yangtao Li
0 siblings, 0 replies; 18+ messages in thread
From: Yangtao Li @ 2023-07-04 9:36 UTC (permalink / raw)
To: Sascha Hauer, Pengutronix Kernel Team, Helge Deller, Shawn Guo,
Fabio Estevam, NXP Linux Team
Cc: linux-kernel, linux-fbdev, dri-devel, linux-arm-kernel, Yangtao Li
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/video/fbdev/imxfb.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
index adf36690c342..517eb65bbaa6 100644
--- a/drivers/video/fbdev/imxfb.c
+++ b/drivers/video/fbdev/imxfb.c
@@ -868,7 +868,6 @@ static int imxfb_probe(struct platform_device *pdev)
struct imxfb_info *fbi;
struct lcd_device *lcd;
struct fb_info *info;
- struct resource *res;
struct imx_fb_videomode *m;
const struct of_device_id *of_id;
struct device_node *display_np;
@@ -885,10 +884,6 @@ static int imxfb_probe(struct platform_device *pdev)
if (of_id)
pdev->id_entry = of_id->data;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res)
- return -ENODEV;
-
info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev);
if (!info)
return -ENOMEM;
@@ -970,7 +965,7 @@ static int imxfb_probe(struct platform_device *pdev)
goto failed_getclock;
}
- fbi->regs = devm_ioremap_resource(&pdev->dev, res);
+ fbi->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(fbi->regs)) {
ret = PTR_ERR(fbi->regs);
goto failed_ioremap;
@@ -1043,7 +1038,6 @@ static int imxfb_probe(struct platform_device *pdev)
failed_map:
failed_ioremap:
failed_getclock:
- release_mem_region(res->start, resource_size(res));
failed_of_parse:
kfree(info->pseudo_palette);
failed_init:
--
2.39.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH] fbdev: imxfb: Convert to devm_platform_ioremap_resource()
2023-07-04 9:36 ` Yangtao Li
(?)
@ 2023-07-07 6:30 ` Helge Deller
-1 siblings, 0 replies; 18+ messages in thread
From: Helge Deller @ 2023-07-07 6:30 UTC (permalink / raw)
To: Yangtao Li, Sascha Hauer, Pengutronix Kernel Team, Shawn Guo,
Fabio Estevam, NXP Linux Team
Cc: linux-fbdev, dri-devel, linux-arm-kernel, linux-kernel
On 7/4/23 11:36, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
applied.
Thanks!
Helge
> ---
> drivers/video/fbdev/imxfb.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
> index adf36690c342..517eb65bbaa6 100644
> --- a/drivers/video/fbdev/imxfb.c
> +++ b/drivers/video/fbdev/imxfb.c
> @@ -868,7 +868,6 @@ static int imxfb_probe(struct platform_device *pdev)
> struct imxfb_info *fbi;
> struct lcd_device *lcd;
> struct fb_info *info;
> - struct resource *res;
> struct imx_fb_videomode *m;
> const struct of_device_id *of_id;
> struct device_node *display_np;
> @@ -885,10 +884,6 @@ static int imxfb_probe(struct platform_device *pdev)
> if (of_id)
> pdev->id_entry = of_id->data;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (!res)
> - return -ENODEV;
> -
> info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev);
> if (!info)
> return -ENOMEM;
> @@ -970,7 +965,7 @@ static int imxfb_probe(struct platform_device *pdev)
> goto failed_getclock;
> }
>
> - fbi->regs = devm_ioremap_resource(&pdev->dev, res);
> + fbi->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(fbi->regs)) {
> ret = PTR_ERR(fbi->regs);
> goto failed_ioremap;
> @@ -1043,7 +1038,6 @@ static int imxfb_probe(struct platform_device *pdev)
> failed_map:
> failed_ioremap:
> failed_getclock:
> - release_mem_region(res->start, resource_size(res));
> failed_of_parse:
> kfree(info->pseudo_palette);
> failed_init:
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fbdev: imxfb: Convert to devm_platform_ioremap_resource()
@ 2023-07-07 6:30 ` Helge Deller
0 siblings, 0 replies; 18+ messages in thread
From: Helge Deller @ 2023-07-07 6:30 UTC (permalink / raw)
To: Yangtao Li, Sascha Hauer, Pengutronix Kernel Team, Shawn Guo,
Fabio Estevam, NXP Linux Team
Cc: linux-fbdev, linux-arm-kernel, dri-devel, linux-kernel
On 7/4/23 11:36, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
applied.
Thanks!
Helge
> ---
> drivers/video/fbdev/imxfb.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
> index adf36690c342..517eb65bbaa6 100644
> --- a/drivers/video/fbdev/imxfb.c
> +++ b/drivers/video/fbdev/imxfb.c
> @@ -868,7 +868,6 @@ static int imxfb_probe(struct platform_device *pdev)
> struct imxfb_info *fbi;
> struct lcd_device *lcd;
> struct fb_info *info;
> - struct resource *res;
> struct imx_fb_videomode *m;
> const struct of_device_id *of_id;
> struct device_node *display_np;
> @@ -885,10 +884,6 @@ static int imxfb_probe(struct platform_device *pdev)
> if (of_id)
> pdev->id_entry = of_id->data;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (!res)
> - return -ENODEV;
> -
> info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev);
> if (!info)
> return -ENOMEM;
> @@ -970,7 +965,7 @@ static int imxfb_probe(struct platform_device *pdev)
> goto failed_getclock;
> }
>
> - fbi->regs = devm_ioremap_resource(&pdev->dev, res);
> + fbi->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(fbi->regs)) {
> ret = PTR_ERR(fbi->regs);
> goto failed_ioremap;
> @@ -1043,7 +1038,6 @@ static int imxfb_probe(struct platform_device *pdev)
> failed_map:
> failed_ioremap:
> failed_getclock:
> - release_mem_region(res->start, resource_size(res));
> failed_of_parse:
> kfree(info->pseudo_palette);
> failed_init:
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fbdev: imxfb: Convert to devm_platform_ioremap_resource()
@ 2023-07-07 6:30 ` Helge Deller
0 siblings, 0 replies; 18+ messages in thread
From: Helge Deller @ 2023-07-07 6:30 UTC (permalink / raw)
To: Yangtao Li, Sascha Hauer, Pengutronix Kernel Team, Shawn Guo,
Fabio Estevam, NXP Linux Team
Cc: linux-fbdev, linux-arm-kernel, dri-devel, linux-kernel
On 7/4/23 11:36, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
applied.
Thanks!
Helge
> ---
> drivers/video/fbdev/imxfb.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
> index adf36690c342..517eb65bbaa6 100644
> --- a/drivers/video/fbdev/imxfb.c
> +++ b/drivers/video/fbdev/imxfb.c
> @@ -868,7 +868,6 @@ static int imxfb_probe(struct platform_device *pdev)
> struct imxfb_info *fbi;
> struct lcd_device *lcd;
> struct fb_info *info;
> - struct resource *res;
> struct imx_fb_videomode *m;
> const struct of_device_id *of_id;
> struct device_node *display_np;
> @@ -885,10 +884,6 @@ static int imxfb_probe(struct platform_device *pdev)
> if (of_id)
> pdev->id_entry = of_id->data;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (!res)
> - return -ENODEV;
> -
> info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev);
> if (!info)
> return -ENOMEM;
> @@ -970,7 +965,7 @@ static int imxfb_probe(struct platform_device *pdev)
> goto failed_getclock;
> }
>
> - fbi->regs = devm_ioremap_resource(&pdev->dev, res);
> + fbi->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(fbi->regs)) {
> ret = PTR_ERR(fbi->regs);
> goto failed_ioremap;
> @@ -1043,7 +1038,6 @@ static int imxfb_probe(struct platform_device *pdev)
> failed_map:
> failed_ioremap:
> failed_getclock:
> - release_mem_region(res->start, resource_size(res));
> failed_of_parse:
> kfree(info->pseudo_palette);
> failed_init:
_______________________________________________
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] 18+ messages in thread
* Re: [PATCH] fbdev: imxfb: Convert to devm_platform_ioremap_resource()
2023-07-04 9:36 ` Yangtao Li
(?)
@ 2023-07-10 7:10 ` Geert Uytterhoeven
-1 siblings, 0 replies; 18+ messages in thread
From: Geert Uytterhoeven @ 2023-07-10 7:10 UTC (permalink / raw)
To: Yangtao Li
Cc: Sascha Hauer, Pengutronix Kernel Team, Helge Deller, Shawn Guo,
Fabio Estevam, NXP Linux Team, linux-fbdev, linux-arm-kernel,
dri-devel, linux-kernel, Uwe Kleine-König
Hi Yangtao,
On Tue, Jul 4, 2023 at 11:38 AM Yangtao Li <frank.li@vivo.com> wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
Thanks for your patch, which is now commit c1cd7a7a231a26c6 ("fbdev:
imxfb: Convert to devm_platform_ioremap_resource()") in fbdev/for-next
> --- a/drivers/video/fbdev/imxfb.c
> +++ b/drivers/video/fbdev/imxfb.c
> @@ -868,7 +868,6 @@ static int imxfb_probe(struct platform_device *pdev)
> struct imxfb_info *fbi;
> struct lcd_device *lcd;
> struct fb_info *info;
> - struct resource *res;
> struct imx_fb_videomode *m;
> const struct of_device_id *of_id;
> struct device_node *display_np;
> @@ -885,10 +884,6 @@ static int imxfb_probe(struct platform_device *pdev)
> if (of_id)
> pdev->id_entry = of_id->data;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (!res)
> - return -ENODEV;
> -
> info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev);
> if (!info)
> return -ENOMEM;
> @@ -970,7 +965,7 @@ static int imxfb_probe(struct platform_device *pdev)
> goto failed_getclock;
> }
>
> - fbi->regs = devm_ioremap_resource(&pdev->dev, res);
> + fbi->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(fbi->regs)) {
> ret = PTR_ERR(fbi->regs);
> goto failed_ioremap;
> @@ -1043,7 +1038,6 @@ static int imxfb_probe(struct platform_device *pdev)
> failed_map:
> failed_ioremap:
> failed_getclock:
> - release_mem_region(res->start, resource_size(res));
This part is not directly related, but a bug fix for commit
b083c22d51148f3d ("video: fbdev: imxfb: Convert request_mem_region +
ioremap to devm_ioremap_resource") in v6.0.
Please do not mix bug fixes with other changes.
The stable teams want to backport only bugfixes .
> failed_of_parse:
> kfree(info->pseudo_palette);
> failed_init:
> --
> 2.39.0
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fbdev: imxfb: Convert to devm_platform_ioremap_resource()
@ 2023-07-10 7:10 ` Geert Uytterhoeven
0 siblings, 0 replies; 18+ messages in thread
From: Geert Uytterhoeven @ 2023-07-10 7:10 UTC (permalink / raw)
To: Yangtao Li
Cc: linux-fbdev, Shawn Guo, Sascha Hauer, linux-kernel, dri-devel,
NXP Linux Team, Pengutronix Kernel Team, Uwe Kleine-König,
Helge Deller, linux-arm-kernel
Hi Yangtao,
On Tue, Jul 4, 2023 at 11:38 AM Yangtao Li <frank.li@vivo.com> wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
Thanks for your patch, which is now commit c1cd7a7a231a26c6 ("fbdev:
imxfb: Convert to devm_platform_ioremap_resource()") in fbdev/for-next
> --- a/drivers/video/fbdev/imxfb.c
> +++ b/drivers/video/fbdev/imxfb.c
> @@ -868,7 +868,6 @@ static int imxfb_probe(struct platform_device *pdev)
> struct imxfb_info *fbi;
> struct lcd_device *lcd;
> struct fb_info *info;
> - struct resource *res;
> struct imx_fb_videomode *m;
> const struct of_device_id *of_id;
> struct device_node *display_np;
> @@ -885,10 +884,6 @@ static int imxfb_probe(struct platform_device *pdev)
> if (of_id)
> pdev->id_entry = of_id->data;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (!res)
> - return -ENODEV;
> -
> info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev);
> if (!info)
> return -ENOMEM;
> @@ -970,7 +965,7 @@ static int imxfb_probe(struct platform_device *pdev)
> goto failed_getclock;
> }
>
> - fbi->regs = devm_ioremap_resource(&pdev->dev, res);
> + fbi->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(fbi->regs)) {
> ret = PTR_ERR(fbi->regs);
> goto failed_ioremap;
> @@ -1043,7 +1038,6 @@ static int imxfb_probe(struct platform_device *pdev)
> failed_map:
> failed_ioremap:
> failed_getclock:
> - release_mem_region(res->start, resource_size(res));
This part is not directly related, but a bug fix for commit
b083c22d51148f3d ("video: fbdev: imxfb: Convert request_mem_region +
ioremap to devm_ioremap_resource") in v6.0.
Please do not mix bug fixes with other changes.
The stable teams want to backport only bugfixes .
> failed_of_parse:
> kfree(info->pseudo_palette);
> failed_init:
> --
> 2.39.0
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fbdev: imxfb: Convert to devm_platform_ioremap_resource()
@ 2023-07-10 7:10 ` Geert Uytterhoeven
0 siblings, 0 replies; 18+ messages in thread
From: Geert Uytterhoeven @ 2023-07-10 7:10 UTC (permalink / raw)
To: Yangtao Li
Cc: Sascha Hauer, Pengutronix Kernel Team, Helge Deller, Shawn Guo,
Fabio Estevam, NXP Linux Team, linux-fbdev, linux-arm-kernel,
dri-devel, linux-kernel, Uwe Kleine-König
Hi Yangtao,
On Tue, Jul 4, 2023 at 11:38 AM Yangtao Li <frank.li@vivo.com> wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
Thanks for your patch, which is now commit c1cd7a7a231a26c6 ("fbdev:
imxfb: Convert to devm_platform_ioremap_resource()") in fbdev/for-next
> --- a/drivers/video/fbdev/imxfb.c
> +++ b/drivers/video/fbdev/imxfb.c
> @@ -868,7 +868,6 @@ static int imxfb_probe(struct platform_device *pdev)
> struct imxfb_info *fbi;
> struct lcd_device *lcd;
> struct fb_info *info;
> - struct resource *res;
> struct imx_fb_videomode *m;
> const struct of_device_id *of_id;
> struct device_node *display_np;
> @@ -885,10 +884,6 @@ static int imxfb_probe(struct platform_device *pdev)
> if (of_id)
> pdev->id_entry = of_id->data;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (!res)
> - return -ENODEV;
> -
> info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev);
> if (!info)
> return -ENOMEM;
> @@ -970,7 +965,7 @@ static int imxfb_probe(struct platform_device *pdev)
> goto failed_getclock;
> }
>
> - fbi->regs = devm_ioremap_resource(&pdev->dev, res);
> + fbi->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(fbi->regs)) {
> ret = PTR_ERR(fbi->regs);
> goto failed_ioremap;
> @@ -1043,7 +1038,6 @@ static int imxfb_probe(struct platform_device *pdev)
> failed_map:
> failed_ioremap:
> failed_getclock:
> - release_mem_region(res->start, resource_size(res));
This part is not directly related, but a bug fix for commit
b083c22d51148f3d ("video: fbdev: imxfb: Convert request_mem_region +
ioremap to devm_ioremap_resource") in v6.0.
Please do not mix bug fixes with other changes.
The stable teams want to backport only bugfixes .
> failed_of_parse:
> kfree(info->pseudo_palette);
> failed_init:
> --
> 2.39.0
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
_______________________________________________
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] 18+ messages in thread
* Re: [PATCH] fbdev: imxfb: Convert to devm_platform_ioremap_resource()
2023-07-10 7:10 ` Geert Uytterhoeven
(?)
@ 2023-07-10 7:25 ` Yangtao Li
-1 siblings, 0 replies; 18+ messages in thread
From: Yangtao Li @ 2023-07-10 7:25 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Sascha Hauer, Pengutronix Kernel Team, Helge Deller, Shawn Guo,
Fabio Estevam, NXP Linux Team, linux-fbdev, linux-arm-kernel,
dri-devel, linux-kernel, Uwe Kleine-König
Hi Geert,
On 2023/7/10 15:10, Geert Uytterhoeven wrote:
> [你通常不会收到来自 geert@linux-m68k.org 的电子邮件。请访问 https://aka.ms/LearnAboutSenderIdentification,以了解这一点为什么很重要]
>
> Hi Yangtao,
>
> On Tue, Jul 4, 2023 at 11:38 AM Yangtao Li <frank.li@vivo.com> wrote:
>> Use devm_platform_ioremap_resource() to simplify code.
>>
>> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> Thanks for your patch, which is now commit c1cd7a7a231a26c6 ("fbdev:
> imxfb: Convert to devm_platform_ioremap_resource()") in fbdev/for-next
>
>> --- a/drivers/video/fbdev/imxfb.c
>> +++ b/drivers/video/fbdev/imxfb.c
>> @@ -868,7 +868,6 @@ static int imxfb_probe(struct platform_device *pdev)
>> struct imxfb_info *fbi;
>> struct lcd_device *lcd;
>> struct fb_info *info;
>> - struct resource *res;
>> struct imx_fb_videomode *m;
>> const struct of_device_id *of_id;
>> struct device_node *display_np;
>> @@ -885,10 +884,6 @@ static int imxfb_probe(struct platform_device *pdev)
>> if (of_id)
>> pdev->id_entry = of_id->data;
>>
>> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> - if (!res)
>> - return -ENODEV;
>> -
>> info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev);
>> if (!info)
>> return -ENOMEM;
>> @@ -970,7 +965,7 @@ static int imxfb_probe(struct platform_device *pdev)
>> goto failed_getclock;
>> }
>>
>> - fbi->regs = devm_ioremap_resource(&pdev->dev, res);
>> + fbi->regs = devm_platform_ioremap_resource(pdev, 0);
>> if (IS_ERR(fbi->regs)) {
>> ret = PTR_ERR(fbi->regs);
>> goto failed_ioremap;
>> @@ -1043,7 +1038,6 @@ static int imxfb_probe(struct platform_device *pdev)
>> failed_map:
>> failed_ioremap:
>> failed_getclock:
>> - release_mem_region(res->start, resource_size(res));
> This part is not directly related, but a bug fix for commit
> b083c22d51148f3d ("video: fbdev: imxfb: Convert request_mem_region +
> ioremap to devm_ioremap_resource") in v6.0.
IIUC, split this patch into two, remove release_mem_region in one and
mark it as Fixes: b083c22d51148f3d ("video: fbdev: imxfb: Convert
request_mem_region +
ioremap to devm_ioremap_resource")?
MBR,
Yangtao
>
> Please do not mix bug fixes with other changes.
> The stable teams want to backport only bugfixes .
>
>> failed_of_parse:
>> kfree(info->pseudo_palette);
>> failed_init:
>> --
>> 2.39.0
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fbdev: imxfb: Convert to devm_platform_ioremap_resource()
@ 2023-07-10 7:25 ` Yangtao Li
0 siblings, 0 replies; 18+ messages in thread
From: Yangtao Li @ 2023-07-10 7:25 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: linux-fbdev, Shawn Guo, Sascha Hauer, linux-kernel, dri-devel,
NXP Linux Team, Pengutronix Kernel Team, Uwe Kleine-König,
Helge Deller, linux-arm-kernel
Hi Geert,
On 2023/7/10 15:10, Geert Uytterhoeven wrote:
> [你通常不会收到来自 geert@linux-m68k.org 的电子邮件。请访问 https://aka.ms/LearnAboutSenderIdentification,以了解这一点为什么很重要]
>
> Hi Yangtao,
>
> On Tue, Jul 4, 2023 at 11:38 AM Yangtao Li <frank.li@vivo.com> wrote:
>> Use devm_platform_ioremap_resource() to simplify code.
>>
>> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> Thanks for your patch, which is now commit c1cd7a7a231a26c6 ("fbdev:
> imxfb: Convert to devm_platform_ioremap_resource()") in fbdev/for-next
>
>> --- a/drivers/video/fbdev/imxfb.c
>> +++ b/drivers/video/fbdev/imxfb.c
>> @@ -868,7 +868,6 @@ static int imxfb_probe(struct platform_device *pdev)
>> struct imxfb_info *fbi;
>> struct lcd_device *lcd;
>> struct fb_info *info;
>> - struct resource *res;
>> struct imx_fb_videomode *m;
>> const struct of_device_id *of_id;
>> struct device_node *display_np;
>> @@ -885,10 +884,6 @@ static int imxfb_probe(struct platform_device *pdev)
>> if (of_id)
>> pdev->id_entry = of_id->data;
>>
>> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> - if (!res)
>> - return -ENODEV;
>> -
>> info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev);
>> if (!info)
>> return -ENOMEM;
>> @@ -970,7 +965,7 @@ static int imxfb_probe(struct platform_device *pdev)
>> goto failed_getclock;
>> }
>>
>> - fbi->regs = devm_ioremap_resource(&pdev->dev, res);
>> + fbi->regs = devm_platform_ioremap_resource(pdev, 0);
>> if (IS_ERR(fbi->regs)) {
>> ret = PTR_ERR(fbi->regs);
>> goto failed_ioremap;
>> @@ -1043,7 +1038,6 @@ static int imxfb_probe(struct platform_device *pdev)
>> failed_map:
>> failed_ioremap:
>> failed_getclock:
>> - release_mem_region(res->start, resource_size(res));
> This part is not directly related, but a bug fix for commit
> b083c22d51148f3d ("video: fbdev: imxfb: Convert request_mem_region +
> ioremap to devm_ioremap_resource") in v6.0.
IIUC, split this patch into two, remove release_mem_region in one and
mark it as Fixes: b083c22d51148f3d ("video: fbdev: imxfb: Convert
request_mem_region +
ioremap to devm_ioremap_resource")?
MBR,
Yangtao
>
> Please do not mix bug fixes with other changes.
> The stable teams want to backport only bugfixes .
>
>> failed_of_parse:
>> kfree(info->pseudo_palette);
>> failed_init:
>> --
>> 2.39.0
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fbdev: imxfb: Convert to devm_platform_ioremap_resource()
@ 2023-07-10 7:25 ` Yangtao Li
0 siblings, 0 replies; 18+ messages in thread
From: Yangtao Li @ 2023-07-10 7:25 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Sascha Hauer, Pengutronix Kernel Team, Helge Deller, Shawn Guo,
Fabio Estevam, NXP Linux Team, linux-fbdev, linux-arm-kernel,
dri-devel, linux-kernel, Uwe Kleine-König
Hi Geert,
On 2023/7/10 15:10, Geert Uytterhoeven wrote:
> [你通常不会收到来自 geert@linux-m68k.org 的电子邮件。请访问 https://aka.ms/LearnAboutSenderIdentification,以了解这一点为什么很重要]
>
> Hi Yangtao,
>
> On Tue, Jul 4, 2023 at 11:38 AM Yangtao Li <frank.li@vivo.com> wrote:
>> Use devm_platform_ioremap_resource() to simplify code.
>>
>> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> Thanks for your patch, which is now commit c1cd7a7a231a26c6 ("fbdev:
> imxfb: Convert to devm_platform_ioremap_resource()") in fbdev/for-next
>
>> --- a/drivers/video/fbdev/imxfb.c
>> +++ b/drivers/video/fbdev/imxfb.c
>> @@ -868,7 +868,6 @@ static int imxfb_probe(struct platform_device *pdev)
>> struct imxfb_info *fbi;
>> struct lcd_device *lcd;
>> struct fb_info *info;
>> - struct resource *res;
>> struct imx_fb_videomode *m;
>> const struct of_device_id *of_id;
>> struct device_node *display_np;
>> @@ -885,10 +884,6 @@ static int imxfb_probe(struct platform_device *pdev)
>> if (of_id)
>> pdev->id_entry = of_id->data;
>>
>> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> - if (!res)
>> - return -ENODEV;
>> -
>> info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev);
>> if (!info)
>> return -ENOMEM;
>> @@ -970,7 +965,7 @@ static int imxfb_probe(struct platform_device *pdev)
>> goto failed_getclock;
>> }
>>
>> - fbi->regs = devm_ioremap_resource(&pdev->dev, res);
>> + fbi->regs = devm_platform_ioremap_resource(pdev, 0);
>> if (IS_ERR(fbi->regs)) {
>> ret = PTR_ERR(fbi->regs);
>> goto failed_ioremap;
>> @@ -1043,7 +1038,6 @@ static int imxfb_probe(struct platform_device *pdev)
>> failed_map:
>> failed_ioremap:
>> failed_getclock:
>> - release_mem_region(res->start, resource_size(res));
> This part is not directly related, but a bug fix for commit
> b083c22d51148f3d ("video: fbdev: imxfb: Convert request_mem_region +
> ioremap to devm_ioremap_resource") in v6.0.
IIUC, split this patch into two, remove release_mem_region in one and
mark it as Fixes: b083c22d51148f3d ("video: fbdev: imxfb: Convert
request_mem_region +
ioremap to devm_ioremap_resource")?
MBR,
Yangtao
>
> Please do not mix bug fixes with other changes.
> The stable teams want to backport only bugfixes .
>
>> failed_of_parse:
>> kfree(info->pseudo_palette);
>> failed_init:
>> --
>> 2.39.0
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
_______________________________________________
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] 18+ messages in thread
* Re: [PATCH] fbdev: imxfb: Convert to devm_platform_ioremap_resource()
2023-07-10 7:25 ` Yangtao Li
(?)
@ 2023-07-10 7:41 ` Geert Uytterhoeven
-1 siblings, 0 replies; 18+ messages in thread
From: Geert Uytterhoeven @ 2023-07-10 7:41 UTC (permalink / raw)
To: Yangtao Li
Cc: Sascha Hauer, Pengutronix Kernel Team, Helge Deller, Shawn Guo,
Fabio Estevam, NXP Linux Team, linux-fbdev, linux-arm-kernel,
dri-devel, linux-kernel, Uwe Kleine-König
Hi Yangtao,
On Mon, Jul 10, 2023 at 9:25 AM Yangtao Li <frank.li@vivo.com> wrote:
> On 2023/7/10 15:10, Geert Uytterhoeven wrote:
> > [你通常不会收到来自 geert@linux-m68k.org 的电子邮件。请访问 https://aka.ms/LearnAboutSenderIdentification,以了解这一点为什么很重要]
> > On Tue, Jul 4, 2023 at 11:38 AM Yangtao Li <frank.li@vivo.com> wrote:
> >> Use devm_platform_ioremap_resource() to simplify code.
> >>
> >> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> > Thanks for your patch, which is now commit c1cd7a7a231a26c6 ("fbdev:
> > imxfb: Convert to devm_platform_ioremap_resource()") in fbdev/for-next
> >
> >> --- a/drivers/video/fbdev/imxfb.c
> >> +++ b/drivers/video/fbdev/imxfb.c
> >> @@ -868,7 +868,6 @@ static int imxfb_probe(struct platform_device *pdev)
> >> struct imxfb_info *fbi;
> >> struct lcd_device *lcd;
> >> struct fb_info *info;
> >> - struct resource *res;
> >> struct imx_fb_videomode *m;
> >> const struct of_device_id *of_id;
> >> struct device_node *display_np;
> >> @@ -885,10 +884,6 @@ static int imxfb_probe(struct platform_device *pdev)
> >> if (of_id)
> >> pdev->id_entry = of_id->data;
> >>
> >> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> >> - if (!res)
> >> - return -ENODEV;
> >> -
> >> info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev);
> >> if (!info)
> >> return -ENOMEM;
> >> @@ -970,7 +965,7 @@ static int imxfb_probe(struct platform_device *pdev)
> >> goto failed_getclock;
> >> }
> >>
> >> - fbi->regs = devm_ioremap_resource(&pdev->dev, res);
> >> + fbi->regs = devm_platform_ioremap_resource(pdev, 0);
> >> if (IS_ERR(fbi->regs)) {
> >> ret = PTR_ERR(fbi->regs);
> >> goto failed_ioremap;
> >> @@ -1043,7 +1038,6 @@ static int imxfb_probe(struct platform_device *pdev)
> >> failed_map:
> >> failed_ioremap:
> >> failed_getclock:
> >> - release_mem_region(res->start, resource_size(res));
> > This part is not directly related, but a bug fix for commit
> > b083c22d51148f3d ("video: fbdev: imxfb: Convert request_mem_region +
> > ioremap to devm_ioremap_resource") in v6.0.
>
>
> IIUC, split this patch into two, remove release_mem_region in one and
>
> mark it as Fixes: b083c22d51148f3d ("video: fbdev: imxfb: Convert
> request_mem_region +
>
> ioremap to devm_ioremap_resource")?
Exactly. But as Helge has already applied this patch to his tree, we have
to check with him if this is still feasible...
> > Please do not mix bug fixes with other changes.
> > The stable teams want to backport only bugfixes .
> >
> >> failed_of_parse:
> >> kfree(info->pseudo_palette);
> >> failed_init:
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fbdev: imxfb: Convert to devm_platform_ioremap_resource()
@ 2023-07-10 7:41 ` Geert Uytterhoeven
0 siblings, 0 replies; 18+ messages in thread
From: Geert Uytterhoeven @ 2023-07-10 7:41 UTC (permalink / raw)
To: Yangtao Li
Cc: linux-fbdev, Shawn Guo, Sascha Hauer, linux-kernel, dri-devel,
NXP Linux Team, Pengutronix Kernel Team, Uwe Kleine-König,
Helge Deller, linux-arm-kernel
Hi Yangtao,
On Mon, Jul 10, 2023 at 9:25 AM Yangtao Li <frank.li@vivo.com> wrote:
> On 2023/7/10 15:10, Geert Uytterhoeven wrote:
> > [你通常不会收到来自 geert@linux-m68k.org 的电子邮件。请访问 https://aka.ms/LearnAboutSenderIdentification,以了解这一点为什么很重要]
> > On Tue, Jul 4, 2023 at 11:38 AM Yangtao Li <frank.li@vivo.com> wrote:
> >> Use devm_platform_ioremap_resource() to simplify code.
> >>
> >> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> > Thanks for your patch, which is now commit c1cd7a7a231a26c6 ("fbdev:
> > imxfb: Convert to devm_platform_ioremap_resource()") in fbdev/for-next
> >
> >> --- a/drivers/video/fbdev/imxfb.c
> >> +++ b/drivers/video/fbdev/imxfb.c
> >> @@ -868,7 +868,6 @@ static int imxfb_probe(struct platform_device *pdev)
> >> struct imxfb_info *fbi;
> >> struct lcd_device *lcd;
> >> struct fb_info *info;
> >> - struct resource *res;
> >> struct imx_fb_videomode *m;
> >> const struct of_device_id *of_id;
> >> struct device_node *display_np;
> >> @@ -885,10 +884,6 @@ static int imxfb_probe(struct platform_device *pdev)
> >> if (of_id)
> >> pdev->id_entry = of_id->data;
> >>
> >> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> >> - if (!res)
> >> - return -ENODEV;
> >> -
> >> info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev);
> >> if (!info)
> >> return -ENOMEM;
> >> @@ -970,7 +965,7 @@ static int imxfb_probe(struct platform_device *pdev)
> >> goto failed_getclock;
> >> }
> >>
> >> - fbi->regs = devm_ioremap_resource(&pdev->dev, res);
> >> + fbi->regs = devm_platform_ioremap_resource(pdev, 0);
> >> if (IS_ERR(fbi->regs)) {
> >> ret = PTR_ERR(fbi->regs);
> >> goto failed_ioremap;
> >> @@ -1043,7 +1038,6 @@ static int imxfb_probe(struct platform_device *pdev)
> >> failed_map:
> >> failed_ioremap:
> >> failed_getclock:
> >> - release_mem_region(res->start, resource_size(res));
> > This part is not directly related, but a bug fix for commit
> > b083c22d51148f3d ("video: fbdev: imxfb: Convert request_mem_region +
> > ioremap to devm_ioremap_resource") in v6.0.
>
>
> IIUC, split this patch into two, remove release_mem_region in one and
>
> mark it as Fixes: b083c22d51148f3d ("video: fbdev: imxfb: Convert
> request_mem_region +
>
> ioremap to devm_ioremap_resource")?
Exactly. But as Helge has already applied this patch to his tree, we have
to check with him if this is still feasible...
> > Please do not mix bug fixes with other changes.
> > The stable teams want to backport only bugfixes .
> >
> >> failed_of_parse:
> >> kfree(info->pseudo_palette);
> >> failed_init:
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fbdev: imxfb: Convert to devm_platform_ioremap_resource()
@ 2023-07-10 7:41 ` Geert Uytterhoeven
0 siblings, 0 replies; 18+ messages in thread
From: Geert Uytterhoeven @ 2023-07-10 7:41 UTC (permalink / raw)
To: Yangtao Li
Cc: Sascha Hauer, Pengutronix Kernel Team, Helge Deller, Shawn Guo,
Fabio Estevam, NXP Linux Team, linux-fbdev, linux-arm-kernel,
dri-devel, linux-kernel, Uwe Kleine-König
Hi Yangtao,
On Mon, Jul 10, 2023 at 9:25 AM Yangtao Li <frank.li@vivo.com> wrote:
> On 2023/7/10 15:10, Geert Uytterhoeven wrote:
> > [你通常不会收到来自 geert@linux-m68k.org 的电子邮件。请访问 https://aka.ms/LearnAboutSenderIdentification,以了解这一点为什么很重要]
> > On Tue, Jul 4, 2023 at 11:38 AM Yangtao Li <frank.li@vivo.com> wrote:
> >> Use devm_platform_ioremap_resource() to simplify code.
> >>
> >> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> > Thanks for your patch, which is now commit c1cd7a7a231a26c6 ("fbdev:
> > imxfb: Convert to devm_platform_ioremap_resource()") in fbdev/for-next
> >
> >> --- a/drivers/video/fbdev/imxfb.c
> >> +++ b/drivers/video/fbdev/imxfb.c
> >> @@ -868,7 +868,6 @@ static int imxfb_probe(struct platform_device *pdev)
> >> struct imxfb_info *fbi;
> >> struct lcd_device *lcd;
> >> struct fb_info *info;
> >> - struct resource *res;
> >> struct imx_fb_videomode *m;
> >> const struct of_device_id *of_id;
> >> struct device_node *display_np;
> >> @@ -885,10 +884,6 @@ static int imxfb_probe(struct platform_device *pdev)
> >> if (of_id)
> >> pdev->id_entry = of_id->data;
> >>
> >> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> >> - if (!res)
> >> - return -ENODEV;
> >> -
> >> info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev);
> >> if (!info)
> >> return -ENOMEM;
> >> @@ -970,7 +965,7 @@ static int imxfb_probe(struct platform_device *pdev)
> >> goto failed_getclock;
> >> }
> >>
> >> - fbi->regs = devm_ioremap_resource(&pdev->dev, res);
> >> + fbi->regs = devm_platform_ioremap_resource(pdev, 0);
> >> if (IS_ERR(fbi->regs)) {
> >> ret = PTR_ERR(fbi->regs);
> >> goto failed_ioremap;
> >> @@ -1043,7 +1038,6 @@ static int imxfb_probe(struct platform_device *pdev)
> >> failed_map:
> >> failed_ioremap:
> >> failed_getclock:
> >> - release_mem_region(res->start, resource_size(res));
> > This part is not directly related, but a bug fix for commit
> > b083c22d51148f3d ("video: fbdev: imxfb: Convert request_mem_region +
> > ioremap to devm_ioremap_resource") in v6.0.
>
>
> IIUC, split this patch into two, remove release_mem_region in one and
>
> mark it as Fixes: b083c22d51148f3d ("video: fbdev: imxfb: Convert
> request_mem_region +
>
> ioremap to devm_ioremap_resource")?
Exactly. But as Helge has already applied this patch to his tree, we have
to check with him if this is still feasible...
> > Please do not mix bug fixes with other changes.
> > The stable teams want to backport only bugfixes .
> >
> >> failed_of_parse:
> >> kfree(info->pseudo_palette);
> >> failed_init:
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
_______________________________________________
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] 18+ messages in thread
* Re: [PATCH] fbdev: imxfb: Convert to devm_platform_ioremap_resource()
2023-07-10 7:41 ` Geert Uytterhoeven
(?)
@ 2023-07-10 9:49 ` Helge Deller
-1 siblings, 0 replies; 18+ messages in thread
From: Helge Deller @ 2023-07-10 9:49 UTC (permalink / raw)
To: Geert Uytterhoeven, Yangtao Li
Cc: Sascha Hauer, Pengutronix Kernel Team, Shawn Guo, Fabio Estevam,
NXP Linux Team, linux-fbdev, linux-arm-kernel, dri-devel,
linux-kernel, Uwe Kleine-König
On 7/10/23 09:41, Geert Uytterhoeven wrote:
> Hi Yangtao,
>
> On Mon, Jul 10, 2023 at 9:25 AM Yangtao Li <frank.li@vivo.com> wrote:
>> On 2023/7/10 15:10, Geert Uytterhoeven wrote:
>>> [你通常不会收到来自 geert@linux-m68k.org 的电子邮件。请访问 https://aka.ms/LearnAboutSenderIdentification,以了解这一点为什么很重要]
>>> On Tue, Jul 4, 2023 at 11:38 AM Yangtao Li <frank.li@vivo.com> wrote:
>>>> Use devm_platform_ioremap_resource() to simplify code.
>>>>
>>>> Signed-off-by: Yangtao Li <frank.li@vivo.com>
>>> Thanks for your patch, which is now commit c1cd7a7a231a26c6 ("fbdev:
>>> imxfb: Convert to devm_platform_ioremap_resource()") in fbdev/for-next
>>>
>>>> --- a/drivers/video/fbdev/imxfb.c
>>>> +++ b/drivers/video/fbdev/imxfb.c
>>>> @@ -868,7 +868,6 @@ static int imxfb_probe(struct platform_device *pdev)
>>>> struct imxfb_info *fbi;
>>>> struct lcd_device *lcd;
>>>> struct fb_info *info;
>>>> - struct resource *res;
>>>> struct imx_fb_videomode *m;
>>>> const struct of_device_id *of_id;
>>>> struct device_node *display_np;
>>>> @@ -885,10 +884,6 @@ static int imxfb_probe(struct platform_device *pdev)
>>>> if (of_id)
>>>> pdev->id_entry = of_id->data;
>>>>
>>>> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>>> - if (!res)
>>>> - return -ENODEV;
>>>> -
>>>> info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev);
>>>> if (!info)
>>>> return -ENOMEM;
>>>> @@ -970,7 +965,7 @@ static int imxfb_probe(struct platform_device *pdev)
>>>> goto failed_getclock;
>>>> }
>>>>
>>>> - fbi->regs = devm_ioremap_resource(&pdev->dev, res);
>>>> + fbi->regs = devm_platform_ioremap_resource(pdev, 0);
>>>> if (IS_ERR(fbi->regs)) {
>>>> ret = PTR_ERR(fbi->regs);
>>>> goto failed_ioremap;
>>>> @@ -1043,7 +1038,6 @@ static int imxfb_probe(struct platform_device *pdev)
>>>> failed_map:
>>>> failed_ioremap:
>>>> failed_getclock:
>>>> - release_mem_region(res->start, resource_size(res));
>>> This part is not directly related, but a bug fix for commit
>>> b083c22d51148f3d ("video: fbdev: imxfb: Convert request_mem_region +
>>> ioremap to devm_ioremap_resource") in v6.0.
>>
>>
>> IIUC, split this patch into two, remove release_mem_region in one and
>>
>> mark it as Fixes: b083c22d51148f3d ("video: fbdev: imxfb: Convert
>> request_mem_region +
>>
>> ioremap to devm_ioremap_resource")?
>
> Exactly. But as Helge has already applied this patch to his tree, we have
> to check with him if this is still feasible...
Sure. Just send them to the list and I apply those patches instead.
Thanks!
Helge
_______________________________________________
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] 18+ messages in thread
* Re: [PATCH] fbdev: imxfb: Convert to devm_platform_ioremap_resource()
@ 2023-07-10 9:49 ` Helge Deller
0 siblings, 0 replies; 18+ messages in thread
From: Helge Deller @ 2023-07-10 9:49 UTC (permalink / raw)
To: Geert Uytterhoeven, Yangtao Li
Cc: linux-fbdev, Shawn Guo, Sascha Hauer, linux-kernel, dri-devel,
NXP Linux Team, Pengutronix Kernel Team, Uwe Kleine-König,
linux-arm-kernel
On 7/10/23 09:41, Geert Uytterhoeven wrote:
> Hi Yangtao,
>
> On Mon, Jul 10, 2023 at 9:25 AM Yangtao Li <frank.li@vivo.com> wrote:
>> On 2023/7/10 15:10, Geert Uytterhoeven wrote:
>>> [你通常不会收到来自 geert@linux-m68k.org 的电子邮件。请访问 https://aka.ms/LearnAboutSenderIdentification,以了解这一点为什么很重要]
>>> On Tue, Jul 4, 2023 at 11:38 AM Yangtao Li <frank.li@vivo.com> wrote:
>>>> Use devm_platform_ioremap_resource() to simplify code.
>>>>
>>>> Signed-off-by: Yangtao Li <frank.li@vivo.com>
>>> Thanks for your patch, which is now commit c1cd7a7a231a26c6 ("fbdev:
>>> imxfb: Convert to devm_platform_ioremap_resource()") in fbdev/for-next
>>>
>>>> --- a/drivers/video/fbdev/imxfb.c
>>>> +++ b/drivers/video/fbdev/imxfb.c
>>>> @@ -868,7 +868,6 @@ static int imxfb_probe(struct platform_device *pdev)
>>>> struct imxfb_info *fbi;
>>>> struct lcd_device *lcd;
>>>> struct fb_info *info;
>>>> - struct resource *res;
>>>> struct imx_fb_videomode *m;
>>>> const struct of_device_id *of_id;
>>>> struct device_node *display_np;
>>>> @@ -885,10 +884,6 @@ static int imxfb_probe(struct platform_device *pdev)
>>>> if (of_id)
>>>> pdev->id_entry = of_id->data;
>>>>
>>>> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>>> - if (!res)
>>>> - return -ENODEV;
>>>> -
>>>> info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev);
>>>> if (!info)
>>>> return -ENOMEM;
>>>> @@ -970,7 +965,7 @@ static int imxfb_probe(struct platform_device *pdev)
>>>> goto failed_getclock;
>>>> }
>>>>
>>>> - fbi->regs = devm_ioremap_resource(&pdev->dev, res);
>>>> + fbi->regs = devm_platform_ioremap_resource(pdev, 0);
>>>> if (IS_ERR(fbi->regs)) {
>>>> ret = PTR_ERR(fbi->regs);
>>>> goto failed_ioremap;
>>>> @@ -1043,7 +1038,6 @@ static int imxfb_probe(struct platform_device *pdev)
>>>> failed_map:
>>>> failed_ioremap:
>>>> failed_getclock:
>>>> - release_mem_region(res->start, resource_size(res));
>>> This part is not directly related, but a bug fix for commit
>>> b083c22d51148f3d ("video: fbdev: imxfb: Convert request_mem_region +
>>> ioremap to devm_ioremap_resource") in v6.0.
>>
>>
>> IIUC, split this patch into two, remove release_mem_region in one and
>>
>> mark it as Fixes: b083c22d51148f3d ("video: fbdev: imxfb: Convert
>> request_mem_region +
>>
>> ioremap to devm_ioremap_resource")?
>
> Exactly. But as Helge has already applied this patch to his tree, we have
> to check with him if this is still feasible...
Sure. Just send them to the list and I apply those patches instead.
Thanks!
Helge
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fbdev: imxfb: Convert to devm_platform_ioremap_resource()
@ 2023-07-10 9:49 ` Helge Deller
0 siblings, 0 replies; 18+ messages in thread
From: Helge Deller @ 2023-07-10 9:49 UTC (permalink / raw)
To: Geert Uytterhoeven, Yangtao Li
Cc: Sascha Hauer, Pengutronix Kernel Team, Shawn Guo, Fabio Estevam,
NXP Linux Team, linux-fbdev, linux-arm-kernel, dri-devel,
linux-kernel, Uwe Kleine-König
On 7/10/23 09:41, Geert Uytterhoeven wrote:
> Hi Yangtao,
>
> On Mon, Jul 10, 2023 at 9:25 AM Yangtao Li <frank.li@vivo.com> wrote:
>> On 2023/7/10 15:10, Geert Uytterhoeven wrote:
>>> [你通常不会收到来自 geert@linux-m68k.org 的电子邮件。请访问 https://aka.ms/LearnAboutSenderIdentification,以了解这一点为什么很重要]
>>> On Tue, Jul 4, 2023 at 11:38 AM Yangtao Li <frank.li@vivo.com> wrote:
>>>> Use devm_platform_ioremap_resource() to simplify code.
>>>>
>>>> Signed-off-by: Yangtao Li <frank.li@vivo.com>
>>> Thanks for your patch, which is now commit c1cd7a7a231a26c6 ("fbdev:
>>> imxfb: Convert to devm_platform_ioremap_resource()") in fbdev/for-next
>>>
>>>> --- a/drivers/video/fbdev/imxfb.c
>>>> +++ b/drivers/video/fbdev/imxfb.c
>>>> @@ -868,7 +868,6 @@ static int imxfb_probe(struct platform_device *pdev)
>>>> struct imxfb_info *fbi;
>>>> struct lcd_device *lcd;
>>>> struct fb_info *info;
>>>> - struct resource *res;
>>>> struct imx_fb_videomode *m;
>>>> const struct of_device_id *of_id;
>>>> struct device_node *display_np;
>>>> @@ -885,10 +884,6 @@ static int imxfb_probe(struct platform_device *pdev)
>>>> if (of_id)
>>>> pdev->id_entry = of_id->data;
>>>>
>>>> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>>> - if (!res)
>>>> - return -ENODEV;
>>>> -
>>>> info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev);
>>>> if (!info)
>>>> return -ENOMEM;
>>>> @@ -970,7 +965,7 @@ static int imxfb_probe(struct platform_device *pdev)
>>>> goto failed_getclock;
>>>> }
>>>>
>>>> - fbi->regs = devm_ioremap_resource(&pdev->dev, res);
>>>> + fbi->regs = devm_platform_ioremap_resource(pdev, 0);
>>>> if (IS_ERR(fbi->regs)) {
>>>> ret = PTR_ERR(fbi->regs);
>>>> goto failed_ioremap;
>>>> @@ -1043,7 +1038,6 @@ static int imxfb_probe(struct platform_device *pdev)
>>>> failed_map:
>>>> failed_ioremap:
>>>> failed_getclock:
>>>> - release_mem_region(res->start, resource_size(res));
>>> This part is not directly related, but a bug fix for commit
>>> b083c22d51148f3d ("video: fbdev: imxfb: Convert request_mem_region +
>>> ioremap to devm_ioremap_resource") in v6.0.
>>
>>
>> IIUC, split this patch into two, remove release_mem_region in one and
>>
>> mark it as Fixes: b083c22d51148f3d ("video: fbdev: imxfb: Convert
>> request_mem_region +
>>
>> ioremap to devm_ioremap_resource")?
>
> Exactly. But as Helge has already applied this patch to his tree, we have
> to check with him if this is still feasible...
Sure. Just send them to the list and I apply those patches instead.
Thanks!
Helge
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2023-07-10 9:55 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-04 9:36 [PATCH] fbdev: imxfb: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-04 9:36 ` Yangtao Li
2023-07-04 9:36 ` Yangtao Li
2023-07-07 6:30 ` Helge Deller
2023-07-07 6:30 ` Helge Deller
2023-07-07 6:30 ` Helge Deller
2023-07-10 7:10 ` Geert Uytterhoeven
2023-07-10 7:10 ` Geert Uytterhoeven
2023-07-10 7:10 ` Geert Uytterhoeven
2023-07-10 7:25 ` Yangtao Li
2023-07-10 7:25 ` Yangtao Li
2023-07-10 7:25 ` Yangtao Li
2023-07-10 7:41 ` Geert Uytterhoeven
2023-07-10 7:41 ` Geert Uytterhoeven
2023-07-10 7:41 ` Geert Uytterhoeven
2023-07-10 9:49 ` Helge Deller
2023-07-10 9:49 ` Helge Deller
2023-07-10 9:49 ` Helge Deller
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.