summaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-07-25 23:00:51 +0200
committerTakashi Iwai <tiwai@suse.de>2018-07-26 08:31:41 +0200
commitebd836edfc4324da016ce0c09f809f882a133f50 (patch)
tree7679fd1a4ffdaa6e618dcaf0639630dafa3a3831 /sound/pci
parentALSA: msnd: Use NULL instead of 0 (diff)
downloadlinux-ebd836edfc4324da016ce0c09f809f882a133f50.tar.xz
linux-ebd836edfc4324da016ce0c09f809f882a133f50.zip
ALSA: hda - Fix a sparse warning about snd_ctl_elem_iface_t
The knew->iface field is in snd_ctl_elem_iface_t, which is with __bitwise, hence it can't be converted implicitly from integer. Give an explicit cast for the invalid type. Spotted by sparse: sound/pci/hda/hda_codec.c:3280:25: warning: restricted snd_ctl_elem_iface_t degrades to integer Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_codec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 6d0c0b143270..0a5085537034 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -3277,8 +3277,8 @@ int snd_hda_add_new_ctls(struct hda_codec *codec,
for (; knew->name; knew++) {
struct snd_kcontrol *kctl;
int addr = 0, idx = 0;
- if (knew->iface == -1) /* skip this codec private value */
- continue;
+ if (knew->iface == (__force snd_ctl_elem_iface_t)-1)
+ continue; /* skip this codec private value */
for (;;) {
kctl = snd_ctl_new1(knew, codec);
if (!kctl)