Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1548561
| From | Augusto Mecking Caringi <augustocaringi@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] PM / domains: Fix 'may be used uninitialized' build warning |
| Date | 2016-12-30 12:40 +0100 |
| Message-ID | <sU3Hs-3Ks-37@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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(); -- 2.7.4
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] PM / domains: Fix 'may be used uninitialized' build warning Augusto Mecking Caringi <augustocaringi@gmail.com> - 2016-12-30 12:40 +0100
csiph-web