提交 ebd836ed 编写于 作者: T Takashi Iwai

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: NTakashi Iwai <tiwai@suse.de>
上级 dcda6f78
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册