[PATCH v2 21/28] ASoC: ti: omap-mcbsp-st: Remove set, but unused variable 'w'

From: Lee Jones
Date: Tue Jul 07 2020 - 10:38:50 EST


Looks like 'w' has remained unchecked since the driver's inception.

Fixes the following W=1 kernel build warning(s):

sound/soc/ti/omap-mcbsp-st.c: In function âomap_mcbsp_st_chgainâ:
sound/soc/ti/omap-mcbsp-st.c:145:6: warning: variable âwâ set but not used [-Wunused-but-set-variable]

Peter suggested that the whole read can be removed, so that's
been done too.

Cc: Peter Ujfalusi <peter.ujfalusi@xxxxxx>
Cc: Jarkko Nikula <jarkko.nikula@xxxxxxxxxx>
Cc: Samuel Ortiz <samuel.ortiz@xxxxxxxxx>
Cc: linux-omap@xxxxxxxxxxxxxxx
Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
---
sound/soc/ti/omap-mcbsp-st.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/sound/soc/ti/omap-mcbsp-st.c b/sound/soc/ti/omap-mcbsp-st.c
index 5a32b54bbf3bb..0bc7d26c660aa 100644
--- a/sound/soc/ti/omap-mcbsp-st.c
+++ b/sound/soc/ti/omap-mcbsp-st.c
@@ -142,11 +142,8 @@ static void omap_mcbsp_st_fir_write(struct omap_mcbsp *mcbsp, s16 *fir)

static void omap_mcbsp_st_chgain(struct omap_mcbsp *mcbsp)
{
- u16 w;
struct omap_mcbsp_st_data *st_data = mcbsp->st_data;

- w = MCBSP_ST_READ(mcbsp, SSELCR);
-
MCBSP_ST_WRITE(mcbsp, SGAINCR, ST_CH0GAIN(st_data->ch0gain) |
ST_CH1GAIN(st_data->ch1gain));
}
--
2.25.1