mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Augusto Mecking Caringi <augustocaringi@gmail.com>
Cc: torvalds@linux-foundation.org, Kevin Hilman <khilman@kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PM / domains: Fix 'may be used uninitialized' build warning
Date: Fri, 06 Jan 2017 02:28:42 +0100	[thread overview]
Message-ID: <1783360.Wg7bKzXGUa@aspire.rjw.lan> (raw)
In-Reply-To: <1483097651-7172-1-git-send-email-augustocaringi@gmail.com>

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@gmail.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

      reply	other threads:[~2017-01-06  1:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-30 11:34 Augusto Mecking Caringi
2017-01-06  1:28 ` Rafael J. Wysocki [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=1783360.Wg7bKzXGUa@aspire.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=augustocaringi@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=khilman@kernel.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=torvalds@linux-foundation.org \
    --cc=ulf.hansson@linaro.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

all inboxes | Powered by JetHome®