Message ID | 20240907-asoc-fix-mt8365-build-v1-2-7ad0bac20161@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 1b084d8e3b98ca460b815cff14617719ebe605ad |
Headers | show |
Series | ASoC: mt8365: Fix -Werror builds | expand |
Il 07/09/24 02:53, Mark Brown ha scritto: > The regmap APIs take unsigned ints not unsigned longs so casting their > arguments to unsigned longs is not a good choice, the constants being > cast here are all unsigned ints anyway. > > Signed-off-by: Mark Brown <broonie@kernel.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com> On 07/09/2024 02:53, Mark Brown wrote: > The regmap APIs take unsigned ints not unsigned longs so casting their > arguments to unsigned longs is not a good choice, the constants being > cast here are all unsigned ints anyway. > > Signed-off-by: Mark Brown <broonie@kernel.org> > --- > sound/soc/mediatek/mt8365/mt8365-dai-i2s.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/sound/soc/mediatek/mt8365/mt8365-dai-i2s.c b/sound/soc/mediatek/mt8365/mt8365-dai-i2s.c > index 5003fe5e5ccf..6b4d8b7e24ca 100644 > --- a/sound/soc/mediatek/mt8365/mt8365-dai-i2s.c > +++ b/sound/soc/mediatek/mt8365/mt8365-dai-i2s.c > @@ -385,7 +385,7 @@ static int mt8365_afe_set_2nd_i2s_asrc(struct mtk_base_afe *afe, > /* disable IIR coeff SRAM access */ > regmap_update_bits(afe->regmap, AFE_ASRC_2CH_CON0, > COEFF_SRAM_CTRL, > - (unsigned long)~COEFF_SRAM_CTRL); > + ~COEFF_SRAM_CTRL); > regmap_update_bits(afe->regmap, AFE_ASRC_2CH_CON2, > CLR_IIR_HISTORY | IIR_EN | IIR_STAGE_MASK, > CLR_IIR_HISTORY | IIR_EN | > @@ -393,7 +393,7 @@ static int mt8365_afe_set_2nd_i2s_asrc(struct mtk_base_afe *afe, > } else { > /* disable IIR */ > regmap_update_bits(afe->regmap, AFE_ASRC_2CH_CON2, > - IIR_EN, (unsigned long)~IIR_EN); > + IIR_EN, ~IIR_EN); > } > > /* CON3 setting (RX OFS) */ > @@ -456,7 +456,7 @@ static int mt8365_afe_set_2nd_i2s_asrc_enable(struct mtk_base_afe *afe, > ASM_ON, ASM_ON); > else > regmap_update_bits(afe->regmap, AFE_ASRC_2CH_CON0, > - ASM_ON, (unsigned long)~ASM_ON); > + ASM_ON, ~ASM_ON); > return 0; > } > >
diff --git a/sound/soc/mediatek/mt8365/mt8365-dai-i2s.c b/sound/soc/mediatek/mt8365/mt8365-dai-i2s.c index 5003fe5e5ccf..6b4d8b7e24ca 100644 --- a/sound/soc/mediatek/mt8365/mt8365-dai-i2s.c +++ b/sound/soc/mediatek/mt8365/mt8365-dai-i2s.c @@ -385,7 +385,7 @@ static int mt8365_afe_set_2nd_i2s_asrc(struct mtk_base_afe *afe, /* disable IIR coeff SRAM access */ regmap_update_bits(afe->regmap, AFE_ASRC_2CH_CON0, COEFF_SRAM_CTRL, - (unsigned long)~COEFF_SRAM_CTRL); + ~COEFF_SRAM_CTRL); regmap_update_bits(afe->regmap, AFE_ASRC_2CH_CON2, CLR_IIR_HISTORY | IIR_EN | IIR_STAGE_MASK, CLR_IIR_HISTORY | IIR_EN | @@ -393,7 +393,7 @@ static int mt8365_afe_set_2nd_i2s_asrc(struct mtk_base_afe *afe, } else { /* disable IIR */ regmap_update_bits(afe->regmap, AFE_ASRC_2CH_CON2, - IIR_EN, (unsigned long)~IIR_EN); + IIR_EN, ~IIR_EN); } /* CON3 setting (RX OFS) */ @@ -456,7 +456,7 @@ static int mt8365_afe_set_2nd_i2s_asrc_enable(struct mtk_base_afe *afe, ASM_ON, ASM_ON); else regmap_update_bits(afe->regmap, AFE_ASRC_2CH_CON0, - ASM_ON, (unsigned long)~ASM_ON); + ASM_ON, ~ASM_ON); return 0; }
The regmap APIs take unsigned ints not unsigned longs so casting their arguments to unsigned longs is not a good choice, the constants being cast here are all unsigned ints anyway. Signed-off-by: Mark Brown <broonie@kernel.org> --- sound/soc/mediatek/mt8365/mt8365-dai-i2s.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)