From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753446AbcLLIFj (ORCPT ); Mon, 12 Dec 2016 03:05:39 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:54221 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751266AbcLLIFh (ORCPT ); Mon, 12 Dec 2016 03:05:37 -0500 Date: Mon, 12 Dec 2016 09:05:21 +0100 From: Boris Brezillon To: Stephen Rothwell Cc: Mike Turquette , Stephen Boyd , linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Eric Anholt Subject: Re: linux-next: build warning after merge of the clk tree Message-ID: <20161212090521.0450504e@bbrezillon> In-Reply-To: <20161212083944.5b6f2b54@canb.auug.org.au> References: <20161212083944.5b6f2b54@canb.auug.org.au> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +Eric Hi Stephen, On Mon, 12 Dec 2016 08:39:44 +1100 Stephen Rothwell wrote: > Hi all, > > After merging the clk tree, today's linux-next build (arm > multi_v7_defconfig) produced this warning: > > drivers/clk/bcm/clk-bcm2835.c: In function 'bcm2835_clock_determine_rate': > drivers/clk/bcm/clk-bcm2835.c:1069:18: warning: 'best_rate' may be used uninitialized in this function [-Wmaybe-uninitialized] > *prate = curdiv * best_rate; > ^ > drivers/clk/bcm/clk-bcm2835.c:1032:16: note: 'best_rate' was declared here > unsigned long best_rate; > ^ > > Introduced by commit > > 155e8b3b0ee3 ("clk: bcm: Support rate change propagation on bcm2835 clocks") > Thanks for the report (I just sent a patch fixing this warning). May I ask which toolchain you're using, because my gcc failed to detect this uninitialized variable (and this is not the first time I have this problem). Regards, Boris