[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <57B310ED.4040705@linaro.org>
Date: Tue, 16 Aug 2016 15:11:09 +0200
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: Arnd Bergmann <arnd@...db.de>, Thomas Gleixner <tglx@...utronix.de>
Cc: Florian Fainelli <f.fainelli@...il.com>,
Ray Jui <rjui@...adcom.com>,
Scott Branden <sbranden@...adcom.com>,
bcm-kernel-feedback-list@...adcom.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/9] clocksource: kona: fix get_counter error handling
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 <arnd@...db.de>
> Link: https://patchwork.kernel.org/patch/9174261/
Hi Arnd,
I applied this patch as a fix.
Thanks !
-- Daniel
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Powered by blists - more mailing lists