Bug 84351

Summary: sound/soc/fsl/fsl_sai.c:143: shift overflow problems
Product: Drivers Reporter: David Binderman (dcb314)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: RESOLVED CODE_FIX    
Severity: normal CC: alan, tiwai
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.17-rc4 Subsystem:
Regression: No Bisected commit-id:

Description David Binderman 2014-09-11 20:44:26 UTC
sound/soc/fsl/fsl_sai.c:143:7: warning: signed shift result (0x3FC000000) requires 35 bits to represent, but 'int' only has 32 bits [-Wshift-overflow]

    regmap_update_bits(sai->regmap, FSL_SAI_xCR2(tx),
               FSL_SAI_CR2_MSEL_MASK, val_cr2);
Comment 1 Takashi Iwai 2015-06-02 18:16:39 UTC
Could you elaborate which macro will be expanded to too large?
Comment 2 David Binderman 2015-06-02 19:27:24 UTC
sound/soc/fsl/fsl_sai.h:#define FSL_SAI_CR2_MSEL_MASK	(0xff << 26)
Comment 3 Takashi Iwai 2015-06-03 12:51:14 UTC
Thanks, now it's clearer.  I submitted the patch.
Comment 4 Takashi Iwai 2015-06-11 16:16:08 UTC
The fix was already merged in ASoC tree.