From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751912AbcF0HUc (ORCPT ); Mon, 27 Jun 2016 03:20:32 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:34986 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751871AbcF0HUa (ORCPT ); Mon, 27 Jun 2016 03:20:30 -0400 Date: Mon, 27 Jun 2016 12:50:27 +0530 From: Viresh Kumar To: "Rafael J. Wysocki" Cc: Chen Yu , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Subject: Re: [PATCH][RFC] cpufreq: Avoid warning during resume by return EAGAIN if cpufreq is unavailable Message-ID: <20160627072027.GC3341@vireshk-i7> References: <1466872128-14566-1-git-send-email-yu.c.chen@intel.com> <2394728.0JDBHijQ6J@vostro.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2394728.0JDBHijQ6J@vostro.rjw.lan> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27-06-16, 03:12, Rafael J. Wysocki wrote: > --- > drivers/cpufreq/cpufreq.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > Index: linux-pm/drivers/cpufreq/cpufreq.c > =================================================================== > --- linux-pm.orig/drivers/cpufreq/cpufreq.c > +++ linux-pm/drivers/cpufreq/cpufreq.c > @@ -1544,9 +1544,6 @@ static unsigned int cpufreq_update_curre > { > unsigned int new_freq; > > - if (cpufreq_suspended) > - return 0; > - > new_freq = cpufreq_driver->get(policy->cpu); > if (!new_freq) > return 0; > @@ -2280,6 +2277,10 @@ int cpufreq_update_policy(unsigned int c > * -> ask driver for current freq and notify governors about a change > */ > if (cpufreq_driver->get && !cpufreq_driver->setpolicy) { > + if (cpufreq_suspended) { > + ret = -EAGAIN; > + goto unlock; > + } > new_policy.cur = cpufreq_update_current_freq(policy); > if (WARN_ON(!new_policy.cur)) { > ret = -EIO; Acked-by: Viresh Kumar -- viresh