]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: fsl: lpc3xxx-i2s: Remove set but not used variable 'savedbitclkrate'
authorYue Haibing <yuehaibing@huawei.com>
Wed, 31 Jul 2024 02:29:49 +0000 (10:29 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 31 Jul 2024 11:50:44 +0000 (12:50 +0100)
The variable savedbitclkrate is assigned and never used, so can be removed.

sound/soc/fsl/lpc3xxx-i2s.c:42:13: warning: variable â€˜savedbitclkrate’ set but not used [-Wunused-but-set-variable]

Fixes: 0959de657a10 ("ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs")
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Link: https://patch.msgid.link/20240731022949.135016-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/lpc3xxx-i2s.c

index af995ca081a37efb9604aa803ebdf1d0b81fd3f1..62ef624d6dd4c3701d3004d95c90b69f64e941f0 100644 (file)
@@ -39,7 +39,7 @@ static void __lpc3xxx_find_clkdiv(u32 *clkx, u32 *clky, int freq, int xbytes, u3
 {
        u32 i2srate;
        u32 idxx, idyy;
-       u32 savedbitclkrate, diff, trate, baseclk;
+       u32 diff, trate, baseclk;
 
        /* Adjust rate for sample size (bits) and 2 channels and offset for
         * divider in clock output
@@ -53,14 +53,12 @@ static void __lpc3xxx_find_clkdiv(u32 *clkx, u32 *clky, int freq, int xbytes, u3
 
        /* Find the best divider */
        *clkx = *clky = 0;
-       savedbitclkrate = 0;
        diff = ~0;
        for (idxx = 1; idxx < 0xFF; idxx++) {
                for (idyy = 1; idyy < 0xFF; idyy++) {
                        trate = (baseclk * idxx) / idyy;
                        if (abs(trate - i2srate) < diff) {
                                diff = abs(trate - i2srate);
-                               savedbitclkrate = trate;
                                *clkx = idxx;
                                *clky = idyy;
                        }