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: 9544411 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C349D60425 for ; Mon, 30 Jan 2017 04:30:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B806426D05 for ; Mon, 30 Jan 2017 04:30:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC5A026223; Mon, 30 Jan 2017 04:30:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5405426223 for ; Mon, 30 Jan 2017 04:30:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751009AbdA3EaQ (ORCPT ); Sun, 29 Jan 2017 23:30:16 -0500 Received: from mail-pf0-f175.google.com ([209.85.192.175]:33831 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751493AbdA3EaP (ORCPT ); Sun, 29 Jan 2017 23:30:15 -0500 Received: by mail-pf0-f175.google.com with SMTP id e4so86969564pfg.1 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=Rh4M2yRcPYAjDXQ9onCK+SFDFffTlc6O+t82Tplor5Wxh9GTfC4GRQjLkefO3xjHsY yOozLeuqiRnzT1BEiCXhAaBc2ECjXbGWSre0QAOgbTRdNPYzh6NCmuFCnBJNEw/DixMI aS/j5wJkDuY17hJuJg1JalxxMPlvZNbZXNj7ZEI/3RdvfPzIC6kihD22fT/iiPvpmpXr vB8TUH3AORYvjv++L6Z8y5PoStI8DoWpVl9v30MFh9pKhH3Zz+9zovYrdSX0lVLxLwyz 8VEH3jnWBtzGs/vn2ZC/dt+7jIy1SaIULCtgJvPypJfLbGfvLaUv7ehAoHFY/LZEDtgb Mo2g== X-Gm-Message-State: AIkVDXKDHH7mfTJJ5h5QqUhyjAcbKawAy7NHhlY0eKpf68M6nfI3oYuK7DvUbt2xOaWBjqJs 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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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;