Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2504598ybk; Mon, 18 May 2020 00:19:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZFqR4d4U9u4BxPSI7Mw3nlNbwRW8wj+SyVQR02rYX1uqJOE2hFAh2MGGV7AFc4Ej17y7/ X-Received: by 2002:a17:906:3584:: with SMTP id o4mr14165204ejb.70.1589786389152; Mon, 18 May 2020 00:19:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589786389; cv=none; d=google.com; s=arc-20160816; b=teMmbYEZrfi6M1fRI66Bse1Ac/VsWM7OdpA7PWDsK8L3eHeN/lTciUpljHJHNvHx/n D+EStQi+w9PDTNRSUgb6gkciumWmgvbk9WERRITragvvySUToflY1ByLlSqKUlt8QfsJ Rc+EoB71NymBgrgoRLWAUKs8AkWQyTC2nLC+4PLVWxYU2fbLtNknbs7rpP2C5fRuNwxf v6GsIhup2tYdj7lw+wQmd2cMhRgN4TQrHNlz0h5mD3eVBU0BdtoKwogKHPxczPcZU3ZD lgrcxxP5HnVxhIyeFxWEMuPhDicPmyC/WvPCeHW+kOYFEsUHhzXEXRSv2RM7kylipLg0 IzuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=vci59rtuCukwqobshd7Ci7bdsLQn7+5ph4zb1UXpjSw=; b=QOJrfp6gM6G9eM9BALJqcO7gHVpsYKDnSwICkkdNke6lfXvMw6VCS5A3OVOjfLF/H1 yNwXDCzHoaiRXdDVEhUIAQYD42AJNrfAxVnkBa2ahCrOBH13kJLsRwMmFypuPaZAGald qWizsaVxNURAeNjkJ9DB9RRcPgtx8UNoEmMGv0PMfWZE2TRBCpl8tNi5iqzCtTCyLE7W l+eclJA5RBBuPt48HDqezkMms6LefzyLt8FMaNePNgx3dMrssgu0cno5y25pHsFfCF7I RC2aKvvVBknbdfqLVNqqKgxczjdFW2oMhj7Zjpg+amC3ReQ8igk1utR/BlMu3YIa4Bqs GX4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p23si6497746ejb.217.2020.05.18.00.19.26; Mon, 18 May 2020 00:19:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726992AbgERHQt (ORCPT + 99 others); Mon, 18 May 2020 03:16:49 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:4808 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726676AbgERHQr (ORCPT ); Mon, 18 May 2020 03:16:47 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id EC212A17FD7449AE7F76; Mon, 18 May 2020 15:16:43 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Mon, 18 May 2020 15:16:34 +0800 From: Xiongfeng Wang To: , , , CC: , , , , , , Subject: [RFC PATCH v2 1/3] cpufreq: handle the return value of '.set_boost()' properly Date: Mon, 18 May 2020 15:10:06 +0800 Message-ID: <1589785808-12138-2-git-send-email-wangxiongfeng2@huawei.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1589785808-12138-1-git-send-email-wangxiongfeng2@huawei.com> References: <1589785808-12138-1-git-send-email-wangxiongfeng2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 'freq_qos_update_request()' called by 'cpufreq_boost_set_sw()' reutrns 1 when the effective constraint value of frequency QoS has changed. It's not an error code. So handle the return value 1 of '.set_boost()' in 'cpufreq_boost_trigger_state()' properly. Signed-off-by: Xiongfeng Wang --- drivers/cpufreq/cpufreq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 4adac3a..bb6746e 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -2540,7 +2540,10 @@ int cpufreq_boost_trigger_state(int state) write_unlock_irqrestore(&cpufreq_driver_lock, flags); ret = cpufreq_driver->set_boost(state); - if (ret) { + if (ret == 1) { + pr_debug("The effective constraint value of frequency QoS has changed.\n"); + return 0; + } else if (ret) { write_lock_irqsave(&cpufreq_driver_lock, flags); cpufreq_driver->boost_enabled = !state; write_unlock_irqrestore(&cpufreq_driver_lock, flags); -- 1.7.12.4