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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150907055823.GC26760@linux>
Date:	Mon, 7 Sep 2015 11:28:23 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
Cc:	Thomas Abraham <thomas.ab@...sung.com>,
	Kukjin Kim <kgene.kim@...sung.com>,
	Kukjin Kim <kgene@...nel.org>,
	Krzysztof Kozlowski <k.kozlowski@...sung.com>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Sylwester Nawrocki <s.nawrocki@...sung.com>,
	Michael Turquette <mturquette@...libre.com>,
	Tomasz Figa <tomasz.figa@...il.com>,
	Lukasz Majewski <l.majewski@...sung.com>,
	Heiko Stuebner <heiko@...ech.de>,
	Chanwoo Choi <cw00.choi@...sung.com>,
	Kevin Hilman <khilman@...aro.org>,
	Javier Martinez Canillas <javier@....samsung.com>,
	Tobias Jakobi <tjakobi@...h.uni-bielefeld.de>,
	Anand Moon <linux.amoon@...il.com>,
	linux-samsung-soc@...r.kernel.org, linux-clk@...r.kernel.org,
	linux-pm@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/3] cpufreq-dt: add suspend frequency support

On 03-09-15, 20:11, Bartlomiej Zolnierkiewicz wrote:
> Add suspend frequency support and if needed set it to
> the frequency obtained from the suspend opp (can be defined
> using opp-v2 bindings and is optional).  Also implement
> custom suspend method (needed to not error out on platforms
> which don't require suspend frequency).
> 
> Cc: Viresh Kumar <viresh.kumar@...aro.org>
> Cc: Thomas Abraham <thomas.ab@...sung.com>
> Cc: Javier Martinez Canillas <javier@....samsung.com>
> Cc: Krzysztof Kozlowski <k.kozlowski@...sung.com>
> Cc: Marek Szyprowski <m.szyprowski@...sung.com>
> Cc: Tobias Jakobi <tjakobi@...h.uni-bielefeld.de>
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
> ---
>  drivers/cpufreq/cpufreq-dt.c | 32 ++++++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
> 
> diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
> +#ifdef CONFIG_PM
> +static int cpufreq_dt_suspend(struct cpufreq_policy *policy)
> +{
> +	int ret;
> +
> +	if (!policy->suspend_freq) {
> +		pr_debug("%s: suspend_freq not defined\n", __func__);
> +		return 0;
> +	}
> +
> +	pr_debug("%s: Setting suspend-freq: %u\n", __func__,
> +			policy->suspend_freq);
> +
> +	ret = __cpufreq_driver_target(policy, policy->suspend_freq,
> +			CPUFREQ_RELATION_H);
> +	if (ret)
> +		pr_err("%s: unable to set suspend-freq: %u. err: %d\n",
> +				__func__, policy->suspend_freq, ret);
> +
> +	return ret;
> +}
> +#else
> +#define cpufreq_dt_suspend NULL
> +#endif

No, there is no point replicating the exactly same routine again.
Rather modify cpufreq_generic_suspend() to not print error and instead
do pr_debug(), on !policy->suspend_freq.

-- 
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ