linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fbdev: geocode: remove unneeded NULL check
@ 2014-12-31  6:55 Sudip Mukherjee
  2015-01-05 12:57 ` Tomi Valkeinen
  0 siblings, 1 reply; 7+ messages in thread
From: Sudip Mukherjee @ 2014-12-31  6:55 UTC (permalink / raw)
  To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
  Cc: Sudip Mukherjee, linux-geode, linux-fbdev, linux-kernel

the check for info is not required as we are checking it immediately
after gx1fb_init_fbinfo() and returnig -ENOMEM if it is NULL.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/video/fbdev/geode/gx1fb_core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/video/fbdev/geode/gx1fb_core.c b/drivers/video/fbdev/geode/gx1fb_core.c
index 2794ba1..9bee874 100644
--- a/drivers/video/fbdev/geode/gx1fb_core.c
+++ b/drivers/video/fbdev/geode/gx1fb_core.c
@@ -374,10 +374,8 @@ static int gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		release_mem_region(gx1_gx_base() + 0x8300, 0x100);
 	}
 
-	if (info) {
-		fb_dealloc_cmap(&info->cmap);
-		framebuffer_release(info);
-	}
+	fb_dealloc_cmap(&info->cmap);
+	framebuffer_release(info);
 
 	return ret;
 }
-- 
1.8.1.2


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

* Re: [PATCH] fbdev: geocode: remove unneeded NULL check
  2014-12-31  6:55 [PATCH] fbdev: geocode: remove unneeded NULL check Sudip Mukherjee
@ 2015-01-05 12:57 ` Tomi Valkeinen
  0 siblings, 0 replies; 7+ messages in thread
From: Tomi Valkeinen @ 2015-01-05 12:57 UTC (permalink / raw)
  To: Sudip Mukherjee, Jean-Christophe Plagniol-Villard
  Cc: linux-geode, linux-fbdev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 987 bytes --]

On 31/12/14 08:55, Sudip Mukherjee wrote:
> the check for info is not required as we are checking it immediately
> after gx1fb_init_fbinfo() and returnig -ENOMEM if it is NULL.
> 
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
>  drivers/video/fbdev/geode/gx1fb_core.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/video/fbdev/geode/gx1fb_core.c b/drivers/video/fbdev/geode/gx1fb_core.c
> index 2794ba1..9bee874 100644
> --- a/drivers/video/fbdev/geode/gx1fb_core.c
> +++ b/drivers/video/fbdev/geode/gx1fb_core.c
> @@ -374,10 +374,8 @@ static int gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>  		release_mem_region(gx1_gx_base() + 0x8300, 0x100);
>  	}
>  
> -	if (info) {
> -		fb_dealloc_cmap(&info->cmap);
> -		framebuffer_release(info);
> -	}
> +	fb_dealloc_cmap(&info->cmap);
> +	framebuffer_release(info);
>  
>  	return ret;
>  }
> 

Thanks, queued for 3.20.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH] video: vt8500lcdfb: remove unneeded continue
@ 2015-01-06 12:57 Sudip Mukherjee
  2015-01-06 12:57 ` [PATCH] fbdev: geocode: remove unneeded NULL check Sudip Mukherjee
  2015-01-06 18:31 ` [PATCH] video: vt8500lcdfb: remove unneeded continue Sergei Shtylyov
  0 siblings, 2 replies; 7+ messages in thread
From: Sudip Mukherjee @ 2015-01-06 12:57 UTC (permalink / raw)
  To: linux-arm-kernel

continue is not needed at the end of a for loop

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/video/fbdev/vt8500lcdfb.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/video/fbdev/vt8500lcdfb.c b/drivers/video/fbdev/vt8500lcdfb.c
index ffaf29e..6716bf5 100644
--- a/drivers/video/fbdev/vt8500lcdfb.c
+++ b/drivers/video/fbdev/vt8500lcdfb.c
@@ -115,7 +115,6 @@ static int vt8500lcd_set_par(struct fb_info *info)
 	for (i = 0; i < 8; i++) {
 		if (bpp_values[i] = info->var.bits_per_pixel) {
 			reg_bpp = i;
-			continue;
 		}
 	}
 
-- 
1.8.1.2


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

* [PATCH] fbdev: geocode: remove unneeded NULL check
  2015-01-06 12:57 [PATCH] video: vt8500lcdfb: remove unneeded continue Sudip Mukherjee
@ 2015-01-06 12:57 ` Sudip Mukherjee
  2015-01-13 11:31   ` Tomi Valkeinen
  2015-01-06 18:31 ` [PATCH] video: vt8500lcdfb: remove unneeded continue Sergei Shtylyov
  1 sibling, 1 reply; 7+ messages in thread
From: Sudip Mukherjee @ 2015-01-06 12:57 UTC (permalink / raw)
  To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
  Cc: Sudip Mukherjee, linux-geode, linux-fbdev, linux-kernel

the check for info is not required as we are checking it immediately
after gxfb_init_fbinfo() and lxfb_init_fbinfo() and returnig -ENOMEM
if it is NULL.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
Hi Tomi,
This patch is similar to my last patch which you have already queued
for 3.20. if you can revert that then i can send you a single patch
with all these three changes together.

 drivers/video/fbdev/geode/gxfb_core.c | 6 ++----
 drivers/video/fbdev/geode/lxfb_core.c | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/video/fbdev/geode/gxfb_core.c b/drivers/video/fbdev/geode/gxfb_core.c
index 1790f14..124d7c7 100644
--- a/drivers/video/fbdev/geode/gxfb_core.c
+++ b/drivers/video/fbdev/geode/gxfb_core.c
@@ -444,10 +444,8 @@ static int gxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		pci_release_region(pdev, 1);
 	}
 
-	if (info) {
-		fb_dealloc_cmap(&info->cmap);
-		framebuffer_release(info);
-	}
+	fb_dealloc_cmap(&info->cmap);
+	framebuffer_release(info);
 	return ret;
 }
 
diff --git a/drivers/video/fbdev/geode/lxfb_core.c b/drivers/video/fbdev/geode/lxfb_core.c
index 9e1d19d..138da6c 100644
--- a/drivers/video/fbdev/geode/lxfb_core.c
+++ b/drivers/video/fbdev/geode/lxfb_core.c
@@ -577,10 +577,8 @@ err:
 		pci_release_region(pdev, 3);
 	}
 
-	if (info) {
-		fb_dealloc_cmap(&info->cmap);
-		framebuffer_release(info);
-	}
+	fb_dealloc_cmap(&info->cmap);
+	framebuffer_release(info);
 
 	return ret;
 }
-- 
1.8.1.2


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

* Re: [PATCH] video: vt8500lcdfb: remove unneeded continue
  2015-01-06 12:57 [PATCH] video: vt8500lcdfb: remove unneeded continue Sudip Mukherjee
  2015-01-06 12:57 ` [PATCH] fbdev: geocode: remove unneeded NULL check Sudip Mukherjee
@ 2015-01-06 18:31 ` Sergei Shtylyov
  2015-01-07  4:58   ` Sudip Mukherjee
  1 sibling, 1 reply; 7+ messages in thread
From: Sergei Shtylyov @ 2015-01-06 18:31 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

On 01/06/2015 03:45 PM, Sudip Mukherjee wrote:

> continue is not needed at the end of a for loop

> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
>   drivers/video/fbdev/vt8500lcdfb.c | 1 -
>   1 file changed, 1 deletion(-)

> diff --git a/drivers/video/fbdev/vt8500lcdfb.c b/drivers/video/fbdev/vt8500lcdfb.c
> index ffaf29e..6716bf5 100644
> --- a/drivers/video/fbdev/vt8500lcdfb.c
> +++ b/drivers/video/fbdev/vt8500lcdfb.c
> @@ -115,7 +115,6 @@ static int vt8500lcd_set_par(struct fb_info *info)
>   	for (i = 0; i < 8; i++) {
>   		if (bpp_values[i] = info->var.bits_per_pixel) {
>   			reg_bpp = i;
> -			continue;
>   		}

    {} are not needed any more either. ;-)

[...]

WBR, Sergei


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

* Re: [PATCH] video: vt8500lcdfb: remove unneeded continue
  2015-01-06 18:31 ` [PATCH] video: vt8500lcdfb: remove unneeded continue Sergei Shtylyov
@ 2015-01-07  4:58   ` Sudip Mukherjee
  0 siblings, 0 replies; 7+ messages in thread
From: Sudip Mukherjee @ 2015-01-07  4:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 06, 2015 at 09:31:39PM +0300, Sergei Shtylyov wrote:
> Hello.
> 
> On 01/06/2015 03:45 PM, Sudip Mukherjee wrote:
> 
> >continue is not needed at the end of a for loop
> 
> >Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> >---
> >  drivers/video/fbdev/vt8500lcdfb.c | 1 -
> >  1 file changed, 1 deletion(-)
> 
> >diff --git a/drivers/video/fbdev/vt8500lcdfb.c b/drivers/video/fbdev/vt8500lcdfb.c
> >index ffaf29e..6716bf5 100644
> >--- a/drivers/video/fbdev/vt8500lcdfb.c
> >+++ b/drivers/video/fbdev/vt8500lcdfb.c
> >@@ -115,7 +115,6 @@ static int vt8500lcd_set_par(struct fb_info *info)
> >  	for (i = 0; i < 8; i++) {
> >  		if (bpp_values[i] = info->var.bits_per_pixel) {
> >  			reg_bpp = i;
> >-			continue;
> >  		}
> 
>    {} are not needed any more either. ;-)

i have noticed that but thought that will be again a different type of change in a single patch.
but now it seems that this patch will introduce a new checkpatch warning, so i should have corrected that in it.
i will send a v2.

thanks
sudip

> 
> [...]
> 
> WBR, Sergei
> 

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

* Re: [PATCH] fbdev: geocode: remove unneeded NULL check
  2015-01-06 12:57 ` [PATCH] fbdev: geocode: remove unneeded NULL check Sudip Mukherjee
@ 2015-01-13 11:31   ` Tomi Valkeinen
  0 siblings, 0 replies; 7+ messages in thread
From: Tomi Valkeinen @ 2015-01-13 11:31 UTC (permalink / raw)
  To: Sudip Mukherjee
  Cc: Jean-Christophe Plagniol-Villard, linux-geode, linux-fbdev,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 555 bytes --]

On 06/01/15 14:45, Sudip Mukherjee wrote:
> the check for info is not required as we are checking it immediately
> after gxfb_init_fbinfo() and lxfb_init_fbinfo() and returnig -ENOMEM
> if it is NULL.
> 
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
> Hi Tomi,
> This patch is similar to my last patch which you have already queued
> for 3.20. if you can revert that then i can send you a single patch
> with all these three changes together.

No need for that, two separate patches is fine. So queued for 3.20.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2015-01-13 11:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-06 12:57 [PATCH] video: vt8500lcdfb: remove unneeded continue Sudip Mukherjee
2015-01-06 12:57 ` [PATCH] fbdev: geocode: remove unneeded NULL check Sudip Mukherjee
2015-01-13 11:31   ` Tomi Valkeinen
2015-01-06 18:31 ` [PATCH] video: vt8500lcdfb: remove unneeded continue Sergei Shtylyov
2015-01-07  4:58   ` Sudip Mukherjee
  -- strict thread matches above, loose matches on Subject: below --
2014-12-31  6:55 [PATCH] fbdev: geocode: remove unneeded NULL check Sudip Mukherjee
2015-01-05 12:57 ` Tomi Valkeinen

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).