lkml.org 
[lkml]   [2016]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 6/9] clocksource: kona: fix get_counter error handling
From
Date
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@arndb.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

\
 
 \ /
  Last update: 2016-09-17 09:57    [W:0.153 / U:1.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site