From patchwork Fri Dec 30 11:34:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Augusto Mecking Caringi X-Patchwork-Id: 9492037 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5B3C860838 for ; Fri, 30 Dec 2016 11:35:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 535931FF15 for ; Fri, 30 Dec 2016 11:35:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 465B620649; Fri, 30 Dec 2016 11:35:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5A131FF8F for ; Fri, 30 Dec 2016 11:35:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753913AbcL3LfA (ORCPT ); Fri, 30 Dec 2016 06:35:00 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35931 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753820AbcL3Le6 (ORCPT ); Fri, 30 Dec 2016 06:34:58 -0500 Received: by mail-wm0-f68.google.com with SMTP id m203so70478051wma.3; Fri, 30 Dec 2016 03:34:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZxmzpCkXRoxPoHjmuNRgySCWaCXPWSBJ9xWzM0OHmsc=; b=QhY+TIr+F6wOnuaAljfEN3ZNm0sUlAJwtyAyHfCqoCWIzXJ2Nt0b9VxUUxuyP7m1HQ xJNM4qgqgPyrZjX5v6SVj7hahjvesozR0nZu0gXec/wwHZRqpaJzrEfbeUcvLeBpZ/Rz S1beQdkJ1j5RgBTlMNMNqmylUX6xLV9Zvo9IFST4OSNy7xnRXrF5EiMoZ6XUSS+pfgSu /iQLNCd5QAoBOFphWzxsEnC0BVhQ+sZGCjmWxd6iN33O0WCsJs6dZpfQZUDx/iD8/Qpo QRCelvmRr5dpNDYhbr0Jlw4eEZpBf8oWmeAtCt/ppkwYvacJOYU/zXmJyNzXJGNo5rss zmFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZxmzpCkXRoxPoHjmuNRgySCWaCXPWSBJ9xWzM0OHmsc=; b=XgC4lYRxh5E63sshNGfzi4V1Ueu95qaR8jgcU0N523/dC7rNZLS71UiQ498BzA8dbk 7Ke/gUnB4e4S6v+2ZOqAt77mgvkXZc2fu5wRcoYW/5T5XliZPuVhw9Fmuqw73moqbU0y eZKMuGZFIu/3ihHzRrLACAX9t64y0uNH/neEZBBVYmkoegYpwh2Wg1gJ8x7qGF3GPJFE 1xFiXXoBgUqhD54SkqaN3WSzbqAYisW9Jn2udaDagr2GwdI/mOz4wo1fYF261N/MWlNR gJDM6kGnr4oW4iowjtXPm8GSc2YT9K2PARBfuuP8I2iHEynmXT+l8is/aL5OrY2hrPWR 4zIA== X-Gm-Message-State: AIkVDXLGrY8MVtk519lXKaVZrnEzrW4t+cPOdCqvCC+/mpHCPZFSaeRL2Pf3Q+VRhdMLYw== X-Received: by 10.28.209.7 with SMTP id i7mr44423005wmg.62.1483097696447; Fri, 30 Dec 2016 03:34:56 -0800 (PST) Received: from acaringi.internal.hq.grupopie.com (bl22-56-149.dsl.telepac.pt. [2.83.56.149]) by smtp.googlemail.com with ESMTPSA id t194sm51041041wmd.1.2016.12.30.03.34.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Dec 2016 03:34:55 -0800 (PST) From: Augusto Mecking Caringi To: "Rafael J . Wysocki" Cc: torvalds@linux-foundation.org, Augusto Mecking Caringi , Kevin Hilman , Ulf Hansson , Len Brown , Pavel Machek , Greg Kroah-Hartman , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] PM / domains: Fix 'may be used uninitialized' build warning Date: Fri, 30 Dec 2016 11:34:08 +0000 Message-Id: <1483097651-7172-1-git-send-email-augustocaringi@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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();