From patchwork Mon May 15 08:02:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 104372 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp1430522qge; Mon, 15 May 2017 01:04:22 -0700 (PDT) X-Received: by 10.28.103.3 with SMTP id b3mr2652531wmc.5.1494835462583; Mon, 15 May 2017 01:04:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494835462; cv=none; d=google.com; s=arc-20160816; b=slZmq5rpkXu0uXFRhSanlikGnBmcZr/KbA8S+mipivRY59CKIBUn91BikiN7JeivO7 +UZX0l0OyLYmGqsa3Kk2uUCYck3RZc5TtquBX36tBw/uKcK6C5paDVGoMxQC72tEl74z i7P1rgwXxIS895lREGVSNlt43NkNPwBAEJpp0JjOqTA7IKZcPpimLIgvlKVhvKmb4yZH x2uvHKblPD/zb49RZm0X2UQEP23whTJRRiMPlc85mBZZkiNeQecGD8W60frm72pOSJs5 xjDo7ytgDV8jZT6l+LNA3thlgyMYj6DihWN4BW4P86kczuZC75evJBn1xdvCHTafOCDC UR1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :delivered-to:arc-authentication-results; bh=0AKi4s08vFidhQhnA/CqFovHQW05JvDcrMLXdaruly4=; b=hT3NHh6OJGpXiCBXjd4oFphqBB53SJrMv9MDv3/bzJwYR8T5CYK0bR3GqclaLpGF16 0HPrdj9PpHGo/z65qKqGfBUrntrR+A4XbSql4vt/EypufsxyPxLbOT9eQ4MBOv+Fctun QBV+Hxbi0Hgy/O6QO1xOGHVL8WwYvI1rx3ByVWp8st7WzEDDyxzuk6K5tIWfN2Fk5lgX 6a4XZnwPtwzSUZJSnGDkzZJ1Y+lwf0LGc5RmnTmvVZkrC8TZerW5ghjOS6Y2YhoKV9Z4 +4JoboEeRUHExDZbOFAfEwdH98qyxs3ugQ+72lUDufnu+yTima2P6hulQGbmg09kNIRa JVJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id p78si10066023wmb.107.2017.05.15.01.04.22; Mon, 15 May 2017 01:04:22 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id E8619267352; Mon, 15 May 2017 10:03:23 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7DAD4267351; Mon, 15 May 2017 10:03:22 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, RP_MATCHES_RCVD, SPF_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mezzanine.sirena.org.uk (mezzanine.sirena.org.uk [106.187.55.193]) by alsa0.perex.cz (Postfix) with ESMTP id 6E9AE26731C for ; Mon, 15 May 2017 10:02:50 +0200 (CEST) Received: from [2001:470:1f1d:6b5:7e7a:91ff:fede:4a45] (helo=finisterre) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dAAxp-0001ih-7w; Mon, 15 May 2017 08:02:47 +0000 Received: from broonie by finisterre with local (Exim 4.89) (envelope-from ) id 1dAAxj-0002Qk-IC; Mon, 15 May 2017 17:02:39 +0900 From: Mark Brown To: Takashi Sakamoto In-Reply-To: <20170502133303.19622-3-o-takashi@sakamocchi.jp> Message-Id: Date: Mon, 15 May 2017 17:02:39 +0900 X-SA-Exim-Connect-IP: 2001:470:1f1d:6b5:7e7a:91ff:fede:4a45 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Cc: tiwai@suse.de, alsa-devel@alsa-project.org, broonie@kernel.org, Srinivas Kandagatla , ", alsa-devel@alsa-project.org"@alsa-project.org Subject: [alsa-devel] Applied "ASoC: codecs: msm8916: fix invalid cast to bool type" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org 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 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 Signed-off-by: Mark Brown --- sound/soc/codecs/msm8916-wcd-analog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.11.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel 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: