All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org, broonie@kernel.org,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, ",
	alsa-devel@alsa-project.org"@alsa-project.org
Subject: Applied "ASoC: codecs: msm8916: fix invalid cast to bool type" to the asoc tree
Date: Mon, 15 May 2017 17:02:39 +0900	[thread overview]
Message-ID: <E1dAAxj-0002Qk-IC@finisterre> (raw)
In-Reply-To: <20170502133303.19622-3-o-takashi@sakamocchi.jp>

The patch

   ASoC: codecs: msm8916: fix invalid cast to bool type

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 9f3b777f1de9ff5d17f7259b8f7da5e9d4303e87 Mon Sep 17 00:00:00 2001
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Date: Tue, 2 May 2017 22:33:01 +0900
Subject: [PATCH] ASoC: codecs: msm8916: fix invalid cast to bool type

A function snd_soc_update_bits() is an application of
regmap_update_bits_base(). This function takes some arguments for bitmask
and new value, thus the arguments should be a type which has width.
However bool is used to variable for the argument. This brings truncation
and results in invalid operation.

This commit fixes this bug by using unsigned int type, instead of bool.
This bug is detected by sparse:

smsm8916-wcd-analog.c:809:43: warning: odd constant _Bool cast (40 becomes 1)
smsm8916-wcd-analog.c:814:43: warning: odd constant _Bool cast (40 becomes 1)

Fixes: 585e881e5b9e ("ASoC: codecs: Add msm8916-wcd analog codec")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/msm8916-wcd-analog.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/msm8916-wcd-analog.c b/sound/soc/codecs/msm8916-wcd-analog.c
index d8e8590746af..a78802920c3c 100644
--- a/sound/soc/codecs/msm8916-wcd-analog.c
+++ b/sound/soc/codecs/msm8916-wcd-analog.c
@@ -223,8 +223,8 @@ struct pm8916_wcd_analog_priv {
 	u16 codec_version;
 	struct clk *mclk;
 	struct regulator_bulk_data supplies[ARRAY_SIZE(supply_names)];
-	bool micbias1_cap_mode;
-	bool micbias2_cap_mode;
+	unsigned int micbias1_cap_mode;
+	unsigned int micbias2_cap_mode;
 };
 
 static const char *const adc2_mux_text[] = { "ZERO", "INP2", "INP3" };
@@ -285,7 +285,7 @@ static void pm8916_wcd_analog_micbias_enable(struct snd_soc_codec *codec)
 
 static int pm8916_wcd_analog_enable_micbias_ext(struct snd_soc_codec
 						 *codec, int event,
-						 int reg, u32 cap_mode)
+						 int reg, unsigned int cap_mode)
 {
 	switch (event) {
 	case SND_SOC_DAPM_POST_PMU:
-- 
2.11.0

  parent reply	other threads:[~2017-05-15  8:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-02 13:32 [PATCH 0/4] ALSA/ASoC: fix after merging ASoC PR for v4.12-rc1 Takashi Sakamoto
2017-05-02 13:33 ` [PATCH 1/4] ASoC: codecs: da7213: fix invalid usage of bitwise operation in loop condition Takashi Sakamoto
2017-05-02 14:02   ` Adam Thomson
2017-05-02 13:33 ` [PATCH 2/4] ASoC: codecs: msm8916: fix invalid cast to bool type Takashi Sakamoto
2017-05-14  9:59   ` Mark Brown
2017-05-15  8:14     ` Takashi Iwai
2017-05-15  8:17       ` Mark Brown
2017-05-15  8:17         ` Mark Brown
2017-05-15  8:43         ` Takashi Iwai
2017-05-15  8:02   ` Mark Brown [this message]
2017-05-02 13:33 ` [PATCH 3/4] ASoC: hisilicon: localize functions without external linkage Takashi Sakamoto
2017-05-15  8:02   ` Applied "ASoC: hisilicon: localize functions without external linkage" to the asoc tree Mark Brown
2017-05-02 13:33 ` [PATCH 4/4] ASoC: intel: atom: localize variable without external linkage Takashi Sakamoto
2017-05-15  8:02   ` Applied "ASoC: intel: atom: localize variable without external linkage" to the asoc tree Mark Brown

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=E1dAAxj-0002Qk-IC@finisterre \
    --to=broonie@kernel.org \
    --cc=", alsa-devel@alsa-project.org"@alsa-project.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=o-takashi@sakamocchi.jp \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tiwai@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.