linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: st: avoid uninitialized variable use
Date: Fri, 20 Nov 2015 10:59:32 -0800	[thread overview]
Message-ID: <20151120185932.GW32672@codeaurora.org> (raw)
In-Reply-To: <3719029.IbREgssWiU@wuerfel>

On 11/12, Arnd Bergmann wrote:
> quadfs_pll_fs660c32_round_rate prints a few structure members
> that are never initialized, and also doesn't print the only one
> it cares about. We get a gcc warning about the ones that
> are printed:
> 
> clk/st/clkgen-fsyn.c:560:93: warning: 'params.sdiv' may be used uninitialized in this function
> clk/st/clkgen-fsyn.c:560:93: warning: 'params.mdiv' may be used uninitialized in this function
> clk/st/clkgen-fsyn.c:560:93: warning: 'params.pe' may be used uninitialized in this function
> clk/st/clkgen-fsyn.c:560:93: warning: 'params.nsdiv' may be used uninitialized in this function
> 
> This changes the code to no longer print uninitialized data, and
> for good measure it also prints the ndiv member that is being
> set.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 5f7aa9071e93 ("clk: st: Support for QUADFS inside ClockGenB/C/D/E/F")
> 
> diff --git a/drivers/clk/st/clkgen-fsyn.c b/drivers/clk/st/clkgen-fsyn.c
> index 576cd0354d48..ccb324d97160 100644
> --- a/drivers/clk/st/clkgen-fsyn.c

Applied to clk-next

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  parent reply	other threads:[~2015-11-20 18:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-12 14:24 [PATCH] clk: st: avoid uninitialized variable use Arnd Bergmann
2015-11-16  8:27 ` Gabriel Fernandez
2015-11-20 18:59 ` Stephen Boyd [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-01-25 15:54 Arnd Bergmann
2016-01-30  1:20 ` Stephen Boyd

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=20151120185932.GW32672@codeaurora.org \
    --to=sboyd@codeaurora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).