[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140829082430.GC13371@ulmo>
Date: Fri, 29 Aug 2014 10:24:31 +0200
From: Thierry Reding <thierry.reding@...il.com>
To: Geert Uytterhoeven <geert+renesas@...der.be>
Cc: linux-pwm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [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@...der.be>
> ---
> drivers/pwm/core.c | 29 ++++++++++++++---------------
> 1 file changed, 14 insertions(+), 15 deletions(-)
Applied, thanks.
Thierry
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists