From patchwork Mon Mar 25 17:24:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 10869697 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-2.web.codeaurora.org (Postfix) with ESMTP id 7960615AC for ; Mon, 25 Mar 2019 17:24:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A64A290E9 for ; Mon, 25 Mar 2019 17:24:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4E6FE29108; Mon, 25 Mar 2019 17:24:59 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 E7C42290E9 for ; Mon, 25 Mar 2019 17:24:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729626AbfCYRY6 (ORCPT ); Mon, 25 Mar 2019 13:24:58 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:42588 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728912AbfCYRY6 (ORCPT ); Mon, 25 Mar 2019 13:24:58 -0400 Received: by mail-pg1-f193.google.com with SMTP id p6so6902505pgh.9 for ; Mon, 25 Mar 2019 10:24:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=liX18Cu3SdiagJ0uzSPFRGNBoXYY0S6TuTgqfIep++k=; b=lf6/cFX26dAT2yZeCF0OrFHG7M5xvCHcD6vsG5Knp4RKBj1gYJN3a7lWq44SGmt2UV 2ZJZ2EylrHvISOuBWbjdSJzKQgOfpmvPodfozMUiFimOXvU4vztFwl3egPfnbBSCEQON yIUbBPiwwtu0GrrVZqzhQB8UK0JznA038MT/k= 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=liX18Cu3SdiagJ0uzSPFRGNBoXYY0S6TuTgqfIep++k=; b=ez8xLK7aZ1s1hGtHxtvd6BbFvxGHcFpi9aywcNf9bZXSjS0JS47MwPOHfL2gHC0Hgy iuMcVGPziUMCkRVSzDGxAjH82tJZ9lcUpkBFLS1VwlPwIBsykG9BBC0r/Nl3Z/L3Rcxs r/smGC2tskw9eaAGZAntB1HhliRNJ2UUkqy12Jc7XJ+42Mws5lgnk7pEMGU1oTr4Dn/i gywYqC4HvX0BgL/hXrQuiZOdWKYIpDwBHSoTbcP1bCglwF82MWpd4qYCr68TnjaKd4WX d9nIr/48zg2N9jdPM8WSWfT+JOeEWBgZCKIr/Q7T7Ip//6IToLWao7QDljhH4dO/81eD PqPg== X-Gm-Message-State: APjAAAWz57HDIaQI+ZR0baPuDzhzlzxzTiQb2WuAALk9QdaEd0Po604e FU05usFmZoFVjPXtnQm6BsubRw== X-Google-Smtp-Source: APXvYqxN3TkRCiZT8PqEEmsNnflpV0HPcbGEgUAH72LqLVmHdP3rEGoC9HcIGhc2yfu8Xn9lGntAOQ== X-Received: by 2002:a63:cc0c:: with SMTP id x12mr23418467pgf.336.1553534697599; Mon, 25 Mar 2019 10:24:57 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id c16sm209385pfb.102.2019.03.25.10.24.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Mar 2019 10:24:56 -0700 (PDT) From: Stephen Boyd To: "Rafael J. Wysocki" Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Wenkai Du , Justin TerAvest Subject: [PATCH] PM / wakeup: Use pm_pr_dbg() instead of pr_debug() Date: Mon, 25 Mar 2019 10:24:56 -0700 Message-Id: <20190325172456.227190-1-swboyd@chromium.org> X-Mailer: git-send-email 2.21.0.392.gf8f6787159e-goog 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 These prints are useful if we're doing PM suspend debugging. Having them at pr_debug() level means that we need to either enable DEBUG in this file, or compile the kernel with dynamic debug capabilities. Both of these options have drawbacks like custom compilation or opting into all debug statements being included into the kernel image. Given that we already have infrastructure to collect PM debugging information with CONFIG_PM_DEBUG and friends, let's change the pr_debug usage here to be pm_pr_dbg() instead so we can collect the wakeup information in the kernel logs. Cc: Wenkai Du Cc: Justin TerAvest Signed-off-by: Stephen Boyd --- drivers/base/power/wakeup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index bb1ae175fae1..23c243a4c675 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c @@ -804,7 +804,7 @@ void pm_print_active_wakeup_sources(void) srcuidx = srcu_read_lock(&wakeup_srcu); list_for_each_entry_rcu(ws, &wakeup_sources, entry) { if (ws->active) { - pr_debug("active wakeup source: %s\n", ws->name); + pm_pr_dbg("active wakeup source: %s\n", ws->name); active = 1; } else if (!active && (!last_activity_ws || @@ -815,7 +815,7 @@ void pm_print_active_wakeup_sources(void) } if (!active && last_activity_ws) - pr_debug("last active wakeup source: %s\n", + pm_pr_dbg("last active wakeup source: %s\n", last_activity_ws->name); srcu_read_unlock(&wakeup_srcu, srcuidx); } @@ -845,7 +845,7 @@ bool pm_wakeup_pending(void) raw_spin_unlock_irqrestore(&events_lock, flags); if (ret) { - pr_debug("Wakeup pending, aborting suspend\n"); + pm_pr_dbg("Wakeup pending, aborting suspend\n"); pm_print_active_wakeup_sources(); }