From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH] ASoC: pcm512x: Add PCM512x driver Date: Tue, 18 Feb 2014 12:22:23 +0100 Message-ID: References: <1391689575-4039-1-git-send-email-broonie@kernel.org> <20140206130735.GP32298@sirena.org.uk> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id ACFEE261671 for ; Tue, 18 Feb 2014 12:22:23 +0100 (CET) In-Reply-To: <20140206130735.GP32298@sirena.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Mark Brown Cc: alsa-devel@alsa-project.org, linaro-kernel@lists.linaro.org, Florian Meier , Liam Girdwood List-Id: alsa-devel@alsa-project.org [dropped devicetree ML, as it's irrelevant now] At Thu, 6 Feb 2014 13:07:35 +0000, Mark Brown wrote: > > On Thu, Feb 06, 2014 at 01:51:33PM +0100, Takashi Iwai wrote: > > Mark Brown wrote: > > > > +static const char *pcm512x_dsp_program_texts[] = { > > > The numbers of items in pcm512x_dsp_program_texts[] and _values[] > > don't match. > > Yeah, fixed. > > > > +static const struct soc_enum pcm512x_clk_missing = > > > + SOC_ENUM_SINGLE(PCM512x_CLKDET, 0, 7, pcm512x_clk_missing_text); > > > Isn't it 8? > > Hrm, it is but this points out an error in the control helpers which has > been there since forever - they call that parameter max but it's not a > maximum, it's the number of elements in the enumeration. I bet we have > a bunch of other enumerations which miss the last element as a result. I audited through the current code, and indeed there are quite a few bugs because of this. I'm going to send a full patch series including cleanups to alsa-devel ML. Since I split patches over each driver, it ended up 102 patches. So, be prepared :) There are still open issues after this, and let's discuss in another thread. Takashi