From patchwork Fri Aug 4 12:57:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 9881199 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 3D57360375 for ; Fri, 4 Aug 2017 13:05:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 40BCC28973 for ; Fri, 4 Aug 2017 13:05:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 357A3289A0; Fri, 4 Aug 2017 13:05:54 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 9005628973 for ; Fri, 4 Aug 2017 13:05:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752458AbdHDNFw (ORCPT ); Fri, 4 Aug 2017 09:05:52 -0400 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:53917 "EHLO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752151AbdHDNFw (ORCPT ); Fri, 4 Aug 2017 09:05:52 -0400 Received: from 79.184.253.199.ipv4.supernova.orange.pl (79.184.253.199) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.82) id eef60e2a4188e7b3; Fri, 4 Aug 2017 15:05:49 +0200 From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , Viresh Kumar Subject: [PATCH] cpufreq: Simplify cpufreq_can_do_remote_dvfs() Date: Fri, 04 Aug 2017 14:57:39 +0200 Message-ID: <1957547.1DvPFJ11E3@aspire.rjw.lan> MIME-Version: 1.0 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 From: Rafael J. Wysocki The if () in cpufreq_can_do_remote_dvfs() is superfluous, so drop it and simply return the value of the expression under it. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar --- On top of the current linux-next. --- include/linux/cpufreq.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) Index: linux-pm/include/linux/cpufreq.h =================================================================== --- linux-pm.orig/include/linux/cpufreq.h +++ linux-pm/include/linux/cpufreq.h @@ -578,11 +578,8 @@ static inline bool cpufreq_can_do_remote * - dvfs_possible_from_any_cpu flag is set * - the local and remote CPUs share cpufreq policy */ - if (policy->dvfs_possible_from_any_cpu || - cpumask_test_cpu(smp_processor_id(), policy->cpus)) - return true; - - return false; + return policy->dvfs_possible_from_any_cpu || + cpumask_test_cpu(smp_processor_id(), policy->cpus); } /*********************************************************************