All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: fsl-mc: fix uninitialized variable use
@ 2017-11-27  9:01 ` laurentiu.tudor at nxp.com
  0 siblings, 0 replies; 10+ messages in thread
From: laurentiu.tudor @ 2017-11-27  9:01 UTC (permalink / raw)
  To: gregkh, ruxandra.radulescu
  Cc: devel, linux-kernel, bogdan.purcareata, leoyang.li, stuyoder,
	roy.pledge, linux-arm-kernel, Laurentiu Tudor

From: Laurentiu Tudor <laurentiu.tudor@nxp.com>

Fix this warning triggering on a powerpc build:
warning: 'error' may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
---
 drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
index f84bc14..f15bab3 100644
--- a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
+++ b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
@@ -570,6 +570,7 @@ int fsl_mc_device_add(struct fsl_mc_obj_desc *obj_desc,
 	mc_dev->dev.release = fsl_mc_device_release;
 	mc_dev->dev.type = fsl_mc_get_device_type(obj_desc->type);
 	if (!mc_dev->dev.type) {
+		error = -ENODEV;
 		dev_err(parent_dev, "unknown device type %s\n", obj_desc->type);
 		goto error_cleanup_dev;
 	}
-- 
2.9.4

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

* [PATCH] staging: fsl-mc: fix uninitialized variable use
@ 2017-11-27  9:01 ` laurentiu.tudor at nxp.com
  0 siblings, 0 replies; 10+ messages in thread
From: laurentiu.tudor at nxp.com @ 2017-11-27  9:01 UTC (permalink / raw)
  To: linux-arm-kernel

From: Laurentiu Tudor <laurentiu.tudor@nxp.com>

Fix this warning triggering on a powerpc build:
warning: 'error' may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
---
 drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
index f84bc14..f15bab3 100644
--- a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
+++ b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
@@ -570,6 +570,7 @@ int fsl_mc_device_add(struct fsl_mc_obj_desc *obj_desc,
 	mc_dev->dev.release = fsl_mc_device_release;
 	mc_dev->dev.type = fsl_mc_get_device_type(obj_desc->type);
 	if (!mc_dev->dev.type) {
+		error = -ENODEV;
 		dev_err(parent_dev, "unknown device type %s\n", obj_desc->type);
 		goto error_cleanup_dev;
 	}
-- 
2.9.4

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

* Re: [PATCH] staging: fsl-mc: fix uninitialized variable use
  2017-11-27  9:01 ` laurentiu.tudor at nxp.com
@ 2017-11-27  9:08   ` Greg KH
  -1 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2017-11-27  9:08 UTC (permalink / raw)
  To: laurentiu.tudor
  Cc: ruxandra.radulescu, devel, linux-kernel, bogdan.purcareata,
	leoyang.li, stuyoder, roy.pledge, linux-arm-kernel

On Mon, Nov 27, 2017 at 11:01:34AM +0200, laurentiu.tudor@nxp.com wrote:
> From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
> 
> Fix this warning triggering on a powerpc build:
> warning: 'error' may be used uninitialized in this function [-Wmaybe-uninitialized]
> 
> Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
> ---

You forgot a reported-by line :(

And I beat you by about 30 minutes to this patch, sorry about that.

Next time always test-build your patches...

thanks,

greg k-h

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

* [PATCH] staging: fsl-mc: fix uninitialized variable use
@ 2017-11-27  9:08   ` Greg KH
  0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2017-11-27  9:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 27, 2017 at 11:01:34AM +0200, laurentiu.tudor at nxp.com wrote:
> From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
> 
> Fix this warning triggering on a powerpc build:
> warning: 'error' may be used uninitialized in this function [-Wmaybe-uninitialized]
> 
> Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
> ---

You forgot a reported-by line :(

And I beat you by about 30 minutes to this patch, sorry about that.

Next time always test-build your patches...

thanks,

greg k-h

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

* Re: [PATCH] staging: fsl-mc: fix uninitialized variable use
  2017-11-27  9:08   ` Greg KH
@ 2017-11-27  9:31     ` Laurentiu Tudor
  -1 siblings, 0 replies; 10+ messages in thread
From: Laurentiu Tudor @ 2017-11-27  9:31 UTC (permalink / raw)
  To: Greg KH
  Cc: Ruxandra Ioana Radulescu, devel, linux-kernel, Bogdan Purcareata,
	Leo Li, stuyoder, linux-arm-kernel



On 11/27/2017 11:08 AM, Greg KH wrote:
> On Mon, Nov 27, 2017 at 11:01:34AM +0200, laurentiu.tudor@nxp.com wrote:
>> From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
>>
>> Fix this warning triggering on a powerpc build:
>> warning: 'error' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>
>> Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
>> ---
>
> You forgot a reported-by line :(
>
> And I beat you by about 30 minutes to this patch, sorry about that.

Sorry, I guess I'm slow on mondays before having my morning coffee. :-(

> Next time always test-build your patches...

I did but it didn't show up on my version of powerpc toolchain (gcc 
4.8.1). Maybe it's too old ...

---
Best Regards, Laurentiu

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

* [PATCH] staging: fsl-mc: fix uninitialized variable use
@ 2017-11-27  9:31     ` Laurentiu Tudor
  0 siblings, 0 replies; 10+ messages in thread
From: Laurentiu Tudor @ 2017-11-27  9:31 UTC (permalink / raw)
  To: linux-arm-kernel



On 11/27/2017 11:08 AM, Greg KH wrote:
> On Mon, Nov 27, 2017 at 11:01:34AM +0200, laurentiu.tudor at nxp.com wrote:
>> From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
>>
>> Fix this warning triggering on a powerpc build:
>> warning: 'error' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>
>> Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
>> ---
>
> You forgot a reported-by line :(
>
> And I beat you by about 30 minutes to this patch, sorry about that.

Sorry, I guess I'm slow on mondays before having my morning coffee. :-(

> Next time always test-build your patches...

I did but it didn't show up on my version of powerpc toolchain (gcc 
4.8.1). Maybe it's too old ...

---
Best Regards, Laurentiu

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

* Re: [PATCH] staging: fsl-mc: fix uninitialized variable use
  2017-11-27  9:31     ` Laurentiu Tudor
@ 2017-11-27  9:44       ` Greg KH
  -1 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2017-11-27  9:44 UTC (permalink / raw)
  To: Laurentiu Tudor
  Cc: Ruxandra Ioana Radulescu, devel, linux-kernel, Bogdan Purcareata,
	Leo Li, stuyoder, linux-arm-kernel

On Mon, Nov 27, 2017 at 09:31:21AM +0000, Laurentiu Tudor wrote:
> 
> 
> On 11/27/2017 11:08 AM, Greg KH wrote:
> > On Mon, Nov 27, 2017 at 11:01:34AM +0200, laurentiu.tudor@nxp.com wrote:
> >> From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
> >>
> >> Fix this warning triggering on a powerpc build:
> >> warning: 'error' may be used uninitialized in this function [-Wmaybe-uninitialized]
> >>
> >> Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
> >> ---
> >
> > You forgot a reported-by line :(
> >
> > And I beat you by about 30 minutes to this patch, sorry about that.
> 
> Sorry, I guess I'm slow on mondays before having my morning coffee. :-(
> 
> > Next time always test-build your patches...
> 
> I did but it didn't show up on my version of powerpc toolchain (gcc 
> 4.8.1). Maybe it's too old ...

Yes, that's really old, please update to something more "modern" :)

thanks,

greg k-h

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

* [PATCH] staging: fsl-mc: fix uninitialized variable use
@ 2017-11-27  9:44       ` Greg KH
  0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2017-11-27  9:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 27, 2017 at 09:31:21AM +0000, Laurentiu Tudor wrote:
> 
> 
> On 11/27/2017 11:08 AM, Greg KH wrote:
> > On Mon, Nov 27, 2017 at 11:01:34AM +0200, laurentiu.tudor at nxp.com wrote:
> >> From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
> >>
> >> Fix this warning triggering on a powerpc build:
> >> warning: 'error' may be used uninitialized in this function [-Wmaybe-uninitialized]
> >>
> >> Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
> >> ---
> >
> > You forgot a reported-by line :(
> >
> > And I beat you by about 30 minutes to this patch, sorry about that.
> 
> Sorry, I guess I'm slow on mondays before having my morning coffee. :-(
> 
> > Next time always test-build your patches...
> 
> I did but it didn't show up on my version of powerpc toolchain (gcc 
> 4.8.1). Maybe it's too old ...

Yes, that's really old, please update to something more "modern" :)

thanks,

greg k-h

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

* Re: [PATCH] staging: fsl-mc: fix uninitialized variable use
  2017-11-27  9:31     ` Laurentiu Tudor
@ 2017-11-28 14:13       ` Dan Carpenter
  -1 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2017-11-28 14:13 UTC (permalink / raw)
  To: Laurentiu Tudor
  Cc: Greg KH, devel, stuyoder, linux-kernel, Leo Li,
	Bogdan Purcareata, linux-arm-kernel

On Mon, Nov 27, 2017 at 09:31:21AM +0000, Laurentiu Tudor wrote:
> I did but it didn't show up on my version of powerpc toolchain (gcc 
> 4.8.1). Maybe it's too old ...
> 

Smatch has new uninitialized variable warnings these days.  In theory,
it should be smarter and more strict than GCC.

regards,
dan carpenter

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

* [PATCH] staging: fsl-mc: fix uninitialized variable use
@ 2017-11-28 14:13       ` Dan Carpenter
  0 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2017-11-28 14:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 27, 2017 at 09:31:21AM +0000, Laurentiu Tudor wrote:
> I did but it didn't show up on my version of powerpc toolchain (gcc 
> 4.8.1). Maybe it's too old ...
> 

Smatch has new uninitialized variable warnings these days.  In theory,
it should be smarter and more strict than GCC.

regards,
dan carpenter

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

end of thread, other threads:[~2017-11-28 14:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-27  9:01 [PATCH] staging: fsl-mc: fix uninitialized variable use laurentiu.tudor
2017-11-27  9:01 ` laurentiu.tudor at nxp.com
2017-11-27  9:08 ` Greg KH
2017-11-27  9:08   ` Greg KH
2017-11-27  9:31   ` Laurentiu Tudor
2017-11-27  9:31     ` Laurentiu Tudor
2017-11-27  9:44     ` Greg KH
2017-11-27  9:44       ` Greg KH
2017-11-28 14:13     ` Dan Carpenter
2017-11-28 14:13       ` Dan Carpenter

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.