From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1163198AbbKTS7g (ORCPT ); Fri, 20 Nov 2015 13:59:36 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:37829 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162214AbbKTS7e (ORCPT ); Fri, 20 Nov 2015 13:59:34 -0500 Date: Fri, 20 Nov 2015 10:59:32 -0800 From: Stephen Boyd To: Arnd Bergmann Cc: Michael Turquette , Gabriel Fernandez , Pankaj Dev , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@stlinux.com, Maxime Coquelin , Srinivas Kandagatla , Patrice Chotard Subject: Re: [PATCH] clk: st: avoid uninitialized variable use Message-ID: <20151120185932.GW32672@codeaurora.org> References: <3719029.IbREgssWiU@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3719029.IbREgssWiU@wuerfel> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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