From nobody Tue Apr 05 04:32:42 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 894471A91C49; Tue, 5 Apr 2022 04:32:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KXZWH0kMxz4gSx; Tue, 5 Apr 2022 04:32:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649133163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iluxr3lY14SkpidFrfpxPq54Wxro4eR5CMsAR/CUliY=; b=dadYiTw1/cl+weT3RaVOn7ifRGYT+Dt9OaY4gnfDCG8L4divy6//RmcnD/9eIBUJOP3QdU FVu7VH6ecpsn+pdwV87uKdl22PBznwgABFhuWpAEebP+wBQhMPfRN0pFeF9DD7W92Jo59E +k0j+Ubi0E+v8V5lQu/QBqKJ8o+sGCpRytaHwVC94L4PcjW6xAfITgd0tbj62Gccoc2DMQ 0yXi+Zs6qyhTwRSKhRYWlS8B0snJD50T3woRJnZZ9uV6YuvsH6fGUKfVGpn+0vpGVVPdsW Ynpvg27FZWb78uMo9cTtoiyg5daHmL8oQH3HkulbuUnEL9RzV3V09dmdMYXpzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E3AB21FB9F; Tue, 5 Apr 2022 04:32:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2354WgLO009363; Tue, 5 Apr 2022 04:32:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2354WgbW009362; Tue, 5 Apr 2022 04:32:42 GMT (envelope-from git) Date: Tue, 5 Apr 2022 04:32:42 GMT Message-Id: <202204050432.2354WgbW009362@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 8717135d3750 - main - emu10kx: eliminate write only variables val, r and move i to loop List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8717135d3750b3d0c80c8783c547ffffe255c04f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649133163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iluxr3lY14SkpidFrfpxPq54Wxro4eR5CMsAR/CUliY=; b=cS+xget3McKs0Ft4v+QjTM5/Fn5ZMOIzDMgyOJLc7U/jL+LV+7UvE1NrhPmpEQAUTRrZd5 Ix2UV8a4LZoc8thpnxgWXBaq4OyIFWfrrwJxQ+G+rgY6Ojre2gJYi0vD6vhFm4q13TH71v awU8chXUrOTuc+5lNq9MbVAa5g/R9rT94oXI18HhN1yP32csZhus10V81vNxj5yOY97CWZ 6DHpm6uqTxnFiMuHcYU9iNiY98XAqzBgBFkK99SYCjPNwAN1alzdCtK+L2J537cTsDGI8c 9A6RxKRLwoDbW9d2DDS8/PqWlfayv3WH44dEKN3FP+oSUWHpnrPwHuPtWvx+yQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649133163; a=rsa-sha256; cv=none; b=V/IKpsdVKh3Cx6jU7s8vZ9AMK7DTVDacpEZBJ+zCAOtMUc3hXxgFFenkgbGCzFCJUtrSkg 83MM6CJ+HYuU+jF6B24uIb+LT84kj1MDPVISrH5rTk+Ikk6bjJ2lXLlzePhch2n3UQ4RgF edn97q1D9VcUmVYvi/tVB2uN6iz9Fx2+D1p3DoWlPTr3+ZxHiXE8JQQTUpKfB12zfRJVqZ rD1+Eu/hYER+k8s2OTDFEyRF9GNt3eAkZCISOo5m72oNqOLU76B+wypILfqlV8t1ozr0AN 1dx7cNtBPrp6ff/B5wrDFBbRC3aCjnem9cNBGbZCXrO19NrzaKsPGfs+GME+9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8717135d3750b3d0c80c8783c547ffffe255c04f commit 8717135d3750b3d0c80c8783c547ffffe255c04f Author: Warner Losh AuthorDate: 2022-04-05 02:23:43 +0000 Commit: Warner Losh CommitDate: 2022-04-05 04:30:13 +0000 emu10kx: eliminate write only variables val, r and move i to loop Sponsored by: Netflix --- sys/dev/sound/pci/emu10kx.c | 10 ++++------ 1 file 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);