git: 85ecba9b20c1 - main - mwl: Remove write only variables, but leave hardware reads in place

From: Warner Losh <imp_at_FreeBSD.org>
Date: Wed, 06 Apr 2022 03:43:01 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=85ecba9b20c1bb36a84884d2ad2341fe9b791f43

commit 85ecba9b20c1bb36a84884d2ad2341fe9b791f43
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-04-06 02:01:33 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-04-06 03:42:06 +0000

    mwl: Remove write only variables, but leave hardware reads in place
    
    Sponsored by:           Netflix
---
 sys/dev/mwl/mwlhal.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/sys/dev/mwl/mwlhal.c b/sys/dev/mwl/mwlhal.c
index 4e341f49e85e..682152ff1ae2 100644
--- a/sys/dev/mwl/mwlhal.c
+++ b/sys/dev/mwl/mwlhal.c
@@ -2345,13 +2345,12 @@ mwl_hal_getdiagstate(struct mwl_hal *mh0, int request,
 static void
 mwlSendCmd(struct mwl_hal_priv *mh)
 {
-	uint32_t dummy;
 
 	bus_dmamap_sync(mh->mh_dmat, mh->mh_dmamap,
 	    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
 
 	WR4(mh, MACREG_REG_GEN_PTR, mh->mh_cmdaddr);
-	dummy = RD4(mh, MACREG_REG_INT_CODE);
+	RD4(mh, MACREG_REG_INT_CODE);
 
 	WR4(mh, MACREG_REG_H2A_INTERRUPT_EVENTS, MACREG_H2ARIC_BIT_DOOR_BELL);
 }
@@ -2446,18 +2445,17 @@ mwlFwReset(struct mwl_hal_priv *mh)
 static void
 mwlTriggerPciCmd(struct mwl_hal_priv *mh)
 {
-	uint32_t dummy;
 
 	bus_dmamap_sync(mh->mh_dmat, mh->mh_dmamap, BUS_DMASYNC_PREWRITE);
 
 	WR4(mh, MACREG_REG_GEN_PTR, mh->mh_cmdaddr);
-	dummy = RD4(mh, MACREG_REG_INT_CODE);
+	RD4(mh, MACREG_REG_INT_CODE);
 
 	WR4(mh, MACREG_REG_INT_CODE, 0x00);
-	dummy = RD4(mh, MACREG_REG_INT_CODE);
+	RD4(mh, MACREG_REG_INT_CODE);
 
 	WR4(mh, MACREG_REG_H2A_INTERRUPT_EVENTS, MACREG_H2ARIC_BIT_DOOR_BELL);
-	dummy = RD4(mh, MACREG_REG_INT_CODE);
+	RD4(mh, MACREG_REG_INT_CODE);
 }
 
 static int