aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2022-07-08 17:53:32 +0000
committerWarner Losh <imp@FreeBSD.org>2022-10-02 04:25:55 +0000
commitb6e4f5ef2b6a194576e12133c72ead8fe7a9c477 (patch)
treeb21cca485ad0d5089673352d206182c87c6a0ccc
parent30711541bac93e8dc64b87ed65fcb7b9b1e80691 (diff)
emu10kx: eliminate write only variables val, r and move i to loop
Sponsored by: Netflix (cherry picked from commit 8717135d3750b3d0c80c8783c547ffffe255c04f)
-rw-r--r--sys/dev/sound/pci/emu10kx.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/sound/pci/emu10kx.c b/sys/dev/sound/pci/emu10kx.c
index 784fd7e27ae1..85c200631ca2 100644
--- a/sys/dev/sound/pci/emu10kx.c
+++ b/sys/dev/sound/pci/emu10kx.c
@@ -732,7 +732,6 @@ emu_wr_p16vptr(struct emu_sc_info *sc, uint16_t chn, uint16_t reg, uint32_t data
static void
emu_wr_cbptr(struct emu_sc_info *sc, uint32_t data)
{
- uint32_t val;
/*
* 0x38 is IPE3 (CD S/PDIF interrupt pending register) on CA0102. Seems
@@ -740,9 +739,9 @@ emu_wr_cbptr(struct emu_sc_info *sc, uint32_t data)
* CA0108, with value(?) in top 16 bit, address(?) in low 16
*/
- val = emu_rd_nolock(sc, 0x38, 4);
+ emu_rd_nolock(sc, 0x38, 4);
emu_wr_nolock(sc, 0x38, data, 4);
- val = emu_rd_nolock(sc, 0x38, 4);
+ emu_rd_nolock(sc, 0x38, 4);
}
@@ -1267,10 +1266,9 @@ emu_valloc(struct emu_sc_info *sc)
void
emu_vfree(struct emu_sc_info *sc, struct emu_voice *v)
{
- int i, r;
mtx_lock(&sc->lock);
- for (i = 0; i < NUM_G; i++) {
+ for (int i = 0; i < NUM_G; i++) {
if (v == &sc->voice[i] && sc->voice[i].busy) {
v->busy = 0;
/*
@@ -1279,7 +1277,7 @@ emu_vfree(struct emu_sc_info *sc, struct emu_voice *v)
* this problem
*/
if (v->slave != NULL)
- r = emu_memfree(&sc->mem, v->vbuf);
+ emu_memfree(&sc->mem, v->vbuf);
}
}
mtx_unlock(&sc->lock);