Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753562AbcKIUEs (ORCPT ); Wed, 9 Nov 2016 15:04:48 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:59510 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752564AbcKIUEq (ORCPT ); Wed, 9 Nov 2016 15:04:46 -0500 DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 12BA5606CC Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=sboyd@codeaurora.org Date: Wed, 9 Nov 2016 12:04:44 -0800 From: Stephen Boyd To: Arnd Bergmann Cc: Michael Turquette , Robert Jarzmik , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] clk: pxa: fix pxa2xx_determine_rate return Message-ID: <20161109200444.GR16026@codeaurora.org> References: <20161108144950.3472058-1-arnd@arndb.de> <20161108144950.3472058-2-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161108144950.3472058-2-arnd@arndb.de> 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 Content-Length: 900 Lines: 25 On 11/08, Arnd Bergmann wrote: > The new pxa2xx_determine_rate() function seems lacking in a few > regards: > > - For an exact match or no match at all, the rate is uninitialized > as reported by gcc -Wmaybe-unintialized: > drivers/clk/pxa/clk-pxa.c: In function 'pxa2xx_determine_rate': > drivers/clk/pxa/clk-pxa.c:243:5: error: 'rate' may be used uninitialized in this function > > - If we get a non-exact match, the req->rate output is never set > to the actual rate but remains at the requested rate. > > - We should not attempt to print a rate if none could be found > > This rewrites the logic accordingly. > > Fixes: 9fe694295098 ("clk: pxa: transfer CPU clock setting from pxa2xx-cpufreq") > Signed-off-by: Arnd Bergmann > --- Applied to clk-next -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project