[alsa-devel] [PATCH 11/42] ASoC: da9055: Replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE

Opensource [Adam Thomson] Adam.Thomson.Opensource at diasemi.com
Mon Aug 3 16:47:35 CEST 2015


On August 2, 2015 16:20, Lars-Peter Clausen wrote:

> DECLARE_TLV_DB_RANGE() has the advantage over using TLV_DB_RANGE_HEAD()
> that it automatically calculates the number of items in the TLV and is
> hence less prone to manual error.
> 
> Generate using the following coccinelle script
> 
> // <smpl>
> @@
> declarer name DECLARE_TLV_DB_RANGE;
> identifier tlv;
> constant x;
> @@
> -unsigned int tlv[] = {
> -	TLV_DB_RANGE_HEAD(x),
> +DECLARE_TLV_DB_RANGE(tlv,
> 	...
> -};
> +);
> // </smpl>
> 
> Signed-off-by: Lars-Peter Clausen <lars at metafoo.de>

Acked-by: Adam Thomson <Adam.Thomson.Opensource at diasemi.com>


More information about the Alsa-devel mailing list