From: Mark Brown Subject: Re: [PATCH 4/4] ASoC: clean up cache accesser Date: Mon, 20 Dec 2010 16:42:02 +0000 Message-ID: <20101220164202.GC14986@sirena.org.uk> References: <20101220152709.GJ26706@rakim.wolfsonmicro.main> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from cassiel.sirena.org.uk (cassiel.sirena.org.uk [80.68.93.111]) by alsa0.perex.cz (Postfix) with ESMTP id A90A11038EA for ; Mon, 20 Dec 2010 17:42:04 +0100 (CET) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Takashi Iwai Cc: alsa-devel@alsa-project.org, Liam Girdwood List-Id: alsa-devel@alsa-project.org On Mon, Dec 20, 2010 at 05:05:51PM +0100, Takashi Iwai wrote: > Erm, subject might be wrong, but I'm too dizzy now. I think you just mean "Factor out cache accesses" or something? > +static inline bool set_cache_val(void *base, unsigned int idx, > + unsigned int val, unsigned int word_size) > +{ > + if (word_size == 1) { > + u8 *cache = base; Like Dimitris says these really do need to be switch statements. Otherwise it looks OK.