Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Apr 2022 00:03:49 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 92e7c96648b3 - main - pcm envy24: Remove some dead code and associated unused variables.
Message-ID:  <202204080003.23803nv1086869@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=92e7c96648b3d7226be137384710ab4b27a51be9

commit 92e7c96648b3d7226be137384710ab4b27a51be9
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-08 00:01:29 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-08 00:01:29 +0000

    pcm envy24: Remove some dead code and associated unused variables.
    
    The dead code was commented out in the initial import and hasn't
    changed since.
---
 sys/dev/sound/pci/envy24.c   | 16 +++-------------
 sys/dev/sound/pci/envy24ht.c | 16 +++-------------
 2 files changed, 6 insertions(+), 26 deletions(-)

diff --git a/sys/dev/sound/pci/envy24.c b/sys/dev/sound/pci/envy24.c
index 36f453bd9252..7c1ba58b5708 100644
--- a/sys/dev/sound/pci/envy24.c
+++ b/sys/dev/sound/pci/envy24.c
@@ -1202,9 +1202,9 @@ envy24_gethwptr(struct sc_info *sc, int dir)
 static void
 envy24_updintr(struct sc_info *sc, int dir)
 {
-	int regptr, regintr;
+	int regintr;
 	u_int32_t mask, intr;
-	u_int32_t ptr, size, cnt;
+	u_int32_t cnt;
 	u_int16_t blk;
 
 #if(0)
@@ -1212,28 +1212,18 @@ envy24_updintr(struct sc_info *sc, int dir)
 #endif
 	if (dir == PCMDIR_PLAY) {
 		blk = sc->blk[0];
-		size = sc->psize / 4;
-		regptr = ENVY24_MT_PCNT;
 		regintr = ENVY24_MT_PTERM;
 		mask = ~ENVY24_MT_INT_PMASK;
 	}
 	else {
 		blk = sc->blk[1];
-		size = sc->rsize / 4;
-		regptr = ENVY24_MT_RCNT;
 		regintr = ENVY24_MT_RTERM;
 		mask = ~ENVY24_MT_INT_RMASK;
 	}
 
-	ptr = size - envy24_rdmt(sc, regptr, 2) - 1;
-	/*
-	cnt = blk - ptr % blk - 1;
-	if (cnt == 0)
-		cnt = blk - 1;
-	*/
 	cnt = blk - 1;
 #if(0)
-	device_printf(sc->dev, "envy24_updintr():ptr = %d, blk = %d, cnt = %d\n", ptr, blk, cnt);
+	device_printf(sc->dev, "envy24_updintr():blk = %d, cnt = %d\n", blk, cnt);
 #endif
 	envy24_wrmt(sc, regintr, cnt, 2);
 	intr = envy24_rdmt(sc, ENVY24_MT_INT, 1);
diff --git a/sys/dev/sound/pci/envy24ht.c b/sys/dev/sound/pci/envy24ht.c
index d794fe605967..608afe33ca9f 100644
--- a/sys/dev/sound/pci/envy24ht.c
+++ b/sys/dev/sound/pci/envy24ht.c
@@ -1156,9 +1156,9 @@ envy24ht_gethwptr(struct sc_info *sc, int dir)
 static void
 envy24ht_updintr(struct sc_info *sc, int dir)
 {
-	int regptr, regintr;
+	int regintr;
 	u_int32_t mask, intr;
-	u_int32_t ptr, size, cnt;
+	u_int32_t cnt;
 	u_int16_t blk;
 
 #if(0)
@@ -1166,28 +1166,18 @@ envy24ht_updintr(struct sc_info *sc, int dir)
 #endif
 	if (dir == PCMDIR_PLAY) {
 		blk = sc->blk[0];
-		size = sc->psize / 4;
-		regptr = ENVY24HT_MT_PCNT;
 		regintr = ENVY24HT_MT_PTERM;
 		mask = ~ENVY24HT_MT_INT_PMASK;
 	}
 	else {
 		blk = sc->blk[1];
-		size = sc->rsize / 4;
-		regptr = ENVY24HT_MT_RCNT;
 		regintr = ENVY24HT_MT_RTERM;
 		mask = ~ENVY24HT_MT_INT_RMASK;
 	}
 
-	ptr = size - envy24ht_rdmt(sc, regptr, 2) - 1;
-	/*
-	cnt = blk - ptr % blk - 1;
-	if (cnt == 0)
-		cnt = blk - 1;
-	*/
 	cnt = blk - 1;
 #if(0)
-	device_printf(sc->dev, "envy24ht_updintr():ptr = %d, blk = %d, cnt = %d\n", ptr, blk, cnt);
+	device_printf(sc->dev, "envy24ht_updintr():blk = %d, cnt = %d\n", blk, cnt);
 #endif
 	envy24ht_wrmt(sc, regintr, cnt, 2);
 	intr = envy24ht_rdmt(sc, ENVY24HT_MT_INT_MASK, 1);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202204080003.23803nv1086869>