lkml.org 
[lkml]   [2014]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pwm: Fix uninitialized warnings in pwm_get()
On Thu, Aug 28, 2014 at 11:03:14AM +0200, Geert Uytterhoeven wrote:
> With some versions of gcc (e.g. 4.1.2):
>
> drivers/pwm/core.c: In function ‘pwm_get’:
> drivers/pwm/core.c:610: warning: ‘polarity’ may be used uninitialized in this function
> drivers/pwm/core.c:609: warning: ‘period’ may be used uninitialized in this function
>
> While these are false positives, we can get rid of them by refactoring
> the code to store a pointer to the best match, as suggested before by
> Thierry Reding. This does require moving the mutex_unlock() down.
>
> Fixes: d717ea73e36dd565 ("pwm: Fix period and polarity in pwm_get() for non-perfect matches")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> drivers/pwm/core.c | 29 ++++++++++++++---------------
> 1 file changed, 14 insertions(+), 15 deletions(-)

Applied, thanks.

Thierry
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-08-29 10:41    [W:0.028 / U:1.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site