aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-03-07 12:32:24 +0100
committerTakashi Iwai <tiwai@suse.de>2018-03-07 12:32:24 +0100
commitac8d6166144d80ffc639dcdb7d08fe558a0c2abe (patch)
treef9bd34d36d3f2e69c38f03763a758b9afff4f757
parenta22aac6747f8d1cb20718e8ea76c68cd1b695f8e (diff)
downloadhda-emu-ac8d6166144d80ffc639dcdb7d08fe558a0c2abe.tar.gz
Fix misc compile warnings
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--hda-decode-verb.c4
-rw-r--r--hda-spec.c2
-rw-r--r--include/sound/pcm.h4
-rw-r--r--snd-control.c1
-rw-r--r--snd-vmaster.c5
-rw-r--r--snd-wrapper.c1
6 files changed, 12 insertions, 5 deletions
diff --git a/hda-decode-verb.c b/hda-decode-verb.c
index 0ac31bd..8263b7f 100644
--- a/hda-decode-verb.c
+++ b/hda-decode-verb.c
@@ -52,12 +52,12 @@ static void usage(int mode)
unsigned int hda_decode_verb(struct xhda_codec *codec, unsigned int val)
{
- unsigned int cid, dir, nid, verb, parm;
+ unsigned int cid, /*dir,*/ nid, verb, parm;
hda_log(HDA_LOG_INFO, "raw value = 0x%08x\n", val);
cid = (val >> 28) & 0xf;
- dir = (val >> 27) & 1;
+ /* dir = (val >> 27) & 1; */
nid = (val >> 20) & 0x7f;
verb = (val >> 8) & 0xfff;
parm = val & 0xff;
diff --git a/hda-spec.c b/hda-spec.c
index 5f1ac42..889ff3d 100644
--- a/hda-spec.c
+++ b/hda-spec.c
@@ -82,12 +82,14 @@ static int set_cached_verb3(struct xhda_codec *codec, struct xhda_node *node,
return set_verb_val(codec, ((cmd >> 8) & 0x7ff) - 2, cmd, 2);
}
+#if 0 /* not used */
/* fourth byte */
static int set_cached_verb4(struct xhda_codec *codec, struct xhda_node *node,
unsigned int cmd)
{
return set_verb_val(codec, ((cmd >> 8) & 0x7ff) - 3, cmd, 3);
}
+#endif
/*
* IDT 92HD7xx
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index aa95a32..2752911 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -242,13 +242,13 @@ static inline int snd_pcm_hw_constraint_step(struct snd_pcm_runtime *runtime,
}
struct snd_pcm_hw_constraint_list {
+ const unsigned int *list;
unsigned int count;
- unsigned int *list;
unsigned int mask;
};
static inline int snd_pcm_hw_constraint_list(struct snd_pcm_runtime *run,
- int var1, int var2, void *ptr)
+ int var1, int var2, const void *ptr)
{
return 0;
}
diff --git a/snd-control.c b/snd-control.c
index a4a7a14..5a327d7 100644
--- a/snd-control.c
+++ b/snd-control.c
@@ -192,6 +192,7 @@ int snd_ctl_activate_id(struct snd_card *card, struct snd_ctl_elem_id *id,
goto unlock;
kctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_INACTIVE;
}
+ snd_ctl_build_ioff(id, kctl, index_offset);
ret = 1;
unlock:
if (ret > 0) {
diff --git a/snd-vmaster.c b/snd-vmaster.c
index cfd08d2..4d41fde 100644
--- a/snd-vmaster.c
+++ b/snd-vmaster.c
@@ -68,10 +68,13 @@ static int slave_update(struct link_slave *slave)
return -ENOMEM;
uctl->id = slave->slave.id;
err = slave->slave.get(&slave->slave, uctl);
+ if (err < 0)
+ goto error;
for (ch = 0; ch < slave->info.count; ch++)
slave->vals[ch] = uctl->value.integer.value[ch];
+ error:
kfree(uctl);
- return 0;
+ return err < 0 ? err : 0;
}
/* get the slave ctl info and save the initial values */
diff --git a/snd-wrapper.c b/snd-wrapper.c
index 0bcd233..cc1df46 100644
--- a/snd-wrapper.c
+++ b/snd-wrapper.c
@@ -749,6 +749,7 @@ int dell_app_wmi_led_set(int whichled, int on)
int dell_micmute_led_set(int led)
{
hda_log(HDA_LOG_INFO, "Setting Dell LED to %d\n", led);
+ return 0;
}
/*