From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] serial: sh-sci: Initialise variables before access in sci_set_termios()
Date: Mon, 24 Jun 2013 23:34:55 +0000 [thread overview]
Message-ID: <20130624233455.GA25628@kroah.com> (raw)
In-Reply-To: <1371731102-5125-1-git-send-email-horms+renesas@verge.net.au>
On Thu, Jun 20, 2013 at 09:25:02PM +0900, Simon Horman wrote:
> This change addresses two warnings that are flagged by gcc relating to
> potential access to the ssr and cks variables while they are uninitialised.
>
> I have addressed this by initialising the values to
> the defaults present in sci_baud_calc_hscif().
>
> It is my analysis that cks is always initialised if used
> but that without this change ssr may be accessed while uninitialised.
>
> The code altered by this patch was introduced by commit
> f303b364b41d3fc5bf879799128958400b7859aa ("serial: sh-sci: HSCIF support").
>
> Reported-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Simon Horman <horms+renesas@verge.net.au>
Cc: linux-sh@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
Jiri Slaby <jslaby@suse.cz>,
Ulrich Hecht <ulrich.hecht@gmail.com>,
Magnus Damm <magnus.damm@gmail.com>,
Paul Mundt <lethal@linux-sh.org>, Olof Johansson <olof@lixom.net>,
linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] serial: sh-sci: Initialise variables before access in sci_set_termios()
Date: Mon, 24 Jun 2013 16:34:55 -0700 [thread overview]
Message-ID: <20130624233455.GA25628@kroah.com> (raw)
In-Reply-To: <1371731102-5125-1-git-send-email-horms+renesas@verge.net.au>
On Thu, Jun 20, 2013 at 09:25:02PM +0900, Simon Horman wrote:
> This change addresses two warnings that are flagged by gcc relating to
> potential access to the ssr and cks variables while they are uninitialised.
>
> I have addressed this by initialising the values to
> the defaults present in sci_baud_calc_hscif().
>
> It is my analysis that cks is always initialised if used
> but that without this change ssr may be accessed while uninitialised.
>
> The code altered by this patch was introduced by commit
> f303b364b41d3fc5bf879799128958400b7859aa ("serial: sh-sci: HSCIF support").
>
> Reported-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
WARNING: multiple messages have this Message-ID (diff)
From: gregkh@linuxfoundation.org (Greg Kroah-Hartman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] serial: sh-sci: Initialise variables before access in sci_set_termios()
Date: Mon, 24 Jun 2013 16:34:55 -0700 [thread overview]
Message-ID: <20130624233455.GA25628@kroah.com> (raw)
In-Reply-To: <1371731102-5125-1-git-send-email-horms+renesas@verge.net.au>
On Thu, Jun 20, 2013 at 09:25:02PM +0900, Simon Horman wrote:
> This change addresses two warnings that are flagged by gcc relating to
> potential access to the ssr and cks variables while they are uninitialised.
>
> I have addressed this by initialising the values to
> the defaults present in sci_baud_calc_hscif().
>
> It is my analysis that cks is always initialised if used
> but that without this change ssr may be accessed while uninitialised.
>
> The code altered by this patch was introduced by commit
> f303b364b41d3fc5bf879799128958400b7859aa ("serial: sh-sci: HSCIF support").
>
> Reported-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
next prev parent reply other threads:[~2013-06-24 23:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-20 12:25 [PATCH] serial: sh-sci: Initialise variables before access in sci_set_termios() Simon Horman
2013-06-20 12:25 ` Simon Horman
2013-06-20 12:25 ` Simon Horman
2013-06-24 23:34 ` Greg Kroah-Hartman [this message]
2013-06-24 23:34 ` Greg Kroah-Hartman
2013-06-24 23:34 ` Greg Kroah-Hartman
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=20130624233455.GA25628@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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.