From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754855AbcBBMuv (ORCPT ); Tue, 2 Feb 2016 07:50:51 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:52011 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753764AbcBBMut convert rfc822-to-8bit (ORCPT ); Tue, 2 Feb 2016 07:50:49 -0500 From: Arnd Bergmann To: Stephen Boyd Cc: Michael Turquette , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Andrzej Hajda , linux-arm-kernel@lists.infradead.org, Tony Prisk , Roman Volkov Subject: Re: [PATCH] clk: vt8500: don't return possibly uninitialized data Date: Tue, 02 Feb 2016 13:49:56 +0100 Message-ID: <2210116.QsPesySkh0@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20160202011545.GG4848@codeaurora.org> References: <4790407.6zgSQCdsSB@wuerfel> <20160202011545.GG4848@codeaurora.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="utf-8" X-Provags-ID: V03:K0:dR9uipP0GEtEhBRK0LjbUAeEnyEtiHHlMSgHz+SI5oBNdhwtT1F 0uzen1hod9y8E68dd37WcywhyZbmRoX0Wunq+DBwGziJWQ/vWyvujDomtXc1lI40oO7LvpM JdUCufZmmN9teZZEfeBsYGz3w3oEyEloE8ga/zhvrfFSE02VOcxqjKg6iZBTHQPQbTsuoEU Lybg0pEGfPdzB4pWUobFQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:zu2acrX9QJI=:HZqWI4UKRHWAnfFKqW5+H2 U63ckCn07G4aFKPaqlCs3iJea5646KquP+qaI1uT/dV0wCKWO/S+T7Zd1dm14PPsTbhVubUmf DtQMZz7rV1M5zJ5+5Nwo2hdT/c9mzGok6nRa+SdGAw4CoUCt3Jm76LJm6EBbvqYzg/h1YfhCI MzaES04vctvjZJjT6ZftR7uYhmSvAWfRPMqQ7WiNxMQ3gYYe0mB5Rezgzp8hbEmlDpayMq16W 95sGIS6fWD3Tb4GF0kj8HB3dlHMYnQ/3pMndsoZBNs1ieQA2gBmwW1MTMKXx72WeJr5TQA6eW MFJm88N6fMOLNlXp/rbtNcwY6B2V+4u2CLa2pUAfUKsR8G52fg2pc0LnVk6SMD4JheA3UKJgj A+1reAxxR/4eMpmrpiNxUNeYBJ6xvfG/ftYCDGgSSXH5l63GD314ELK9uvKx0Hx7owmRx/Pxd BZ9ZYAVQWA0vY8tOMCpFXWY+IRCwkmEZYmdmWmnr2NYtzLif/kSv1d4kJYj8b9/jchvHImeSa df4bCVaDG6nfAcrVmZ33h5A1LKbs4xUfI+gQ16IDXQ3nhmkOtCZ/0v/Qhv7r1XMeoQhlHpm+q osESQFU251eYHZXoYCPuqLcGDv3ZXW+vdYcLNMGA+7OKAo7jDJVZYRYctbr83FJrtLfFSoFQ4 YTO8UYjUJ1I7Gz/+XT20hOh3/0u+sEqvC5/DouLkhwRIoWfVbUNacbngJ5rAh8i1WWfz5Lq27 V/+gEqYnmt5TEIxk Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 01 February 2016 17:15:45 Stephen Boyd wrote: > My compiler still gets warnings even after this patch is applied. > > drivers/clk/clk-vt8500.c: In function ‘wm8750_find_pll_bits’: > drivers/clk/clk-vt8500.c:509:12: warning: ‘best_div2’ may be used uninitialized in this function [-Wmaybe-uninitialized] > drivers/clk/clk-vt8500.c:508:12: warning: ‘best_div1’ may be used uninitialized in this function [-Wmaybe-uninitialized] > drivers/clk/clk-vt8500.c:507:14: warning: ‘best_mul’ may be used uninitialized in this function [-Wmaybe-uninitialized] > drivers/clk/clk-vt8500.c: In function ‘wm8650_find_pll_bits’: > drivers/clk/clk-vt8500.c:430:12: warning: ‘best_div2’ may be used uninitialized in this function [-Wmaybe-uninitialized] > drivers/clk/clk-vt8500.c:429:12: warning: ‘best_div1’ may be used uninitialized in this function [-Wmaybe-uninitialized] > drivers/clk/clk-vt8500.c:428:14: warning: ‘best_mul’ may be used uninitialized in this function [-Wmaybe-uninitialized] > drivers/clk/clk-vt8500.c: In function ‘wm8850_find_pll_bits’: > drivers/clk/clk-vt8500.c:560:12: warning: ‘best_div2’ may be used uninitialized in this function [-Wmaybe-uninitialized] > drivers/clk/clk-vt8500.c:559:12: warning: ‘best_div1’ may be used uninitialized in this function [-Wmaybe-uninitialized] > drivers/clk/clk-vt8500.c:558:14: warning: ‘best_mul’ may be used uninitialized in this function [-Wmaybe-uninitialized] > I see what you mean now. I checked different gcc versions, and with my patch I get the warnings for 4.6 through 4.9, but not for 5.x. In general, I tried to only address warnings I still see with newer gcc version, as they are better about false positives. Do you think it's ok to take the patch as is then? Otherwise we probably have to add fake initializations which would shut up the warnings but not help with the code quality. Arnd