[alsa-devel] [PATCH v6 01/11] ASoC: topology: Make manifest backward compatible from ABI v4

Mark Brown broonie at kernel.org
Fri Oct 28 20:47:21 CEST 2016


On Tue, Oct 11, 2016 at 02:36:42PM +0800, mengdong.lin at linux.intel.com wrote:

> +static int manifest_new_ver(struct soc_tplg *tplg,
> +			    struct snd_soc_tplg_manifest *src,
> +			    struct snd_soc_tplg_manifest **manifest)
> +{
> +	struct snd_soc_tplg_manifest *dest;
> +	struct snd_soc_tplg_manifest_v4 *src_v4;
> +
> +	*manifest = NULL;
> +
> +	if (src->size != sizeof(*src_v4)) {
> +		dev_err(tplg->dev, "ASoC: invalid manifest size\n");
> +		return -EINVAL;
> +	}
> +
> +	dev_warn(tplg->dev, "ASoC: old version of manifest\n");

The way this function is written it's not going to scale to any future
ABI churn, it's not set up to handle multiple versions at all.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20161028/49e90341/attachment.sig>


More information about the Alsa-devel mailing list