diff mbox

[v2,3/3] ASoC: rt5677: Remove never used variables

Message ID 20170718173419.65980-4-andriy.shevchenko@linux.intel.com (mailing list archive)
State Accepted
Commit c0d1cb8366bab9963822c27b0d40cb8b32928cdc
Headers show

Commit Message

Andy Shevchenko July 18, 2017, 5:34 p.m. UTC
There are two variables that have never been used.

sound/soc/codecs/rt5677.c:785:35: warning: ‘in_vol_tlv’ defined but not used [-Wunused-const-variable=]
static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0);

sound/soc/codecs/rt5677.c:783:35: warning: ‘out_vol_tlv’ defined but not used [-Wunused-const-variable=]
static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0);

Simple remove them.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 sound/soc/codecs/rt5677.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Mark Brown July 19, 2017, 11:24 a.m. UTC | #1
On Tue, Jul 18, 2017 at 08:34:19PM +0300, Andy Shevchenko wrote:
> There are two variables that have never been used.
> 
> sound/soc/codecs/rt5677.c:785:35: warning: ‘in_vol_tlv’ defined but not used [-Wunused-const-variable=]
> static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0);
> 
> sound/soc/codecs/rt5677.c:783:35: warning: ‘out_vol_tlv’ defined but not used [-Wunused-const-variable=]
> static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0);
> 
> Simple remove them.

Are we sure this doesn't mean something has the wrong TLV or a missing
TLV?
Andy Shevchenko July 19, 2017, 11:48 a.m. UTC | #2
On Wed, 2017-07-19 at 12:24 +0100, Mark Brown wrote:
> On Tue, Jul 18, 2017 at 08:34:19PM +0300, Andy Shevchenko wrote:
> > There are two variables that have never been used.
> > 
> > sound/soc/codecs/rt5677.c:785:35: warning: ‘in_vol_tlv’ defined but
> > not used [-Wunused-const-variable=]
> > static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0);
> > 
> > sound/soc/codecs/rt5677.c:783:35: warning: ‘out_vol_tlv’ defined but
> > not used [-Wunused-const-variable=]
> > static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0);
> > 
> > Simple remove them.
> 
> Are we sure this doesn't mean something has the wrong TLV or a missing
> TLV?

Good question.

If it so, it should not have been working (properly) at the beginning.

Guys from Realtek, can you comment on this?
Oder Chiou July 20, 2017, 1:47 a.m. UTC | #3
> On Wed, 2017-07-19 at 12:24 +0100, Mark Brown wrote:

> > On Tue, Jul 18, 2017 at 08:34:19PM +0300, Andy Shevchenko wrote:

> > > There are two variables that have never been used.

> > >

> > > sound/soc/codecs/rt5677.c:785:35: warning: ‘in_vol_tlv’ defined but

> > > not used [-Wunused-const-variable=] static const

> > > DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0);

> > >

> > > sound/soc/codecs/rt5677.c:783:35: warning: ‘out_vol_tlv’ defined but

> > > not used [-Wunused-const-variable=] static const

> > > DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0);

> > >

> > > Simple remove them.

> >

> > Are we sure this doesn't mean something has the wrong TLV or a missing

> > TLV?

> 

> Good question.

> 

> If it so, it should not have been working (properly) at the beginning.

> 

> Guys from Realtek, can you comment on this?

> 

They are seemed redundant definitions, thanks.
diff mbox

Patch

diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c
index a3cce57739c3..9e9de0e274ea 100644
--- a/sound/soc/codecs/rt5677.c
+++ b/sound/soc/codecs/rt5677.c
@@ -780,9 +780,7 @@  static int rt5677_set_dsp_vad(struct snd_soc_codec *codec, bool on)
 	return 0;
 }
 
-static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0);
 static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -6525, 75, 0);
-static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0);
 static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -1725, 75, 0);
 static const DECLARE_TLV_DB_SCALE(adc_bst_tlv, 0, 1200, 0);
 static const DECLARE_TLV_DB_SCALE(st_vol_tlv, -4650, 150, 0);