Commit cf3804db authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ASoC: tegra: tegra20_das: remove always-true comparison

Fix W=1 warning:

sound/soc//tegra/tegra20_das.c:101:11: warning:
comparison of unsigned expression >= 0 is always true [-Wtype-limits]
  101 |  if ((reg >= TEGRA20_DAS_DAP_CTRL_SEL) &&
      |           ^~
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarJon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20200707190612.97799-5-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent b023cc4c
...@@ -98,8 +98,7 @@ EXPORT_SYMBOL_GPL(tegra20_das_connect_dac_to_dap); ...@@ -98,8 +98,7 @@ EXPORT_SYMBOL_GPL(tegra20_das_connect_dac_to_dap);
static bool tegra20_das_wr_rd_reg(struct device *dev, unsigned int reg) static bool tegra20_das_wr_rd_reg(struct device *dev, unsigned int reg)
{ {
if ((reg >= TEGRA20_DAS_DAP_CTRL_SEL) && if (reg <= LAST_REG(DAP_CTRL_SEL))
(reg <= LAST_REG(DAP_CTRL_SEL)))
return true; return true;
if ((reg >= TEGRA20_DAS_DAC_INPUT_DATA_CLK_SEL) && if ((reg >= TEGRA20_DAS_DAC_INPUT_DATA_CLK_SEL) &&
(reg <= LAST_REG(DAC_INPUT_DATA_CLK_SEL))) (reg <= LAST_REG(DAC_INPUT_DATA_CLK_SEL)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment