From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org, linaro-kernel@lists.linaro.org,
Mark Brown <broonie@linaro.org>
Subject: Re: [PATCH] ASoC: adau1977: Fix truncation warning on 64 bit architectures
Date: Mon, 04 Aug 2014 09:15:30 +0200 [thread overview]
Message-ID: <53DF3312.8010304@metafoo.de> (raw)
In-Reply-To: <1406909979-12990-1-git-send-email-broonie@kernel.org>
On 08/01/2014 06:19 PM, Mark Brown wrote:
> From: Mark Brown <broonie@linaro.org>
>
> 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>
Thanks.
> ---
> sound/soc/codecs/adau1977.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/codecs/adau1977.c b/sound/soc/codecs/adau1977.c
> index fd55da7..70ab357 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);
>
prev parent reply other threads:[~2014-08-04 7:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-01 16:19 [PATCH] ASoC: adau1977: Fix truncation warning on 64 bit architectures Mark Brown
2014-08-04 7:15 ` Lars-Peter Clausen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53DF3312.8010304@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=broonie@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linaro-kernel@lists.linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).