lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1503504610-12880-7-git-send-email-aisheng.dong@nxp.com>
Date:   Thu, 24 Aug 2017 00:10:09 +0800
From:   Dong Aisheng <aisheng.dong@....com>
To:     <linux-pm@...r.kernel.org>
CC:     <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>, <sboyd@...eaurora.org>,
        <vireshk@...nel.org>, <nm@...com>, <rjw@...ysocki.net>,
        <shawnguo@...nel.org>, <Anson.Huang@....com>, <ping.bai@....com>,
        Dong Aisheng <aisheng.dong@....com>
Subject: [PATCH 6/7] cpufreq: make cpufreq_generic_init transition_latency default to CPUFREQ_ETERNAL

If no valid transition_latency specified, let's make it default to
CPUFREQ_ETERNAL which is consistent with its definition.

This can save some of the same checkings like this:
        transition_latency = dev_pm_opp_get_max_transition_latency(cpu_dev);
-       if (!transition_latency)
-               transition_latency = CPUFREQ_ETERNAL;
        ret = cpufreq_generic_init(policy, freq_table, transition_latency);

Cc: Viresh Kumar <vireshk@...nel.org>
Cc: Nishanth Menon <nm@...com>
Cc: Stephen Boyd <sboyd@...eaurora.org>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
Signed-off-by: Dong Aisheng <aisheng.dong@....com>
---
 drivers/cpufreq/cpufreq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 9bf97a3..da07de6 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -180,6 +180,8 @@ int cpufreq_generic_init(struct cpufreq_policy *policy,
 		return ret;
 	}
 
+	if (!transition_latency)
+		transition_latency = CPUFREQ_ETERNAL;
 	policy->cpuinfo.transition_latency = transition_latency;
 
 	/*
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ