public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] serial: ifx6x60: add missing variable initialization
@ 2013-02-27  5:03 Jingoo Han
  2013-02-27  9:53 ` Jiri Slaby
  0 siblings, 1 reply; 3+ messages in thread
From: Jingoo Han @ 2013-02-27  5:03 UTC (permalink / raw)
  To: 'Greg Kroah-Hartman'
  Cc: 'Jiri Slaby', linux-serial, 'Chen Jun',
	'Jingoo Han'

Fixed build warning as below:

drivers/tty/serial/ifx6x60.c:753:8: warning: 'more' may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/tty/serial/ifx6x60.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c
index 68d7ce9..3d78baf 100644
--- a/drivers/tty/serial/ifx6x60.c
+++ b/drivers/tty/serial/ifx6x60.c
@@ -687,7 +687,7 @@ static void ifx_spi_complete(void *ctx)
 	struct tty_ldisc *ldisc = NULL;
 	int length;
 	int actual_length;
-	unsigned char more;
+	unsigned char more = 0;
 	unsigned char cts;
 	int local_write_pending = 0;
 	int queue_length;
-- 
1.7.2.5



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

* Re: [PATCH] serial: ifx6x60: add missing variable initialization
  2013-02-27  5:03 [PATCH] serial: ifx6x60: add missing variable initialization Jingoo Han
@ 2013-02-27  9:53 ` Jiri Slaby
  2013-02-27 10:20   ` Jingoo Han
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Slaby @ 2013-02-27  9:53 UTC (permalink / raw)
  To: Jingoo Han, 'Greg Kroah-Hartman'; +Cc: linux-serial, 'Chen Jun'

On 02/27/2013 06:03 AM, Jingoo Han wrote:
> Fixed build warning as below:
> 
> drivers/tty/serial/ifx6x60.c:753:8: warning: 'more' may be used uninitialized in this function [-Wuninitialized]

This needs some more investigation and explanation than that. Are you
fixing a real compiler warning or hiding a bug here?

> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
>  drivers/tty/serial/ifx6x60.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c
> index 68d7ce9..3d78baf 100644
> --- a/drivers/tty/serial/ifx6x60.c
> +++ b/drivers/tty/serial/ifx6x60.c
> @@ -687,7 +687,7 @@ static void ifx_spi_complete(void *ctx)
>  	struct tty_ldisc *ldisc = NULL;
>  	int length;
>  	int actual_length;
> -	unsigned char more;
> +	unsigned char more = 0;
>  	unsigned char cts;
>  	int local_write_pending = 0;
>  	int queue_length;
> 


-- 
js
suse labs

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

* Re: [PATCH] serial: ifx6x60: add missing variable initialization
  2013-02-27  9:53 ` Jiri Slaby
@ 2013-02-27 10:20   ` Jingoo Han
  0 siblings, 0 replies; 3+ messages in thread
From: Jingoo Han @ 2013-02-27 10:20 UTC (permalink / raw)
  To: 'Jiri Slaby', 'Greg Kroah-Hartman'
  Cc: linux-serial, 'Chen Jun'

On Wednesday, February 27, 2013 6:53 PM, Jiri Slaby wrote:
> 
> On 02/27/2013 06:03 AM, Jingoo Han wrote:
> > Fixed build warning as below:
> >
> > drivers/tty/serial/ifx6x60.c:753:8: warning: 'more' may be used uninitialized in this function [-
> Wuninitialized]
> 
> This needs some more investigation and explanation than that. Are you
> fixing a real compiler warning or hiding a bug here?

Sorry, I don't have the deep knowledge about ifx6x60.
I just want to remove build warning.

Maybe, Chen Jun or other guy will resolve this warning properly.

Please, abandon this patch.

> 
> > Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> > ---
> >  drivers/tty/serial/ifx6x60.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c
> > index 68d7ce9..3d78baf 100644
> > --- a/drivers/tty/serial/ifx6x60.c
> > +++ b/drivers/tty/serial/ifx6x60.c
> > @@ -687,7 +687,7 @@ static void ifx_spi_complete(void *ctx)
> >  	struct tty_ldisc *ldisc = NULL;
> >  	int length;
> >  	int actual_length;
> > -	unsigned char more;
> > +	unsigned char more = 0;
> >  	unsigned char cts;
> >  	int local_write_pending = 0;
> >  	int queue_length;
> >
> 
> 
> --
> js
> suse labs


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

end of thread, other threads:[~2013-02-27 10:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-27  5:03 [PATCH] serial: ifx6x60: add missing variable initialization Jingoo Han
2013-02-27  9:53 ` Jiri Slaby
2013-02-27 10:20   ` Jingoo Han

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