From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753580AbcHPNNU (ORCPT ); Tue, 16 Aug 2016 09:13:20 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:37255 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753431AbcHPNLN (ORCPT ); Tue, 16 Aug 2016 09:11:13 -0400 Subject: Re: [PATCH 6/9] clocksource: kona: fix get_counter error handling To: Arnd Bergmann , Thomas Gleixner References: <20160810215424.1926658-1-arnd@arndb.de> <20160810215424.1926658-7-arnd@arndb.de> Cc: Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org From: Daniel Lezcano Message-ID: <57B310ED.4040705@linaro.org> Date: Tue, 16 Aug 2016 15:11:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160810215424.1926658-7-arnd@arndb.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/10/2016 11:54 PM, Arnd Bergmann wrote: > I could not figure out why, but gcc cannot prove that the > kona_timer_init function always initializes its two outputs, > and we get a warning for the use of the 'lsw' variable later, > which is obviously correct. > > drivers/clocksource/bcm_kona_timer.c: In function 'kona_timer_init': > drivers/clocksource/bcm_kona_timer.c:119:13: error: 'lsw' may be used uninitialized in this function [-Werror=maybe-uninitialized] > > Slightly reordering the loop makes the warning disappear, after > it becomes more obvious to the compiler that the loop is > always entered on the first iteration. > > As pointed out by Ray Jui, there is a related problem in the > way we deal with the loop running into the limit, as we just > keep going there with an invalid counter data, so instead we > now propagate a -ETIMEDOUT result to the caller. > > Signed-off-by: Arnd Bergmann > Link: https://patchwork.kernel.org/patch/9174261/ Hi Arnd, I applied this patch as a fix. Thanks ! -- Daniel -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog