linux-pwm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pwm: Fix uninitialized warnings in pwm_get()
Date: Fri, 29 Aug 2014 10:24:31 +0200	[thread overview]
Message-ID: <20140829082430.GC13371@ulmo> (raw)
In-Reply-To: <1409216594-31389-1-git-send-email-geert+renesas@glider.be>

[-- Attachment #1: Type: text/plain, Size: 886 bytes --]

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2014-08-29  8:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-28  9:03 [PATCH] pwm: Fix uninitialized warnings in pwm_get() Geert Uytterhoeven
2014-08-29  8:24 ` Thierry Reding [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140829082430.GC13371@ulmo \
    --to=thierry.reding@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).