diff mbox series

[3.16-stable,22/87] ASoC: adau1977: Fix truncation warning on 64 bit architectures

Message ID 20170505194745.3627137-23-arnd@arndb.de
State New
Headers show
Series build warnings and errors | expand

Commit Message

Arnd Bergmann May 5, 2017, 7:46 p.m. UTC
From: Mark Brown <broonie@linaro.org>


Commit c675220dd64cfc59ba5ea20710bd76d67faad148 upstream.

Negating ADAU1977_BLOCK_POWER_SAI_LDO_EN creates an unsigned long constant
with all bits set which on 64 bit architectures needs to be truncated to
an unsigned int, generating a warning. Add an explicit cast since we know
this is OK.

Signed-off-by: Mark Brown <broonie@linaro.org>

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 sound/soc/codecs/adau1977.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.9.0
diff mbox series

Patch

diff --git a/sound/soc/codecs/adau1977.c b/sound/soc/codecs/adau1977.c
index fd55da7cb9d4..70ab35744aba 100644
--- a/sound/soc/codecs/adau1977.c
+++ b/sound/soc/codecs/adau1977.c
@@ -968,7 +968,7 @@  int adau1977_probe(struct device *dev, struct regmap *regmap,
 	if (adau1977->dvdd_reg)
 		power_off_mask = ~0;
 	else
-		power_off_mask = ~ADAU1977_BLOCK_POWER_SAI_LDO_EN;
+		power_off_mask = (unsigned int)~ADAU1977_BLOCK_POWER_SAI_LDO_EN;
 
 	ret = regmap_update_bits(adau1977->regmap, ADAU1977_REG_BLOCK_POWER_SAI,
 				power_off_mask, 0x00);