From patchwork Thu Aug 24 10:50:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 110891 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp5474579qge; Thu, 24 Aug 2017 03:50:58 -0700 (PDT) X-Received: by 10.28.193.65 with SMTP id r62mr3530135wmf.85.1503571857953; Thu, 24 Aug 2017 03:50:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503571857; cv=none; d=google.com; s=arc-20160816; b=zmQnqPi82ku+eAUsaNK2QUfDSTabXTlHJp0wXTXPUi3kaQn++LjrZE5F1/KG1FIuja Y3IKLNy2ekDTSZzn1UmWdTEsAtwpE/td8JB5hWdQKn/vpuMGRCpfNZ7AmIgQ5TB5XMDd NUuO33ZdQIK6iWp365roDX2GcMgJ9Eicm3tcU65vGG8xNtKoIOAGdfHfH9TVTR8hyGMs XAtJEFp86K2+gL9Nmw3eioS5n/BuNl5yh26wmijFewiFUeHeV0udME+MIWbpC7dVJnwf e2DTSI7wPOR5xGCG1ZOng45GNaj9A2GxyVPu6+XWHOWw6mjLVrsCItyGdHTK5/0K2jrw q3uA== 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 :dkim-signature:delivered-to:arc-authentication-results; bh=RjQYt7mmFzYeXyGG34shXfa/PjKA3w0rgVNOeLSeNJs=; b=h12uYi/kyjLUnFUOeT62YynFnjnoaYce2cyI09SOF3JxwtBE8lGYqaYTSYaacv5PIi m+L4J8aXe8xmO2+tD2tP3B23mACritNoFPi9UBJr+G3bJde2/P/HDK784LbwqDBTF7zD 6xSqGP2BGMAGAONgwznTF3YbUkp6MRa0So5C2VrFCEe/gybxbj7qSE+Ap+8UjY7vNY3v g8/ozW2jvQ3b18iJ/ED0gKCVFRgi1eI1WdIOWflMkEHvIeVY1w8fQGqOPx/KvmCEodGS DWGG9+5gIQYDKXtSOzXAJT+JmurBio9uOS0ArBQr4W1H5E975xpAHkWMUhc9RhVNgKNg QjWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=HsZNDbVg; 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 q135si3081708wmb.171.2017.08.24.03.50.57; Thu, 24 Aug 2017 03:50:57 -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; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=HsZNDbVg; 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 575F1267628; Thu, 24 Aug 2017 12:50:56 +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 629A4267631; Thu, 24 Aug 2017 12:50:55 +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=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RP_MATCHES_RCVD, SPF_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 6A24A2669F3 for ; Thu, 24 Aug 2017 12:50:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=07PzIXNNPXfG9vOC5sARB9lKQFTSEHDqH1AylvgMR08=; b=HsZNDbVgD1is m0zCBdb6iMHgR4G7bXKR/2vM8AocZvrRYKikZ02TG5WW8TNuiPmMxffQM3tuMM291Fw+mXT60i0wB 9+JCSu7vdsGumdBeGwcU8sFHStf5jV+rVHyVdi+gEvk6j+ENnfZzLpeohpkwxYCwS+rR88KQ6sUrq YGdWQ=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1dkpiF-0002s1-0V; Thu, 24 Aug 2017 10:50:11 +0000 Received: from broonie by debutante with local (Exim 4.89) (envelope-from ) id 1dkpiE-0000tb-Ii; Thu, 24 Aug 2017 11:50:10 +0100 From: Mark Brown To: Dan Carpenter In-Reply-To: <20170824100741.s4v24owbvocshr5n@mwanda> Message-Id: Date: Thu, 24 Aug 2017 11:50:10 +0100 Cc: alsa-devel@alsa-project.org, Axel Lin , Damien Riegel , kernel-janitors@vger.kernel.org, Liam Girdwood , Takashi Iwai , Mark Brown , Srinivas Kandagatla , Arvind Yadav , Takashi Sakamoto , Bhumika Goyal Subject: [alsa-devel] Applied "ASoC: codecs: msm8916-wcd-analog: always true condition" 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-wcd-analog: always true condition 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 56026714bd45fccda710114982789c5145285560 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 24 Aug 2017 13:07:41 +0300 Subject: [PATCH] ASoC: codecs: msm8916-wcd-analog: always true condition Static checkers complain that unsigned int val is always >= 0. The context is that snd_soc_read() returns -1U on error. This is harmless because we're checking that CDC_A_MBHC_RESULT_1_BTN_RESULT_MASK is not set, and it will always be set for -1U. I could have just removed the check against -1 but I preserved it because I thought it helped with readability. Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown --- sound/soc/codecs/msm8916-wcd-analog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.14.1 _______________________________________________ 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 f834a639b350..cd4d60ef4c77 100644 --- a/sound/soc/codecs/msm8916-wcd-analog.c +++ b/sound/soc/codecs/msm8916-wcd-analog.c @@ -949,7 +949,7 @@ static irqreturn_t mbhc_btn_release_irq_handler(int irq, void *arg) u32 val = snd_soc_read(codec, CDC_A_MBHC_RESULT_1); /* check if its BTN0 thats released */ - if ((val >= 0) && !(val & CDC_A_MBHC_RESULT_1_BTN_RESULT_MASK)) + if ((val != -1) && !(val & CDC_A_MBHC_RESULT_1_BTN_RESULT_MASK)) priv->mbhc_btn0_pressed = false; } else {