LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Fabrice Gasnier <fabrice.gasnier@st.com>,
	lee.jones@linaro.org, thierry.reding@gmail.com
Cc: sfr@canb.auug.org.au, gerald.baeza@st.com,
	alexandre.torgue@st.com, mcoquelin.stm32@gmail.com,
	linux-next@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org
Subject: Re: [PATCH 2/2] pwm: stm32: initialize raw local variables
Date: Fri, 18 May 2018 09:56:18 -0700	[thread overview]
Message-ID: <53e327ba-10c0-618c-edf4-1e1b528527c7@infradead.org> (raw)
In-Reply-To: <1526657044-14879-3-git-send-email-fabrice.gasnier@st.com>

On 05/18/2018 08:24 AM, Fabrice Gasnier wrote:
> This removes build warning when COMPILE_TEST=y and MFD_STM32_TIMERS=n
> in drivers/pwm/pwm-stm32.c. In function 'stm32_pwm_capture' 'raw_prd' and
> 'raw_dty' may be used uninitialized in this function
> [-Wmaybe-uninitialized]
> 
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>

Tested-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
>  drivers/pwm/pwm-stm32.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c
> index 60bfc07..09383c6 100644
> --- a/drivers/pwm/pwm-stm32.c
> +++ b/drivers/pwm/pwm-stm32.c
> @@ -170,7 +170,7 @@ static int stm32_pwm_capture(struct pwm_chip *chip, struct pwm_device *pwm,
>  	unsigned long long prd, div, dty;
>  	unsigned long rate;
>  	unsigned int psc = 0, icpsc, scale;
> -	u32 raw_prd, raw_dty;
> +	u32 raw_prd = 0, raw_dty = 0;
>  	int ret = 0;
>  
>  	mutex_lock(&priv->lock);
> 


-- 
~Randy

  reply	other threads:[~2018-05-18 16:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-18 15:24 [PATCH 0/2] Fix STM32 PWM capture build with COMPILE_TEST Fabrice Gasnier
2018-05-18 15:24 ` [PATCH 1/2] mfd: stm32-timers: fix pwm-stm32 linker issue " Fabrice Gasnier
2018-05-18 16:56   ` Randy Dunlap
2018-06-04  6:13   ` Lee Jones
2018-05-18 15:24 ` [PATCH 2/2] pwm: stm32: initialize raw local variables Fabrice Gasnier
2018-05-18 16:56   ` Randy Dunlap [this message]
2018-05-18 22:05   ` Thierry Reding
2018-06-04  6:12   ` Lee Jones

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=53e327ba-10c0-618c-edf4-1e1b528527c7@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=alexandre.torgue@st.com \
    --cc=fabrice.gasnier@st.com \
    --cc=gerald.baeza@st.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=sfr@canb.auug.org.au \
    --cc=thierry.reding@gmail.com \
    --subject='Re: [PATCH 2/2] pwm: stm32: initialize raw local variables' \
    /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

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).