From patchwork Wed Oct 14 15:52:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 7396451 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D5DBEBEEA4 for ; Wed, 14 Oct 2015 15:53:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ECBDF209BC for ; Wed, 14 Oct 2015 15:53:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A2CF3207F5 for ; Wed, 14 Oct 2015 15:53:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754273AbbJNPxS (ORCPT ); Wed, 14 Oct 2015 11:53:18 -0400 Received: from down.free-electrons.com ([37.187.137.238]:40974 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754135AbbJNPxR (ORCPT ); Wed, 14 Oct 2015 11:53:17 -0400 Received: by mail.free-electrons.com (Postfix, from userid 110) id DE529EC8; Wed, 14 Oct 2015 17:53:15 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from localhost (AToulouse-657-1-26-161.w83-193.abo.wanadoo.fr [83.193.1.161]) by mail.free-electrons.com (Postfix) with ESMTPSA id 6E29719; Wed, 14 Oct 2015 17:52:29 +0200 (CEST) From: Thomas Petazzoni To: Viresh Kumar , "Rafael J . Wysocki" , Len Brown , Pavel Machek Cc: Greg Kroah-Hartman , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Tawfik Bayouk , Nadav Haklai , Lior Amsalem , Gregory Clement , Thomas Petazzoni Subject: [PATCH] PM / OPP: Remove confusing error message in of_cpumask_init_opp_table() Date: Wed, 14 Oct 2015 17:52:23 +0200 Message-Id: <1444837943-32263-1-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.6.1 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 The of_cpumask_init_opp_table() function will print an error message (with pr_err) if it cannot find the OPP table for a certain CPU in the Device Tree. There are users of the cpufreq-dt driver (which is the one calling of_cpumask_init_opp_table) that do not have the OPP points defined in the Device Tree. Instead, such users dynamically create the OPP table at boot time depending on the system configuration. Such a case is planned in the cpufreq-dt driver, which on purpose ignores the return value of of_cpumask_init_opp_table() with the following comment: "OPPs might be populated at runtime, don't check for error here". For such platforms, the of_cpumask_init_opp_table() prints a spurious and confusing error message for each CPU: [ 1.749548] of_cpumask_init_opp_table: couldn't find opp table for cpu:0, -19 [ 1.756784] of_cpumask_init_opp_table: couldn't find opp table for cpu:1, -19 [ 1.764031] of_cpumask_init_opp_table: couldn't find opp table for cpu:2, -19 [ 1.771268] of_cpumask_init_opp_table: couldn't find opp table for cpu:3, -19 This is confusing because everything is working fine, cpufreq works and it knows the OPP table that was registered at boot time (on Marvell Armada XP): $ cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state 666500 1884 1333000 23333 To avoid this confusion, this patch simply deletes the error message. Signed-off-by: Thomas Petazzoni --- drivers/base/power/opp.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c index 7ae7cd9..11206d2 100644 --- a/drivers/base/power/opp.c +++ b/drivers/base/power/opp.c @@ -1489,9 +1489,6 @@ int of_cpumask_init_opp_table(cpumask_var_t cpumask) ret = of_init_opp_table(cpu_dev); if (ret) { - pr_err("%s: couldn't find opp table for cpu:%d, %d\n", - __func__, cpu, ret); - /* Free all other OPPs */ of_cpumask_free_opp_table(cpumask); break;