lkml.org 
[lkml]   [2018]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/2] pwm: stm32: initialize raw local variables
    Date
    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>
    ---
    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);
    --
    1.9.1
    \
     
     \ /
      Last update: 2018-05-18 17:26    [W:2.807 / U:0.136 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site