From patchwork Thu Jun 8 00:05:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 9773643 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 2470960234 for ; Thu, 8 Jun 2017 00:15:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1544428469 for ; Thu, 8 Jun 2017 00:15:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 09BF0284A4; Thu, 8 Jun 2017 00:15:36 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 B8F1028469 for ; Thu, 8 Jun 2017 00:15:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752122AbdFHAPA (ORCPT ); Wed, 7 Jun 2017 20:15:00 -0400 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:51212 "EHLO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752179AbdFHAN0 (ORCPT ); Wed, 7 Jun 2017 20:13:26 -0400 Received: from 79.184.252.2.ipv4.supernova.orange.pl (79.184.252.2) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.82) id f119b43937f98507; Thu, 8 Jun 2017 02:13:24 +0200 From: "Rafael J. Wysocki" To: Linux ACPI Cc: Linux PCI , Linux PM , Bjorn Helgaas , LKML , Mika Westerberg , Srinivas Pandruvada , Linux USB , Mathias Nyman , Felipe Balbi , Mario Limonciello , Andy Shevchenko , Dominik Brodowski , Hans De Goede Subject: [PATCH 5/6] PM / sleep: Print timing information if debug is enabled Date: Thu, 08 Jun 2017 02:05:09 +0200 Message-ID: <13741045.ZBVOb8TO5O@aspire.rjw.lan> User-Agent: KMail/4.14.10 (Linux/4.12.0-rc1+; KDE/4.14.9; x86_64; ; ) In-Reply-To: <8918199.uo13RZ8hZk@aspire.rjw.lan> References: <8918199.uo13RZ8hZk@aspire.rjw.lan> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rafael J. Wysocki Avoid printing the device suspend/resume timing information if CONFIG_PM_DEBUG is not set to reduce the log noise level. Signed-off-by: Rafael J. Wysocki --- drivers/base/power/main.c | 4 ++++ 1 file changed, 4 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-pm/drivers/base/power/main.c =================================================================== --- linux-pm.orig/drivers/base/power/main.c +++ linux-pm/drivers/base/power/main.c @@ -417,6 +417,7 @@ static void pm_dev_err(struct device *de dev_name(dev), pm_verb(state.event), info, error); } +#ifdef CONFIG_PM_DEBUG static void dpm_show_time(ktime_t starttime, pm_message_t state, char *info) { ktime_t calltime; @@ -433,6 +434,9 @@ static void dpm_show_time(ktime_t startt info ?: "", info ? " " : "", pm_verb(state.event), usecs / USEC_PER_MSEC, usecs % USEC_PER_MSEC); } +#else +static inline void dpm_show_time(ktime_t starttime, pm_message_t state, char *info) {} +#endif /* CONFIG_PM_DEBUG */ static int dpm_run_callback(pm_callback_t cb, struct device *dev, pm_message_t state, char *info)