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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1783360.Wg7bKzXGUa@aspire.rjw.lan>
Date:   Fri, 06 Jan 2017 02:28:42 +0100
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     Augusto Mecking Caringi <augustocaringi@...il.com>
Cc:     torvalds@...ux-foundation.org, Kevin Hilman <khilman@...nel.org>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] PM / domains: Fix 'may be used uninitialized' build warning

On Friday, December 30, 2016 11:34:08 AM Augusto Mecking Caringi wrote:
> This patch fixes the following gcc warning:
> 
> drivers/base/power/domain.c: In function ‘genpd_runtime_resume’:
> drivers/base/power/domain.c:642:14: warning: ‘time_start’ may be used
> uninitialized in this function [-Wmaybe-uninitialized]
>    elapsed_ns = ktime_to_ns(ktime_sub(ktime_get(), time_start)
> 
> The same problem (in another function in this same file) was fixed in
> commit d33d5a6c88fc (avoid spurious "may be used uninitialized" warning)
> 
> Signed-off-by: Augusto Mecking Caringi <augustocaringi@...il.com>
> ---
>  drivers/base/power/domain.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> index a5e1262..2997026 100644
> --- a/drivers/base/power/domain.c
> +++ b/drivers/base/power/domain.c
> @@ -626,6 +626,7 @@ static int genpd_runtime_resume(struct device *dev)
>  
>   out:
>  	/* Measure resume latency. */
> +	time_start = 0;
>  	if (timed && runtime_pm)
>  		time_start = ktime_get();

Applied.

Thanks,
Rafael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ