From patchwork Tue Aug 15 01:40:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liao Chang X-Patchwork-Id: 135617 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:3f2:4152:657d with SMTP id x8csp191641vqo; Mon, 14 Aug 2023 21:09:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEG7KZLxUQso3V46Q5xh6UEDrUchDk4k6kZRQG7smjbOrOkk2zdrqnPIoQjE6HYifpxUkm1 X-Received: by 2002:a17:906:53:b0:98c:e72c:6b83 with SMTP id 19-20020a170906005300b0098ce72c6b83mr8632378ejg.45.1692072581338; Mon, 14 Aug 2023 21:09:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692072581; cv=none; d=google.com; s=arc-20160816; b=cc6naZyAC/NKwTleA+Xj6W8icswkwu+q3HiQL534rzLtWhMcyjuv3MPn5buufGA4Wh PQpRJCsc70lfLPnkzQOp2wQ7pRyjdxouqMojsRVXptKb5QLFk5PfNsakOt9FuaaOE/6+ UAf38gmwI55DPJMtlVF2n1TMJQuGA6X26270bCkHGAhvMT1XJywdn9Eo4ctZCbFZAjW2 LwsLIKgIlHbaOucxKG7cLj0aHRhXdvmDoJx0PMN5NI5U/k5xDxF8uuLVevkCyAxgLObn YS+CH4PUFxOyqHxOzqJkRUxi9S0Yl2D2X9kgLrwbr6vSNpY5dm6m305HbPSkDdCmMUwP Fp7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=58WAyai+brZFBOoT4kTBOqTMKZDuLaDa9gXXcg1MuC4=; fh=MkjW1f1ixasRiKuzf2PaYxsdrg4RoFahP+0zEUjLGHA=; b=eSdNo+1DAFvaFR8mhDC6rBfZPUMxNo9TqqnarbX+chQ0KRqS2XUl1VsNPnN2FLkcD+ opKjNcZZ0uNV0uxJAu31Nu7NHDP/xhnDfHq8cY2vkd2t6SwvBdmBJ6mmvzTOeaQwEY9n kxZiBVHsIj2brXCv68INam/GxkFL0xOZhcWw5Z0MJsbhd05evxguOidkCMuBBJ8qSeZi ACcGY4WmtqyP7M/H/IqA6fFUNEABgdq/upP902REjfan0dvfi+Ce8l9K6IkOqdcIjuiZ jR7AptIXpVezPcK8/zVTwCfy4ncyIv0t3LY49PYptgpN+FQyXNWPrDx9GJnar5aUQG64 w4HA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d9-20020a170906040900b00992b63c9c16si8343675eja.129.2023.08.14.21.09.08; Mon, 14 Aug 2023 21:09:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230043AbjHOBka (ORCPT + 99 others); Mon, 14 Aug 2023 21:40:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230031AbjHOBk3 (ORCPT ); Mon, 14 Aug 2023 21:40:29 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 608EEE7; Mon, 14 Aug 2023 18:40:27 -0700 (PDT) Received: from kwepemi500012.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RPv4y18s7ztRyh; Tue, 15 Aug 2023 09:36:50 +0800 (CST) Received: from huawei.com (10.67.174.53) by kwepemi500012.china.huawei.com (7.221.188.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Tue, 15 Aug 2023 09:40:25 +0800 From: Liao Chang To: , CC: , Subject: [PATCH 1/2] cpufreq: Prefer to print cpuid in MIN/MAX QoS register error message Date: Tue, 15 Aug 2023 09:40:02 +0800 Message-ID: <20230815014002.4132226-1-liaochang1@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.67.174.53] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemi500012.china.huawei.com (7.221.188.12) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774266699251939148 X-GMAIL-MSGID: 1774266699251939148 When a cpufreq_policy is allocated, the cpus, related_cpus and real_cpus of policy are still unset. Therefore, it is preferable to print the passed 'cpu' parameter instead of a empty 'cpus' cpumask in error message when registering MIN/MAX QoS notifier fails. Signed-off-by: Liao Chang --- drivers/cpufreq/cpufreq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 50bbc969ffe5..a757f90aa9d6 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1234,16 +1234,16 @@ static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu) ret = freq_qos_add_notifier(&policy->constraints, FREQ_QOS_MIN, &policy->nb_min); if (ret) { - dev_err(dev, "Failed to register MIN QoS notifier: %d (%*pbl)\n", - ret, cpumask_pr_args(policy->cpus)); + dev_err(dev, "Failed to register MIN QoS notifier: %d (CPU%u)\n", + ret, cpu); goto err_kobj_remove; } ret = freq_qos_add_notifier(&policy->constraints, FREQ_QOS_MAX, &policy->nb_max); if (ret) { - dev_err(dev, "Failed to register MAX QoS notifier: %d (%*pbl)\n", - ret, cpumask_pr_args(policy->cpus)); + dev_err(dev, "Failed to register MAX QoS notifier: %d (CPU%u)\n", + ret, cpu); goto err_min_qos_notifier; }