Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S943923AbdDTJG7 (ORCPT ); Thu, 20 Apr 2017 05:06:59 -0400 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:36339 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S943670AbdDTJG4 (ORCPT ); Thu, 20 Apr 2017 05:06:56 -0400 Authentication-Results: ppops.net; spf=none smtp.mailfrom=ckeepax@opensource.wolfsonmicro.com Date: Thu, 20 Apr 2017 10:07:34 +0100 From: Charles Keepax To: Arnd Bergmann CC: Liam Girdwood , Mark Brown , Daniel Baluta , , , Subject: Re: [PATCH] ASoC: codec: wm9860: avoid maybe-uninitialized warning Message-ID: <20170420090734.GA1594@localhost.localdomain> References: <20170419170449.2965453-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20170419170449.2965453-1-arnd@arndb.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1704200073 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1008 Lines: 22 On Wed, Apr 19, 2017 at 07:04:20PM +0200, Arnd Bergmann wrote: > The new PLL configuration code triggers a harmless warning: > > sound/soc/codecs/wm8960.c: In function 'wm8960_configure_clocking': > sound/soc/codecs/wm8960.c:735:3: error: 'best_freq_out' may be used uninitialized in this function [-Werror=maybe-uninitialized] > wm8960_set_pll(codec, freq_in, best_freq_out); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > sound/soc/codecs/wm8960.c:699:12: note: 'best_freq_out' was declared here > > I think the warning was introduced by Daniel's bugfix. I've come up > with a way to simplify the code in a way that is more readable to > both humans and to gcc, which gets us rid of the warning. > > Fixes: 84fdc00d519f ("ASoC: codec: wm9860: Refactor PLL out freq search") > Fixes: 303e8954af8d ("ASoC: codec: wm8960: Stop when a matching PLL freq is found") > Signed-off-by: Arnd Bergmann > --- Acked-by: Charles Keepax Thanks, Charles