All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dirk Behme <dirk.behme@de.bosch.com>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>
Subject: Re: [PATCH] serial: imx: fix uninitialized variable warning
Date: Mon, 18 Feb 2013 08:53:43 +0100	[thread overview]
Message-ID: <5121DE07.8060908@de.bosch.com> (raw)
In-Reply-To: <1361164536-1351-1-git-send-email-shawn.guo@linaro.org>

On 18.02.2013 06:15, Shawn Guo wrote:
> Commit 677fe55 (serial: imx: Fix recursive locking bug) introduces an
> uninitialized variable warning as below.
> 
>   CC      drivers/tty/serial/imx.o
> drivers/tty/serial/imx.c: In function ‘imx_console_write’:
> include/linux/spinlock.h:340:2: warning: ‘flags’ may be used uninitialized in this function [-Wuninitialized]
> drivers/tty/serial/imx.c:1214:16: note: ‘flags’ was declared here
> 
> Initialize the variable to suppress the warning.
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>

Acked-by: Dirk Behme <dirk.behme@de.bosch.com>

Thanks

Dirk

> ---
>  drivers/tty/serial/imx.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> index adf7611..147c9e1 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -1211,7 +1211,7 @@ imx_console_write(struct console *co, const char *s, unsigned int count)
>  	struct imx_port *sport = imx_ports[co->index];
>  	struct imx_port_ucrs old_ucr;
>  	unsigned int ucr1;
> -	unsigned long flags;
> +	unsigned long flags = 0;
>  	int locked = 1;
>  
>  	if (sport->port.sysrq)


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: dirk.behme@de.bosch.com (Dirk Behme)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] serial: imx: fix uninitialized variable warning
Date: Mon, 18 Feb 2013 08:53:43 +0100	[thread overview]
Message-ID: <5121DE07.8060908@de.bosch.com> (raw)
In-Reply-To: <1361164536-1351-1-git-send-email-shawn.guo@linaro.org>

On 18.02.2013 06:15, Shawn Guo wrote:
> Commit 677fe55 (serial: imx: Fix recursive locking bug) introduces an
> uninitialized variable warning as below.
> 
>   CC      drivers/tty/serial/imx.o
> drivers/tty/serial/imx.c: In function ?imx_console_write?:
> include/linux/spinlock.h:340:2: warning: ?flags? may be used uninitialized in this function [-Wuninitialized]
> drivers/tty/serial/imx.c:1214:16: note: ?flags? was declared here
> 
> Initialize the variable to suppress the warning.
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>

Acked-by: Dirk Behme <dirk.behme@de.bosch.com>

Thanks

Dirk

> ---
>  drivers/tty/serial/imx.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> index adf7611..147c9e1 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -1211,7 +1211,7 @@ imx_console_write(struct console *co, const char *s, unsigned int count)
>  	struct imx_port *sport = imx_ports[co->index];
>  	struct imx_port_ucrs old_ucr;
>  	unsigned int ucr1;
> -	unsigned long flags;
> +	unsigned long flags = 0;
>  	int locked = 1;
>  
>  	if (sport->port.sysrq)

  reply	other threads:[~2013-02-18  7:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-18  5:15 [PATCH] serial: imx: fix uninitialized variable warning Shawn Guo
2013-02-18  5:15 ` Shawn Guo
2013-02-18  7:53 ` Dirk Behme [this message]
2013-02-18  7:53   ` Dirk Behme

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5121DE07.8060908@de.bosch.com \
    --to=dirk.behme@de.bosch.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=shawn.guo@linaro.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.