Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* [PATCH][next] video: fbdev: atmel_lcdfb: remove redundant initialization to variable ret
@ 2019-06-11 17:09 Colin King
  2019-06-12  7:55 ` Nicolas.Ferre
  0 siblings, 1 reply; 4+ messages in thread
From: Colin King @ 2019-06-11 17:09 UTC (permalink / raw)
  To: Nicolas Ferre, Bartlomiej Zolnierkiewicz, Alexandre Belloni,
	Ludovic Desroches, linux-fbdev, dri-devel, linux-arm-kernel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Currently variable ret is being initialized with -ENOENT however that
value is never read and ret is being re-assigned later on. Hence this
assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/video/fbdev/atmel_lcdfb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
index fb117ccbeab3..930cc3f92e01 100644
--- a/drivers/video/fbdev/atmel_lcdfb.c
+++ b/drivers/video/fbdev/atmel_lcdfb.c
@@ -950,7 +950,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
 	struct fb_videomode fb_vm;
 	struct gpio_desc *gpiod;
 	struct videomode vm;
-	int ret = -ENOENT;
+	int ret;
 	int i;
 
 	sinfo->config = (struct atmel_lcdfb_config*)
-- 
2.20.1

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

* Re: [PATCH][next] video: fbdev: atmel_lcdfb: remove redundant initialization to variable ret
  2019-06-11 17:09 [PATCH][next] video: fbdev: atmel_lcdfb: remove redundant initialization to variable ret Colin King
@ 2019-06-12  7:55 ` Nicolas.Ferre
  2019-06-12 14:13   ` Ludovic Desroches
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas.Ferre @ 2019-06-12  7:55 UTC (permalink / raw)
  To: colin.king, b.zolnierkie, alexandre.belloni, Ludovic.Desroches,
	linux-fb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UwMSAxMDA2NDQNCj4gLS0tIGEvZHJpdmVycy92aWRlby9mYmRldi9hdG1l
bF9sY2RmYi5jDQo+ICsrKyBiL2RyaXZlcnMvdmlkZW8vZmJkZXYvYXRtZWxfbGNkZmIuYw0KPiBA
QCAtOTUwLDcgKzk1MCw3IEBAIHN0YXRpYyBpbnQgYXRtZWxfbGNkZmJfb2ZfaW5pdChzdHJ1Y3Qg
YXRtZWxfbGNkZmJfaW5mbyAqc2luZm8pDQo+ICAgCXN0cnVjdCBmYl92aWRlb21vZGUgZmJfdm07
DQo+ICAgCXN0cnVjdCBncGlvX2Rlc2MgKmdwaW9kOw0KPiAgIAlzdHJ1Y3QgdmlkZW9tb2RlIHZt
Ow0KPiAtCWludCByZXQgPSAtRU5PRU5UOw0KPiArCWludCByZXQ7DQo+ICAgCWludCBpOw0KPiAg
IA0KPiAgIAlzaW5mby0+Y29uZmlnID0gKHN0cnVjdCBhdG1lbF9sY2RmYl9jb25maWcqKQ0KPiAN
Cg0KDQotLSANCk5pY29sYXMgRmVycmUNCg=

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

* Re: [PATCH][next] video: fbdev: atmel_lcdfb: remove redundant initialization to variable ret
  2019-06-12  7:55 ` Nicolas.Ferre
@ 2019-06-12 14:13   ` Ludovic Desroches
  2019-06-21 12:06     ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Desroches @ 2019-06-12 14:13 UTC (permalink / raw)
  To: Nicolas Ferre - M43238
  Cc: Colin King, Bartlomiej Zolnierkiewicz, Alexandre Belloni,
	linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org

On Wed, Jun 12, 2019 at 09:55:30AM +0200, Nicolas Ferre - M43238 wrote:
> On 11/06/2019 at 19:09, Colin King wrote:
> > External E-Mail
> > 
> > 
> > From: Colin Ian King <colin.king@canonical.com>
> > 
> > Currently variable ret is being initialized with -ENOENT however that
> > value is never read and ret is being re-assigned later on. Hence this
> > assignment is redundant and can be removed.
> > 
> > Addresses-Coverity: ("Unused value")
> > Signed-off-by: Colin Ian King <colin.king@canonical.com>
> 
> Indeed:
> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com> 

Thanks

> 
> Thanks, best regards,
>    Nicolas
> 
> 
> > ---
> >   drivers/video/fbdev/atmel_lcdfb.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
> > index fb117ccbeab3..930cc3f92e01 100644
> > --- a/drivers/video/fbdev/atmel_lcdfb.c
> > +++ b/drivers/video/fbdev/atmel_lcdfb.c
> > @@ -950,7 +950,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
> >   	struct fb_videomode fb_vm;
> >   	struct gpio_desc *gpiod;
> >   	struct videomode vm;
> > -	int ret = -ENOENT;
> > +	int ret;
> >   	int i;
> >   
> >   	sinfo->config = (struct atmel_lcdfb_config*)
> > 
> 
> 
> -- 
> Nicolas Ferre

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

* Re: [PATCH][next] video: fbdev: atmel_lcdfb: remove redundant initialization to variable ret
  2019-06-12 14:13   ` Ludovic Desroches
@ 2019-06-21 12:06     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2019-06-21 12:06 UTC (permalink / raw)
  To: Ludovic Desroches, Nicolas Ferre, Colin King
  Cc: Alexandre Belloni, linux-fbdev@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org


On 6/12/19 4:13 PM, Ludovic Desroches wrote:
> On Wed, Jun 12, 2019 at 09:55:30AM +0200, Nicolas Ferre - M43238 wrote:
>> On 11/06/2019 at 19:09, Colin King wrote:
>>> External E-Mail
>>>
>>>
>>> From: Colin Ian King <colin.king@canonical.com>
>>>
>>> Currently variable ret is being initialized with -ENOENT however that
>>> value is never read and ret is being re-assigned later on. Hence this
>>> assignment is redundant and can be removed.
>>>
>>> Addresses-Coverity: ("Unused value")
>>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>>
>> Indeed:
>> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> 
> Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com> 

Patch queued for v5.3, thanks.

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

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

end of thread, other threads:[~2019-06-21 12:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-11 17:09 [PATCH][next] video: fbdev: atmel_lcdfb: remove redundant initialization to variable ret Colin King
2019-06-12  7:55 ` Nicolas.Ferre
2019-06-12 14:13   ` Ludovic Desroches
2019-06-21 12:06     ` Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox