From: Mark Brown broonie@linaro.org
On 64 bit systems ~FSL_SAI_CR2_SYNC generates a constant that won't fit in an unsigned int, causing GCC to warn. Use a cast to make the truncation explicit and silence the warning.
Signed-off-by: Mark Brown broonie@linaro.org --- sound/soc/fsl/fsl_sai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index faa0497..799917c 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -334,7 +334,7 @@ static int fsl_sai_trigger(struct snd_pcm_substream *substream, int cmd, * used by both the transmitter and receiver. */ regmap_update_bits(sai->regmap, FSL_SAI_TCR2, FSL_SAI_CR2_SYNC, - ~FSL_SAI_CR2_SYNC); + (unsigned int)~FSL_SAI_CR2_SYNC); regmap_update_bits(sai->regmap, FSL_SAI_RCR2, FSL_SAI_CR2_SYNC, FSL_SAI_CR2_SYNC);
Thank you for the fix, sir.
On Sat, Aug 2, 2014 at 12:37 AM, Mark Brown broonie@kernel.org wrote:
From: Mark Brown broonie@linaro.org
On 64 bit systems ~FSL_SAI_CR2_SYNC generates a constant that won't fit in an unsigned int, causing GCC to warn. Use a cast to make the truncation explicit and silence the warning.
Signed-off-by: Mark Brown broonie@linaro.org
sound/soc/fsl/fsl_sai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index faa0497..799917c 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -334,7 +334,7 @@ static int fsl_sai_trigger(struct snd_pcm_substream
*substream, int cmd,
* used by both the transmitter and receiver. */ regmap_update_bits(sai->regmap, FSL_SAI_TCR2, FSL_SAI_CR2_SYNC,
~FSL_SAI_CR2_SYNC);
(unsigned int)~FSL_SAI_CR2_SYNC);
It actually should be replaced with:
regmap_update_bits(sai->regmap, FSL_SAI_TCR2, FSL_SAI_CR2_SYNC, 0);
The code just needs to clear SYNC for Tx while setting SYNC for Rx.
Thank you, Nicolin
regmap_update_bits(sai->regmap, FSL_SAI_RCR2, FSL_SAI_CR2_SYNC, FSL_SAI_CR2_SYNC);
-- 2.0.0
linaro-kernel@lists.linaro.org