From patchwork Sat Jan 5 02:02:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 10749071 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2F7A813B5 for ; Sat, 5 Jan 2019 02:11:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D8BF2882C for ; Sat, 5 Jan 2019 02:11:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1194B28830; Sat, 5 Jan 2019 02:11:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 63AAC2882F for ; Sat, 5 Jan 2019 02:11:43 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 4F86C267D1A; Sat, 5 Jan 2019 03:11:40 +0100 (CET) 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 64896267CC0; Sat, 5 Jan 2019 03:04:26 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by alsa0.perex.cz (Postfix) with ESMTP id 75E07267C83 for ; Sat, 5 Jan 2019 03:04:02 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jan 2019 18:04:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,441,1539673200"; d="scan'208";a="307634744" Received: from kgandham-mobl1.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.251.139.169]) by fmsmga006.fm.intel.com with ESMTP; 04 Jan 2019 18:03:57 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Date: Fri, 4 Jan 2019 20:02:38 -0600 Message-Id: <20190105020249.8639-11-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190105020249.8639-1-pierre-louis.bossart@linux.intel.com> References: <20190105020249.8639-1-pierre-louis.bossart@linux.intel.com> Cc: Oder Chiou , tiwai@suse.de, open list , Takashi Iwai , Pierre-Louis Bossart , Liam Girdwood , liam.r.girdwood@linux.intel.com, broonie@kernel.org, Bard Liao Subject: [alsa-devel] [PATCH 10/21] ASoC: rt274: fix boolean tests 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 X-Virus-Scanned: ClamAV using ClamSMTP Reported by Coccinelle: sound/soc/codecs/rt274.c:958:6-8: WARNING: Comparison to bool sound/soc/codecs/rt274.c:961:6-9: WARNING: Comparison to bool sound/soc/codecs/rt274.c:384:5-7: WARNING: Comparison to bool sound/soc/codecs/rt274.c:387:5-8: WARNING: Comparison to bool Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt274.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/rt274.c b/sound/soc/codecs/rt274.c index e2855ab9a2c6..9e88f7b25d38 100644 --- a/sound/soc/codecs/rt274.c +++ b/sound/soc/codecs/rt274.c @@ -381,10 +381,10 @@ static void rt274_jack_detect_work(struct work_struct *work) if (rt274_jack_detect(rt274, &hp, &mic) < 0) return; - if (hp == true) + if (hp) status |= SND_JACK_HEADPHONE; - if (mic == true) + if (mic) status |= SND_JACK_MICROPHONE; snd_soc_jack_report(rt274->jack, status, @@ -955,10 +955,10 @@ static irqreturn_t rt274_irq(int irq, void *data) ret = rt274_jack_detect(rt274, &hp, &mic); if (ret == 0) { - if (hp == true) + if (hp) status |= SND_JACK_HEADPHONE; - if (mic == true) + if (mic) status |= SND_JACK_MICROPHONE; snd_soc_jack_report(rt274->jack, status,