From patchwork Sat Aug 26 09:52:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liao Chang X-Patchwork-Id: 717362 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BEE98C83F01 for ; Sat, 26 Aug 2023 09:55:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231245AbjHZJya (ORCPT ); Sat, 26 Aug 2023 05:54:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231248AbjHZJyB (ORCPT ); Sat, 26 Aug 2023 05:54:01 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C72ED2; Sat, 26 Aug 2023 02:53:59 -0700 (PDT) Received: from kwepemd100002.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RXsW56pCsztS5W; Sat, 26 Aug 2023 17:50:09 +0800 (CST) Received: from huawei.com (10.67.174.28) by kwepemd100002.china.huawei.com (7.221.188.184) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.1258.23; Sat, 26 Aug 2023 17:53:56 +0800 From: Liao Chang To: , CC: , Subject: [PATCH] cpufreq: Fix inconsistency in error messages of cpufreq_resume/suspend() Date: Sat, 26 Aug 2023 09:52:01 +0000 Message-ID: <20230826095201.1137288-1-liaochang1@huawei.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.67.174.28] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemd100002.china.huawei.com (7.221.188.184) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The error message printed by cpufreq_resume() currently is the pointer value of the policy structure, while the error message printed by cpufreq_suspend() is the name of the driver. In order to make the error messages more consistent and easier to understand, change the error message printed by cpufreq_resume() to the name of driver. Signed-off-by: Liao Chang --- drivers/cpufreq/cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index c835ff117386..2199c04ac64d 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1943,8 +1943,8 @@ void cpufreq_resume(void) for_each_active_policy(policy) { if (cpufreq_driver->resume && cpufreq_driver->resume(policy)) { - pr_err("%s: Failed to resume driver: %p\n", __func__, - policy); + pr_err("%s: Failed to resume driver: %s\n", __func__, + cpufreq_driver->name); } else if (has_target()) { down_write(&policy->rwsem); ret = cpufreq_start_governor(policy);