From patchwork Mon Jan 30 04:29:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 92796 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1270373qgi; Sun, 29 Jan 2017 20:30:18 -0800 (PST) X-Received: by 10.98.21.131 with SMTP id 125mr21271151pfv.110.1485750618079; Sun, 29 Jan 2017 20:30:18 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h14si11449934plk.127.2017.01.29.20.30.17; Sun, 29 Jan 2017 20:30:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750735AbdA3EaQ (ORCPT + 7 others); Sun, 29 Jan 2017 23:30:16 -0500 Received: from mail-pf0-f172.google.com ([209.85.192.172]:32841 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751496AbdA3EaP (ORCPT ); Sun, 29 Jan 2017 23:30:15 -0500 Received: by mail-pf0-f172.google.com with SMTP id y143so87273358pfb.0 for ; Sun, 29 Jan 2017 20:30:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9h3csIrg3JEfq8mxlS6SuQdxGObtkY9RJTyDanMYFuo=; b=GfgftOTKZ8iqiTTfRUi00art9lTNoUzmQ/7SvjskSZUi0t9AEH52f7ij8MtpU3Bdra JQxaTuyYeKchCiQqx3wlFAhpH7tur8JakrqKEHYDmOlrf8a3E52tqCW3Zsf/LQVAI2OA k96/daQFOSYcpnPX4p1ym6Gsvqxg9u3o3HLaI= 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:in-reply-to :references; bh=9h3csIrg3JEfq8mxlS6SuQdxGObtkY9RJTyDanMYFuo=; b=QuAjPx3qhG6QGPrAIxfCGP4pY+nlDbCSU0D42tr6Ig2kRlrnSE0vLHnnobgT6IWKjO q0YFGqFFrag4Xl/xkitifJe7jo3fkyTerEa/RWBLGpRsRC/+0VcTd/KegMA37hHzbnrI mMD5BcaPxdMQfhG0sHyOFD6lAsBwD+eMQuD1RgG0RzNn6CVpF6LMvb56BSxO/7PzPmGB jCw8x1a9WDxIXq8ddKyUr//77GTOPo8RkBlU4i6GJTJQPwZIhEFxKyon8/4gCAXq0DOM RIN/JbYdVHAHfhqnkgWAC5WHAceAJsq7UKtC9JeOACIVj5sCLLJkFsarC78FwvpsywWJ FkyA== X-Gm-Message-State: AIkVDXLtqMHmWPajj8poZKFiqKuoxXnzLb54nL7hhaAe1NQmLtZyUHhFJ7wPRAbBgXUpaHYM X-Received: by 10.99.65.1 with SMTP id o1mr21785186pga.93.1485750612649; Sun, 29 Jan 2017 20:30:12 -0800 (PST) Received: from localhost ([122.172.213.43]) by smtp.gmail.com with ESMTPSA id l12sm27831423pfj.37.2017.01.29.20.30.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Jan 2017 20:30:11 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , Len Brown Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot , Viresh Kumar , linux-acpi@vger.kernel.org Subject: [PATCH V2 1/2] ACPI: processor_perflib: Simplify code and stop using CPUFREQ_START Date: Mon, 30 Jan 2017 09:59:57 +0530 Message-Id: X-Mailer: git-send-email 2.7.1.410.g6faf27b In-Reply-To: <1547465.PvRbYVlVrB@aspire.rjw.lan> References: <1547465.PvRbYVlVrB@aspire.rjw.lan> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org acpi_processor_ppc_notifier() can live without using CPUFREQ_START (which is gonna be removed soon), as it is only used while setting ignore_ppc to 0. This can be done with the help of "ignore_ppc < 0" check alone. The notifier function anyway ignores all events except CPUFREQ_ADJUST and dropping CPUFREQ_START wouldn't harm at all. Once CPUFREQ_START event is removed from the cpufreq core, acpi_processor_ppc_notifier() will get called only for CPUFREQ_NOTIFY or CPUFREQ_ADJUST event. Drop the return statement from the first if block to make sure we don't ignore any such events. Signed-off-by: Viresh Kumar --- V1->V2: - Improved changelog - Don't move the first if block to a later point, as it becomes useless then. --- drivers/acpi/processor_perflib.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.7.1.410.g6faf27b -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index f0b4a981b8d3..18b72eec3507 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c @@ -75,10 +75,8 @@ static int acpi_processor_ppc_notifier(struct notifier_block *nb, struct acpi_processor *pr; unsigned int ppc = 0; - if (event == CPUFREQ_START && ignore_ppc <= 0) { + if (ignore_ppc < 0) ignore_ppc = 0; - return 0; - } if (ignore_ppc) return 0;