All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] video: pxafb: Use devm_platform_ioremap_resource() in pxafb_probe()
@ 2019-09-19 15:01   ` Markus Elfring
  0 siblings, 0 replies; 5+ messages in thread
From: Markus Elfring @ 2019-09-19 15:01 UTC (permalink / raw)
  To: linux-fbdev, dri-devel, Bartlomiej Zolnierkiewicz, Daniel Mack,
	Mauro Carvalho Chehab, Rafael J. Wysocki, Viresh Kumar,
	YueHaibing
  Cc: LKML, kernel-janitors, Bartosz Golaszewski, Himanshu Jha

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 19 Sep 2019 16:51:38 +0200

Simplify this function implementation by using a known wrapper function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/video/fbdev/pxafb.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
index f70c9f79622e..237f8f436fdb 100644
--- a/drivers/video/fbdev/pxafb.c
+++ b/drivers/video/fbdev/pxafb.c
@@ -2237,7 +2237,6 @@ static int pxafb_probe(struct platform_device *dev)
 {
 	struct pxafb_info *fbi;
 	struct pxafb_mach_info *inf, *pdata;
-	struct resource *r;
 	int i, irq, ret;

 	dev_dbg(&dev->dev, "pxafb_probe\n");
@@ -2303,14 +2302,7 @@ static int pxafb_probe(struct platform_device *dev)
 		fbi->lcd_supply = NULL;
 	}

-	r = platform_get_resource(dev, IORESOURCE_MEM, 0);
-	if (r == NULL) {
-		dev_err(&dev->dev, "no I/O memory resource defined\n");
-		ret = -ENODEV;
-		goto failed;
-	}
-
-	fbi->mmio_base = devm_ioremap_resource(&dev->dev, r);
+	fbi->mmio_base = devm_platform_ioremap_resource(dev, 0);
 	if (IS_ERR(fbi->mmio_base)) {
 		dev_err(&dev->dev, "failed to get I/O memory\n");
 		ret = -EBUSY;
--
2.23.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] video: pxafb: Use devm_platform_ioremap_resource() in pxafb_probe()
@ 2019-09-19 15:01   ` Markus Elfring
  0 siblings, 0 replies; 5+ messages in thread
From: Markus Elfring @ 2019-09-19 15:01 UTC (permalink / raw)
  To: linux-fbdev, dri-devel, Bartlomiej Zolnierkiewicz, Daniel Mack,
	Mauro Carvalho Chehab, Rafael J. Wysocki, Viresh Kumar,
	YueHaibing
  Cc: LKML, kernel-janitors, Bartosz Golaszewski, Himanshu Jha

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 19 Sep 2019 16:51:38 +0200

Simplify this function implementation by using a known wrapper function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/video/fbdev/pxafb.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
index f70c9f79622e..237f8f436fdb 100644
--- a/drivers/video/fbdev/pxafb.c
+++ b/drivers/video/fbdev/pxafb.c
@@ -2237,7 +2237,6 @@ static int pxafb_probe(struct platform_device *dev)
 {
 	struct pxafb_info *fbi;
 	struct pxafb_mach_info *inf, *pdata;
-	struct resource *r;
 	int i, irq, ret;

 	dev_dbg(&dev->dev, "pxafb_probe\n");
@@ -2303,14 +2302,7 @@ static int pxafb_probe(struct platform_device *dev)
 		fbi->lcd_supply = NULL;
 	}

-	r = platform_get_resource(dev, IORESOURCE_MEM, 0);
-	if (r == NULL) {
-		dev_err(&dev->dev, "no I/O memory resource defined\n");
-		ret = -ENODEV;
-		goto failed;
-	}
-
-	fbi->mmio_base = devm_ioremap_resource(&dev->dev, r);
+	fbi->mmio_base = devm_platform_ioremap_resource(dev, 0);
 	if (IS_ERR(fbi->mmio_base)) {
 		dev_err(&dev->dev, "failed to get I/O memory\n");
 		ret = -EBUSY;
--
2.23.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] video: pxafb: Use devm_platform_ioremap_resource() in pxafb_probe()
  2019-09-19 15:01   ` Markus Elfring
  (?)
@ 2020-01-03 12:34     ` Bartlomiej Zolnierkiewicz
  -1 siblings, 0 replies; 5+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-01-03 12:34 UTC (permalink / raw)
  To: Markus Elfring, Daniel Mack, Mauro Carvalho Chehab,
	Rafael J. Wysocki, Viresh Kumar, YueHaibing
  Cc: linux-fbdev, dri-devel, LKML, kernel-janitors,
	Bartosz Golaszewski, Himanshu Jha


On 9/19/19 5:01 PM, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 19 Sep 2019 16:51:38 +0200
> 
> Simplify this function implementation by using a known wrapper function.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Thanks, patch queued for v5.6 (also sorry for the delay).

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> ---
>  drivers/video/fbdev/pxafb.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
> index f70c9f79622e..237f8f436fdb 100644
> --- a/drivers/video/fbdev/pxafb.c
> +++ b/drivers/video/fbdev/pxafb.c
> @@ -2237,7 +2237,6 @@ static int pxafb_probe(struct platform_device *dev)
>  {
>  	struct pxafb_info *fbi;
>  	struct pxafb_mach_info *inf, *pdata;
> -	struct resource *r;
>  	int i, irq, ret;
> 
>  	dev_dbg(&dev->dev, "pxafb_probe\n");
> @@ -2303,14 +2302,7 @@ static int pxafb_probe(struct platform_device *dev)
>  		fbi->lcd_supply = NULL;
>  	}
> 
> -	r = platform_get_resource(dev, IORESOURCE_MEM, 0);
> -	if (r == NULL) {
> -		dev_err(&dev->dev, "no I/O memory resource defined\n");
> -		ret = -ENODEV;
> -		goto failed;
> -	}
> -
> -	fbi->mmio_base = devm_ioremap_resource(&dev->dev, r);
> +	fbi->mmio_base = devm_platform_ioremap_resource(dev, 0);
>  	if (IS_ERR(fbi->mmio_base)) {
>  		dev_err(&dev->dev, "failed to get I/O memory\n");
>  		ret = -EBUSY;
> --
> 2.23.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] video: pxafb: Use devm_platform_ioremap_resource() in pxafb_probe()
@ 2020-01-03 12:34     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 5+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-01-03 12:34 UTC (permalink / raw)
  To: Markus Elfring, Daniel Mack, Mauro Carvalho Chehab,
	Rafael J. Wysocki, Viresh Kumar, YueHaibing
  Cc: linux-fbdev, kernel-janitors, LKML, dri-devel,
	Bartosz Golaszewski, Himanshu Jha


On 9/19/19 5:01 PM, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 19 Sep 2019 16:51:38 +0200
> 
> Simplify this function implementation by using a known wrapper function.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Thanks, patch queued for v5.6 (also sorry for the delay).

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> ---
>  drivers/video/fbdev/pxafb.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
> index f70c9f79622e..237f8f436fdb 100644
> --- a/drivers/video/fbdev/pxafb.c
> +++ b/drivers/video/fbdev/pxafb.c
> @@ -2237,7 +2237,6 @@ static int pxafb_probe(struct platform_device *dev)
>  {
>  	struct pxafb_info *fbi;
>  	struct pxafb_mach_info *inf, *pdata;
> -	struct resource *r;
>  	int i, irq, ret;
> 
>  	dev_dbg(&dev->dev, "pxafb_probe\n");
> @@ -2303,14 +2302,7 @@ static int pxafb_probe(struct platform_device *dev)
>  		fbi->lcd_supply = NULL;
>  	}
> 
> -	r = platform_get_resource(dev, IORESOURCE_MEM, 0);
> -	if (r = NULL) {
> -		dev_err(&dev->dev, "no I/O memory resource defined\n");
> -		ret = -ENODEV;
> -		goto failed;
> -	}
> -
> -	fbi->mmio_base = devm_ioremap_resource(&dev->dev, r);
> +	fbi->mmio_base = devm_platform_ioremap_resource(dev, 0);
>  	if (IS_ERR(fbi->mmio_base)) {
>  		dev_err(&dev->dev, "failed to get I/O memory\n");
>  		ret = -EBUSY;
> --
> 2.23.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] video: pxafb: Use devm_platform_ioremap_resource() in pxafb_probe()
@ 2020-01-03 12:34     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 5+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-01-03 12:34 UTC (permalink / raw)
  To: Markus Elfring, Daniel Mack, Mauro Carvalho Chehab,
	Rafael J. Wysocki, Viresh Kumar, YueHaibing
  Cc: linux-fbdev, kernel-janitors, LKML, dri-devel,
	Bartosz Golaszewski, Himanshu Jha


On 9/19/19 5:01 PM, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 19 Sep 2019 16:51:38 +0200
> 
> Simplify this function implementation by using a known wrapper function.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Thanks, patch queued for v5.6 (also sorry for the delay).

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> ---
>  drivers/video/fbdev/pxafb.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
> index f70c9f79622e..237f8f436fdb 100644
> --- a/drivers/video/fbdev/pxafb.c
> +++ b/drivers/video/fbdev/pxafb.c
> @@ -2237,7 +2237,6 @@ static int pxafb_probe(struct platform_device *dev)
>  {
>  	struct pxafb_info *fbi;
>  	struct pxafb_mach_info *inf, *pdata;
> -	struct resource *r;
>  	int i, irq, ret;
> 
>  	dev_dbg(&dev->dev, "pxafb_probe\n");
> @@ -2303,14 +2302,7 @@ static int pxafb_probe(struct platform_device *dev)
>  		fbi->lcd_supply = NULL;
>  	}
> 
> -	r = platform_get_resource(dev, IORESOURCE_MEM, 0);
> -	if (r == NULL) {
> -		dev_err(&dev->dev, "no I/O memory resource defined\n");
> -		ret = -ENODEV;
> -		goto failed;
> -	}
> -
> -	fbi->mmio_base = devm_ioremap_resource(&dev->dev, r);
> +	fbi->mmio_base = devm_platform_ioremap_resource(dev, 0);
>  	if (IS_ERR(fbi->mmio_base)) {
>  		dev_err(&dev->dev, "failed to get I/O memory\n");
>  		ret = -EBUSY;
> --
> 2.23.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-01-03 12:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20190919150135epcas3p2bf5ab33712e12edd90af2766eeaaccda@epcas3p2.samsung.com>
2019-09-19 15:01 ` [PATCH] video: pxafb: Use devm_platform_ioremap_resource() in pxafb_probe() Markus Elfring
2019-09-19 15:01   ` Markus Elfring
2020-01-03 12:34   ` Bartlomiej Zolnierkiewicz
2020-01-03 12:34     ` Bartlomiej Zolnierkiewicz
2020-01-03 12:34     ` Bartlomiej Zolnierkiewicz

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.