From f6212e0ab3ff28d4e2e53a520496a052c241df39 Mon Sep 17 00:00:00 2001 From: Richard Fitzgerald Date: Wed, 30 Dec 2020 17:24:27 +0000 Subject: ASoC: wm_adsp: Use snd_ctl_elem_type_t for control types Sparse will complain about trying to convert between values declared as snd_ctl_elem_type_t and other types. This patch converts to consistently use snd_ctl_elem_type_t for control type values. A __force cast is needed in a couple of cases where the control type value is parsed out of a DSP data block. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20201230172427.13865-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown --- sound/soc/codecs/wmfw.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sound/soc/codecs/wmfw.h') diff --git a/sound/soc/codecs/wmfw.h b/sound/soc/codecs/wmfw.h index 7423272c30e9..f3d51602f85c 100644 --- a/sound/soc/codecs/wmfw.h +++ b/sound/soc/codecs/wmfw.h @@ -24,9 +24,9 @@ #define WMFW_CTL_FLAG_READABLE 0x0001 /* Non-ALSA coefficient types start at 0x1000 */ -#define WMFW_CTL_TYPE_ACKED 0x1000 /* acked control */ -#define WMFW_CTL_TYPE_HOSTEVENT 0x1001 /* event control */ -#define WMFW_CTL_TYPE_HOST_BUFFER 0x1002 /* host buffer pointer */ +#define WMFW_CTL_TYPE_ACKED ((__force snd_ctl_elem_type_t)0x1000) /* acked control */ +#define WMFW_CTL_TYPE_HOSTEVENT ((__force snd_ctl_elem_type_t)0x1001) /* event control */ +#define WMFW_CTL_TYPE_HOST_BUFFER ((__force snd_ctl_elem_type_t)0x1002) /* host buffer pointer */ struct wmfw_header { char magic[4]; -- cgit v1.2.3