From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Keepax Subject: Re: [PATCH 00/42] ASoC: Replace users of TLV_DB_RANGE_HEAD Date: Fri, 7 Aug 2015 09:26:05 +0100 Message-ID: <20150807082605.GE25225@opensource.wolfsonmicro.com> References: <1438528810-23498-1-git-send-email-lars@metafoo.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from opensource.wolfsonmicro.com (opensource.wolfsonmicro.com [80.75.67.52]) by alsa0.perex.cz (Postfix) with ESMTP id D8BDD26041F for ; Fri, 7 Aug 2015 10:26:05 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1438528810-23498-1-git-send-email-lars@metafoo.de> 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: Lars-Peter Clausen Cc: Oder Chiou , Brian Austin , Support Opensource , alsa-devel@alsa-project.org, Anish Kumar , patches@opensource.wolfsonmicro.com, Liam Girdwood , Paul Handrigan , Peter Ujfalusi , Mark Brown , Bard Liao List-Id: alsa-devel@alsa-project.org On Sun, Aug 02, 2015 at 05:19:28PM +0200, Lars-Peter Clausen wrote: > Usage of TLV_DB_RANGE_HEAD() is deprecated in favor of > DECLARE_TLV_DB_RANGE(). The reason for this is that the former requires to > specify the number of items inside the range container while the later is > able to calculate this automatically and hence leaves less room for error. > > While non of the current users of TLV_DB_RANGE_HEAD() gets it wrong it > still makes sense to clean this up since existing drivers are often used as > templates for new drivers. As an added bonus the code is also slightly > shorter. > > There are also a few drivers which use TLV_DB_RANGE_HEAD() with only a > single sub-item. Those are updated to not use a range container at all > since it is not necessary. > > Most of the conversion was auto-generated using the following coccinelle > script: > > // > @@ > declarer name DECLARE_TLV_DB_RANGE; > identifier tlv; > constant x; > @@ > -unsigned int tlv[] = { > - TLV_DB_RANGE_HEAD(x), > +DECLARE_TLV_DB_RANGE(tlv, > ... > -}; > +); > // > > - Lars > For the Wolfson parts: Acked-by: Charles Keepax Thanks, Charles