aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sound/pci
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2022-04-05 02:23:43 +0000
committerWarner Losh <imp@FreeBSD.org>2022-04-05 04:30:13 +0000
commit8717135d3750b3d0c80c8783c547ffffe255c04f (patch)
treebd2d27baa2bd2708ff2c30397b90b54434f01958 /sys/dev/sound/pci
parent451f54707a614757e2a0093876e30b68247a41da (diff)
downloadsrc-8717135d3750b3d0c80c8783c547ffffe255c04f.tar.gz
src-8717135d3750b3d0c80c8783c547ffffe255c04f.zip
emu10kx: eliminate write only variables val, r and move i to loop
Sponsored by: Netflix
Diffstat (limited to 'sys/dev/sound/pci')
-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 f40d60156a9c..9d321997487f 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);