Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755803AbbFBKcz (ORCPT ); Tue, 2 Jun 2015 06:32:55 -0400 Received: from opensource.wolfsonmicro.com ([80.75.67.52]:47887 "EHLO opensource.wolfsonmicro.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753940AbbFBKcs (ORCPT ); Tue, 2 Jun 2015 06:32:48 -0400 Date: Tue, 2 Jun 2015 11:32:41 +0100 From: Richard Fitzgerald To: Mark Brown Cc: patches@opensource.wolfsonmicro.com, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, lgirdwood@gmail.com Subject: Re: [PATCH v7 1/4] ASoC: arizona: Export functions to control subsystem DVFS Message-ID: <20150602103232.GA11622@opensource.wolfsonmicro.com> References: <1433163891-10084-1-git-send-email-rf@opensource.wolfsonmicro.com> <20150601161047.GC14071@sirena.org.uk> <20150601162241.GA13681@opensource.wolfsonmicro.com> <20150601163604.GE14071@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150601163604.GE14071@sirena.org.uk> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1177 Lines: 27 On Mon, Jun 01, 2015 at 05:36:04PM +0100, Mark Brown wrote: > On Mon, Jun 01, 2015 at 05:22:51PM +0100, Richard Fitzgerald wrote: > > On Mon, Jun 01, 2015 at 05:10:47PM +0100, Mark Brown wrote: > > > > > + if (priv->dvfs_reqs) > > > > + ret = arizona_dvfs_disable(codec); > > > > Are you sure that the function shouldn't check for requests? It seems > > > like every caller is repeating the same check. > > > Sorry, I don't understand your comment here. When SYSCLK is disabled > > we need to disable DVFS so that the codec can't go into suspend in the > > illegal state of DVFS enabled but insifficient DCVDD. However, if > > dvfs_reqs==0 DVFS is already disabled so we can save some time. > > Sure, but you repeat the same tests for dvfs_reqs at every call site > which suggests it should be factored into the functions. I don't. There are two cases that call them if (!dvfs_reqs) and two that call them if (dvfs_reqs) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/