lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 20 Mar 2020 03:45:35 -0700
From:   Joe Perches <joe@...ches.com>
To:     Guru Das Srinagesh <gurus@...eaurora.org>,
        linux-pwm@...r.kernel.org
Cc:     Thierry Reding <thierry.reding@...il.com>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>,
        Subbaraman Narayanamurthy <subbaram@...eaurora.org>,
        linux-kernel@...r.kernel.org,
        Fabrice Gasnier <fabrice.gasnier@...com>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Alexandre Torgue <alexandre.torgue@...com>
Subject: Re: [PATCH v11 08/12] pwm: stm32-lp: Use %llu format specifier for
 period

On Thu, 2020-03-19 at 18:41 -0700, Guru Das Srinagesh wrote:
> Since the PWM framework is switching struct pwm_args.period's
> datatype to u64, prepare for this transition by using the right
> specifier for printing a 64-bit value.
[]
> diff --git a/drivers/pwm/pwm-stm32-lp.c b/drivers/pwm/pwm-stm32-lp.c
[]
> @@ -61,7 +61,7 @@ static int stm32_pwm_lp_apply(struct pwm_chip *chip, struct pwm_device *pwm,
>  	do_div(div, NSEC_PER_SEC);
>  	if (!div) {
>  		/* Clock is too slow to achieve requested period. */
> -		dev_dbg(priv->chip.dev, "Can't reach %u ns\n",	state->period);
> +		dev_dbg(priv->chip.dev, "Can't reach %llu ns\n", state->period);
>  		return -EINVAL;
>  	}

Doesn't this introduce a warning now without the
actual change to the type of state->period?

Likely these patches should either not be separated
or this should also use a cast to avoid introducing
intermediate compilation warnings.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ