From patchwork Tue Mar 2 21:25:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112281 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E9CEC433E0 for ; Tue, 2 Mar 2021 21:27:31 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2A14764F2E for ; Tue, 2 Mar 2021 21:27:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2A14764F2E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1620B1933; Tue, 2 Mar 2021 22:26:38 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1620B1933 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720448; bh=zJSNBOvPxaH+E7XZpPM5QUID9YrJxwHYHC1En1S7WTs=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=VvcqWz6eu8VdvT3b6XGt9AOVdUN2SeJTzp9NSZEciestRFOMgwCLdiDWNlQvU2uDw zmWR/HuL/CILALPMvy0JszUJ/bRVToNfNy9nSeE0pqkjtPg83MV+jvj8jRTT2emNcb vQaom5RSiKtBn64phV/7jiA4vQ5qmUyWAqH1sAsQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 87C84F80431; Tue, 2 Mar 2021 22:26:13 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 879DCF80227; Tue, 2 Mar 2021 22:26:12 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5A170F80227 for ; Tue, 2 Mar 2021 22:26:04 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5A170F80227 IronPort-SDR: CMVRvOYCkpahg+BDBOR/A2Nqm5eb3c0bSCr54oepnAUA1AKo6jg081bU+FkV9LzWMbXOAeHVpp U8/JX/6sBUhw== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="183603747" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="183603747" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:03 -0800 IronPort-SDR: FAfiMJfWPeSetIMkqIkRenYMJHhQ1fuu+a4ONvfUl3Ck/M+4yEyuMAwO3VU1Jx9f1Yj+PMJPaT xtUGvz1oGCbQ== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223343" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:25:39 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 01/24] ASoC: rt1011: use logical OR Date: Tue, 2 Mar 2021 15:25:04 -0600 Message-Id: <20210302212527.55158-2-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck complains a lot about mixing booleans and bitwise operations. There is no good reason to use && and |, fix with || Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt1011.c | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/sound/soc/codecs/rt1011.c b/sound/soc/codecs/rt1011.c index 6877be5f36b9..b9dadc8243b3 100644 --- a/sound/soc/codecs/rt1011.c +++ b/sound/soc/codecs/rt1011.c @@ -1089,25 +1089,21 @@ static int rt1011_recv_spk_mode_put(struct snd_kcontrol *kcontrol, static bool rt1011_validate_bq_drc_coeff(unsigned short reg) { - if ((reg == RT1011_DAC_SET_1) | - (reg >= RT1011_ADC_SET && reg <= RT1011_ADC_SET_1) | - (reg == RT1011_ADC_SET_4) | (reg == RT1011_ADC_SET_5) | - (reg == RT1011_MIXER_1) | - (reg == RT1011_A_TIMING_1) | (reg >= RT1011_POWER_7 && - reg <= RT1011_POWER_8) | - (reg == RT1011_CLASS_D_POS) | (reg == RT1011_ANALOG_CTRL) | - (reg >= RT1011_SPK_TEMP_PROTECT_0 && - reg <= RT1011_SPK_TEMP_PROTECT_6) | - (reg >= RT1011_SPK_PRO_DC_DET_5 && reg <= RT1011_BAT_GAIN_1) | - (reg >= RT1011_RT_DRC_CROSS && reg <= RT1011_RT_DRC_POS_8) | - (reg >= RT1011_CROSS_BQ_SET_1 && reg <= RT1011_BQ_10_A2_15_0) | - (reg >= RT1011_SMART_BOOST_TIMING_1 && - reg <= RT1011_SMART_BOOST_TIMING_36) | - (reg == RT1011_SINE_GEN_REG_1) | - (reg >= RT1011_STP_ALPHA_RECIPROCAL_MSB && - reg <= RT1011_BQ_6_PARAMS_CHECK_5) | - (reg >= RT1011_BQ_7_PARAMS_CHECK_1 && - reg <= RT1011_BQ_10_PARAMS_CHECK_5)) + if ((reg == RT1011_DAC_SET_1) || + (reg >= RT1011_ADC_SET && reg <= RT1011_ADC_SET_1) || + (reg == RT1011_ADC_SET_4) || (reg == RT1011_ADC_SET_5) || + (reg == RT1011_MIXER_1) || + (reg == RT1011_A_TIMING_1) || + (reg >= RT1011_POWER_7 && reg <= RT1011_POWER_8) || + (reg == RT1011_CLASS_D_POS) || (reg == RT1011_ANALOG_CTRL) || + (reg >= RT1011_SPK_TEMP_PROTECT_0 && reg <= RT1011_SPK_TEMP_PROTECT_6) || + (reg >= RT1011_SPK_PRO_DC_DET_5 && reg <= RT1011_BAT_GAIN_1) || + (reg >= RT1011_RT_DRC_CROSS && reg <= RT1011_RT_DRC_POS_8) || + (reg >= RT1011_CROSS_BQ_SET_1 && reg <= RT1011_BQ_10_A2_15_0) || + (reg >= RT1011_SMART_BOOST_TIMING_1 && reg <= RT1011_SMART_BOOST_TIMING_36) || + (reg == RT1011_SINE_GEN_REG_1) || + (reg >= RT1011_STP_ALPHA_RECIPROCAL_MSB && reg <= RT1011_BQ_6_PARAMS_CHECK_5) || + (reg >= RT1011_BQ_7_PARAMS_CHECK_1 && reg <= RT1011_BQ_10_PARAMS_CHECK_5)) return true; return false; From patchwork Tue Mar 2 21:25:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112289 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4681FC433DB for ; Tue, 2 Mar 2021 21:29:05 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6EABC64F2E for ; Tue, 2 Mar 2021 21:29:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6EABC64F2E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id CEB82193C; Tue, 2 Mar 2021 22:28:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CEB82193C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720542; bh=DF/soS/vn/lAT3UlyAPe3RoFZ+ptO7MfGf8HQSYDL3Q=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=nW33PWjCZnh32wKospK3murKYxodJ4HnU9mB33HPyQ3x9Yt/7lNO0ZQwPBZJFPlhZ Fekbdo3Ut2M8WXFgw3r+XtPy9FbNT4xh9/lBw2GdCiWdgQD92NpCdIz4Kl2xU5T2rU oDhBZlCkThQmKbwPM8Moxev27i/UallgleLe5f/A= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 92077F804E2; Tue, 2 Mar 2021 22:26:20 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 12CACF804B2; Tue, 2 Mar 2021 22:26:17 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A6F3AF802A9 for ; Tue, 2 Mar 2021 22:26:07 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A6F3AF802A9 IronPort-SDR: eKPcMq2QIOdOc3fqk+73UAd34u7mEcGd6u4N3oeXYVp3NTrO0vGHzQ+ht/Wcyxvrl0zgbS+Ocy ryhGfw4phNrQ== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="183603748" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="183603748" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:03 -0800 IronPort-SDR: LWAC+DNEjYk1y6D8KQDRtEHIpYX4bOEWIDBWQG1h8Vl4CZ/ZyNqeqU6c9PIIsWnpSgMxkQbIun njsEva9xgksQ== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223360" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:25:48 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 02/24] ASoC: rt1011: remove redundant test Date: Tue, 2 Mar 2021 15:25:05 -0600 Message-Id: <20210302212527.55158-3-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warning: sound/soc/codecs/rt1011.c:1994:6: style: Condition 'tx_slotnum' is always true [knownConditionTrueFalse] if (tx_slotnum) ^ sound/soc/codecs/rt1011.c:1895:24: note: Assuming that condition '!tx_slotnum' is not redundant if (tx_slotnum > 2 || !tx_slotnum) { ^ sound/soc/codecs/rt1011.c:1994:6: note: Condition 'tx_slotnum' is always true if (tx_slotnum) ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt1011.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/rt1011.c b/sound/soc/codecs/rt1011.c index b9dadc8243b3..39a9f17ca0a9 100644 --- a/sound/soc/codecs/rt1011.c +++ b/sound/soc/codecs/rt1011.c @@ -1987,10 +1987,10 @@ static int rt1011_set_tdm_slot(struct snd_soc_dai *dai, RT1011_TDM_I2S_DOCK_EN_1_MASK, tdm_en); snd_soc_component_update_bits(component, RT1011_TDM2_SET_2, RT1011_TDM_I2S_DOCK_EN_2_MASK, tdm_en); - if (tx_slotnum) - snd_soc_component_update_bits(component, RT1011_TDM_TOTAL_SET, - RT1011_ADCDAT1_PIN_CONFIG | RT1011_ADCDAT2_PIN_CONFIG, - RT1011_ADCDAT1_OUTPUT | RT1011_ADCDAT2_OUTPUT); + + snd_soc_component_update_bits(component, RT1011_TDM_TOTAL_SET, + RT1011_ADCDAT1_PIN_CONFIG | RT1011_ADCDAT2_PIN_CONFIG, + RT1011_ADCDAT1_OUTPUT | RT1011_ADCDAT2_OUTPUT); _set_tdm_err_: snd_soc_dapm_mutex_unlock(dapm); From patchwork Tue Mar 2 21:25:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112295 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C527C433E0 for ; Tue, 2 Mar 2021 21:30:00 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9DB7464F2C for ; Tue, 2 Mar 2021 21:29:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9DB7464F2C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 217261A9B; Tue, 2 Mar 2021 22:29:08 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 217261A9B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720598; bh=rbaA60XavB4L9DigIFLjc+45mYu2DT58qLv36MF/DCc=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=s14hRuppSPxJ5Y7vrnMN267DvG62I9zA9DBs9A9ji/NFnM8wHUA9D2AbtVxwsOjFC Wp77l7oM+pT0KfZkH7UMc5szrgaBex9Ufoj5CHZI8kHo0vlrULhmrA4+A6RpxY1Kv9 zDjo5OaYglo9HDS8HAeqM14cj8vqd27gUdCiz5K8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2817CF8032B; Tue, 2 Mar 2021 22:26:24 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B2165F804F2; Tue, 2 Mar 2021 22:26:22 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 516E2F802E2 for ; Tue, 2 Mar 2021 22:26:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 516E2F802E2 IronPort-SDR: ewzK+i/+gdiPRr2RZsvuKpzUf3h/1f1MZkjdaxRl4YD2Y7FMwmUoVmDkoOtlCxMS/ICNSAcvtj cdAdgaI2mHhA== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="183603750" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="183603750" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:03 -0800 IronPort-SDR: YwP9GO8mlC+68hxfZeq1dSCe9rGRrbqxxI94O0qL8PusUgzj0BoX5aaXPCq77tazvaIwWnIEJV hN5SBvAf4ARw== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223364" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:25:49 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 03/24] ASoC: rt1011: clarify expression Date: Tue, 2 Mar 2021 15:25:06 -0600 Message-Id: <20210302212527.55158-4-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warning: sound/soc/codecs/rt1011.c:1781:63: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT1011_PLL1_QM_SFT | ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt1011.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt1011.c b/sound/soc/codecs/rt1011.c index 39a9f17ca0a9..238cb66f4c6a 100644 --- a/sound/soc/codecs/rt1011.c +++ b/sound/soc/codecs/rt1011.c @@ -1778,8 +1778,9 @@ static int rt1011_set_component_pll(struct snd_soc_component *component, pll_code.n_code, pll_code.k_code); snd_soc_component_write(component, RT1011_PLL_1, - (pll_code.m_bp ? 0 : pll_code.m_code) << RT1011_PLL1_QM_SFT | - pll_code.m_bp << RT1011_PLL1_BPM_SFT | pll_code.n_code); + ((pll_code.m_bp ? 0 : pll_code.m_code) << RT1011_PLL1_QM_SFT) | + (pll_code.m_bp << RT1011_PLL1_BPM_SFT) | + pll_code.n_code); snd_soc_component_write(component, RT1011_PLL_2, pll_code.k_code); From patchwork Tue Mar 2 21:25:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112297 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F233C433DB for ; Tue, 2 Mar 2021 21:30:34 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A8D7B64F2E for ; Tue, 2 Mar 2021 21:30:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A8D7B64F2E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0A9C4191C; Tue, 2 Mar 2021 22:29:42 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0A9C4191C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720632; bh=p2kpx4k7s5EVJpgHKK0cO7GqAcT3zmZlaTWVaf++bqo=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=qwWZG1GsTtrESl95UWVRMWKoQsYnPWbnU5KUApoFZXk5RmUMfm5/rgPkuRnntB/Cy 7ZD/HqZRGLkU68pUCBlxuI4DHZcPn67AScnl9Dhio87hKuuDarIJFyX9fVFpdrlJJs 2U+Ok4iPPAgZ7K2RYejWTd4KHfCh5oW7E0GbyUz4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9EF5EF804F3; Tue, 2 Mar 2021 22:26:25 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 07B2DF804F3; Tue, 2 Mar 2021 22:26:23 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CDC87F8032D for ; Tue, 2 Mar 2021 22:26:10 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CDC87F8032D IronPort-SDR: HLd53W7CuDUTEkqxLOFyJzLcGf6PJCXqzDmUcXvBnspgeOK6DQy3HgS1dJodUjuVFxpcLDriQ9 4kgnAFvZ6adg== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="183603753" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="183603753" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:03 -0800 IronPort-SDR: VcNRi+L8b6KaWWwRn6I5hXMlecsQdOZTb6mWldTeeXQ9mJJ87HXajgq88YWKVbz2oIxDzvk6QT 1XjCDNaRRYUw== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223369" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:25:51 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 04/24] ASoC: rt1015: clarify expression Date: Tue, 2 Mar 2021 15:25:07 -0600 Message-Id: <20210302212527.55158-5-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warning: sound/soc/codecs/rt1015.c:894:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT1015_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt1015.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt1015.c b/sound/soc/codecs/rt1015.c index 3cd967ae999d..10a7b7745f4b 100644 --- a/sound/soc/codecs/rt1015.c +++ b/sound/soc/codecs/rt1015.c @@ -893,8 +893,9 @@ static int rt1015_set_component_pll(struct snd_soc_component *component, pll_code.n_code, pll_code.k_code); snd_soc_component_write(component, RT1015_PLL1, - (pll_code.m_bp ? 0 : pll_code.m_code) << RT1015_PLL_M_SFT | - pll_code.m_bp << RT1015_PLL_M_BP_SFT | pll_code.n_code); + ((pll_code.m_bp ? 0 : pll_code.m_code) << RT1015_PLL_M_SFT) | + (pll_code.m_bp << RT1015_PLL_M_BP_SFT) | + pll_code.n_code); snd_soc_component_write(component, RT1015_PLL2, pll_code.k_code); From patchwork Tue Mar 2 21:25:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112301 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3EB2C433E0 for ; Tue, 2 Mar 2021 21:31:16 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0AE9664F2C for ; Tue, 2 Mar 2021 21:31:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0AE9664F2C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 726D71AA5; Tue, 2 Mar 2021 22:30:24 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 726D71AA5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720674; bh=xwHyQ82ZHpVYvEayV0sQ19jeQANsEVTXn7J9lqdKZY8=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=V72mkWMunZ8Vr7fSdgWAski1BMvis/4pd1Q9+QrtGcuFUdSwFEsAlO5owr9aGLllX Vq7MF4l+Vr16E1njnILQ8VIh4s0rKcvGdE1A+iUBm89cGoNb187GN0kUoKufMrSQnL 2zUP7SKI5byGPsWG+fJ850yDgmoLKXNBAirYxcH4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7CC13F80507; Tue, 2 Mar 2021 22:26:27 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D661AF804F1; Tue, 2 Mar 2021 22:26:23 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 91F75F8032B for ; Tue, 2 Mar 2021 22:26:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 91F75F8032B IronPort-SDR: rwzVeQ1k/ZyB1t7YJLMVGWk8GOORbNyC5s7pVgOMwZCnTVpYmsCsB2PFAlfxV9v9bCau2nc+5a Iuex9dZOIAUA== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="183603752" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="183603752" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:03 -0800 IronPort-SDR: r18VhWi9xGUBE6gwJTll9wKNx9Vnz17U8q05BuT50ce00wMDQKGKa/itdMLk3lyt2YooHXtito 4O+Nmgua+VRw== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223377" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:25:52 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 05/24] ASoC: rt1016: clarify expression Date: Tue, 2 Mar 2021 15:25:08 -0600 Message-Id: <20210302212527.55158-6-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warning: sound/soc/codecs/rt1016.c:503:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT1016_PLL_M_SFT | ^ sound/soc/codecs/rt1016.c:506:40: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] pll_code.k_bp << RT1016_PLL_K_BP_SFT | ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt1016.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/rt1016.c b/sound/soc/codecs/rt1016.c index c14a809da52b..7561d202274c 100644 --- a/sound/soc/codecs/rt1016.c +++ b/sound/soc/codecs/rt1016.c @@ -500,10 +500,11 @@ static int rt1016_set_component_pll(struct snd_soc_component *component, (pll_code.k_bp ? 0 : pll_code.k_code)); snd_soc_component_write(component, RT1016_PLL1, - (pll_code.m_bp ? 0 : pll_code.m_code) << RT1016_PLL_M_SFT | - pll_code.m_bp << RT1016_PLL_M_BP_SFT | pll_code.n_code); + ((pll_code.m_bp ? 0 : pll_code.m_code) << RT1016_PLL_M_SFT) | + (pll_code.m_bp << RT1016_PLL_M_BP_SFT) | + pll_code.n_code); snd_soc_component_write(component, RT1016_PLL2, - pll_code.k_bp << RT1016_PLL_K_BP_SFT | + (pll_code.k_bp << RT1016_PLL_K_BP_SFT) | (pll_code.k_bp ? 0 : pll_code.k_code)); rt1016->pll_in = freq_in; From patchwork Tue Mar 2 21:25:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112317 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DBDAC433E0 for ; Tue, 2 Mar 2021 21:32:23 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C709064F1A for ; Tue, 2 Mar 2021 21:32:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C709064F1A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3FB021ABC; Tue, 2 Mar 2021 22:31:31 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3FB021ABC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720741; bh=AHvSt/KHr8bDpIBuweQuQWxYOsyKo2bqF5QwgwKIs1c=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=bzAxyQdM0wLJlys0F9yZhV9PXbT/yJeccoQqTILbzNUt6FTxmIgm1GaX0bXwg9D46 jHOWFSCcIXjebPMIWgBwe2zBEf1a5nhfa4vsxpAZ5DQaqWVtH0LRFEEGko2NopjNku RabjVCMGRWxbgG43/cJnLtJ9phHS1DzDcXi2gwgw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 37777F8051B; Tue, 2 Mar 2021 22:26:32 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1A67BF80517; Tue, 2 Mar 2021 22:26:29 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3C799F80424 for ; Tue, 2 Mar 2021 22:26:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3C799F80424 IronPort-SDR: Ta33YXUIA4TdngKi9lEdvxJjyjWg//t5BNqktIH7q4cCmQcY5rCFuux6WfF1ktBzVPxcl3XMv8 /nKloGOs6NpA== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="183603754" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="183603754" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:03 -0800 IronPort-SDR: L76FKCW1g50rq15ieDZkO5QNRZN617RgQcoiFM7H3Q6rc8b91FNE95m+fd5p2qruRTyiOfFGSN nqaAP+xtb02A== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223385" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:25:53 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 06/24] ASoC: rt1305: clarify expression Date: Tue, 2 Mar 2021 15:25:09 -0600 Message-Id: <20210302212527.55158-7-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warning: sound/soc/codecs/rt1305.c:853:63: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT1305_PLL_1_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt1305.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt1305.c b/sound/soc/codecs/rt1305.c index 16aa405fb8f0..7a0094578e46 100644 --- a/sound/soc/codecs/rt1305.c +++ b/sound/soc/codecs/rt1305.c @@ -850,8 +850,8 @@ static int rt1305_set_component_pll(struct snd_soc_component *component, pll_code.n_code, pll_code.k_code); snd_soc_component_write(component, RT1305_PLL1_1, - (pll_code.m_bp ? 0 : pll_code.m_code) << RT1305_PLL_1_M_SFT | - pll_code.m_bp << RT1305_PLL_1_M_BYPASS_SFT | + ((pll_code.m_bp ? 0 : pll_code.m_code) << RT1305_PLL_1_M_SFT) | + (pll_code.m_bp << RT1305_PLL_1_M_BYPASS_SFT) | pll_code.n_code); snd_soc_component_write(component, RT1305_PLL1_2, pll_code.k_code); From patchwork Tue Mar 2 21:25:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112319 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E24AC433E0 for ; Tue, 2 Mar 2021 21:32:51 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 87BE064F2C for ; Tue, 2 Mar 2021 21:32:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 87BE064F2C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EC6491AA1; Tue, 2 Mar 2021 22:31:58 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EC6491AA1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720769; bh=M+ewk9nSURprNLTT9tKDACLSnewXy1y40IscaGL4nWA=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=u0DGfmw6Hfai5OhslVn6mEoUqMr3b/7MrYoLClwDZSSSdD9TRnYPBnCP/2D7+FI3+ MgFbNd4c+MdWT01+FDr50AhGHPMFKHZzaz+hEUJi5Rwqr1B21UHyDJCk6WvLnwWkxs v/LtTX6TXoPiDrra5aOJe9+iVGbibyHHnmYwzq8Y= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 83B75F80520; Tue, 2 Mar 2021 22:26:33 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 24808F8032C; Tue, 2 Mar 2021 22:26:29 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 72D1AF8032C for ; Tue, 2 Mar 2021 22:26:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 72D1AF8032C IronPort-SDR: WoYfQTabQM0uTMmzm/c4/4D57aubUTpJrnQ/d0g7HOH9bLZhUCnfh5+UYK768887YJ3HG93qFw JfXcYvCWoB0Q== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="183603755" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="183603755" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:03 -0800 IronPort-SDR: HWyD0XAnFdiOxb1Gu3FkIskal8AbJvnCEc+M0vYdjd2a3YJXn+oAEsxjwjvyl7dIgYMMcn+3EP /AjinOILgQaQ== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223393" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:25:54 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 07/24] ASoC: rt1308: clarify expression Date: Tue, 2 Mar 2021 15:25:10 -0600 Message-Id: <20210302212527.55158-8-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warning: sound/soc/codecs/rt1308.c:676:40: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] pll_code.k_code << RT1308_PLL1_K_SFT | ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt1308.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/rt1308.c b/sound/soc/codecs/rt1308.c index 76e65844543d..b4e5546e2e21 100644 --- a/sound/soc/codecs/rt1308.c +++ b/sound/soc/codecs/rt1308.c @@ -673,10 +673,10 @@ static int rt1308_set_component_pll(struct snd_soc_component *component, pll_code.n_code, pll_code.k_code); snd_soc_component_write(component, RT1308_PLL_1, - pll_code.k_code << RT1308_PLL1_K_SFT | - pll_code.m_bp << RT1308_PLL1_M_BYPASS_SFT | - (pll_code.m_bp ? 0 : pll_code.m_code) << RT1308_PLL1_M_SFT | - pll_code.n_code << RT1308_PLL1_N_SFT); + (pll_code.k_code << RT1308_PLL1_K_SFT) | + (pll_code.m_bp << RT1308_PLL1_M_BYPASS_SFT) | + ((pll_code.m_bp ? 0 : pll_code.m_code) << RT1308_PLL1_M_SFT) | + (pll_code.n_code << RT1308_PLL1_N_SFT)); rt1308->pll_in = freq_in; rt1308->pll_out = freq_out; From patchwork Tue Mar 2 21:25:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112321 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06C15C433DB for ; Tue, 2 Mar 2021 21:33:06 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3F29564F2D for ; Tue, 2 Mar 2021 21:33:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F29564F2D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A3A231AAB; Tue, 2 Mar 2021 22:32:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A3A231AAB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720783; bh=HFa39RY8K0gutsKE89eCe/LW4WUCYXuS9crw+mYvKuw=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=BiHQJCoVYvaF083T4gjjIibuLKtOoQedykFE1uNT+6RO1JtifxilYqbgj5M6h5NHL 8C+o387qSXtbkOgXon2D8GkkLlXI1EQUzM2zV0Mma/G5C6BruNlfxjHZU5Nj8SyeYF K4MdU0ZJlFew/LP3CUo/cly9czFHT3a+tibmwoVo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 576E4F804AA; Tue, 2 Mar 2021 22:26:35 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3D2E6F80515; Tue, 2 Mar 2021 22:26:29 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B9E07F80227 for ; Tue, 2 Mar 2021 22:26:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B9E07F80227 IronPort-SDR: jegtdrFOmvE4mV0DWd68ypzj+b3D2o/mr/6VEmNAXbQsGjZ0EEwlE5X4NuZPNBm5CMMRSE1gkI H9bH4UlwLfzQ== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="183603756" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="183603756" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:03 -0800 IronPort-SDR: +BNZRdALnas4+QNi3fxyeSJ6jerr9kVpDwgN3L0OeH9BMskTO/vU3UQCXFzRTtg0PUjFRpZdey Do+jhENooWlg== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223402" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:25:56 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 08/24] ASoC: rt5640: clarify expression Date: Tue, 2 Mar 2021 15:25:11 -0600 Message-Id: <20210302212527.55158-9-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warning: sound/soc/codecs/rt5640.c:1923:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5640_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt5640.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c index a5674c227b3a..8c1766954b92 100644 --- a/sound/soc/codecs/rt5640.c +++ b/sound/soc/codecs/rt5640.c @@ -1918,10 +1918,10 @@ static int rt5640_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int source, pll_code.n_code, pll_code.k_code); snd_soc_component_write(component, RT5640_PLL_CTRL1, - pll_code.n_code << RT5640_PLL_N_SFT | pll_code.k_code); + (pll_code.n_code << RT5640_PLL_N_SFT) | pll_code.k_code); snd_soc_component_write(component, RT5640_PLL_CTRL2, - (pll_code.m_bp ? 0 : pll_code.m_code) << RT5640_PLL_M_SFT | - pll_code.m_bp << RT5640_PLL_M_BP_SFT); + ((pll_code.m_bp ? 0 : pll_code.m_code) << RT5640_PLL_M_SFT) | + (pll_code.m_bp << RT5640_PLL_M_BP_SFT)); rt5640->pll_in = freq_in; rt5640->pll_out = freq_out; From patchwork Tue Mar 2 21:25:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112331 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AA59C433DB for ; Tue, 2 Mar 2021 21:35:02 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6C26264F1A for ; Tue, 2 Mar 2021 21:35:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6C26264F1A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D70101AF2; Tue, 2 Mar 2021 22:34:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D70101AF2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720899; bh=M8FDTdfVGeimVyvVmYWnh70Q3WVFjJ4UCTDWkCaLB00=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=DymVvk+ABEGGlRhw64N8qTJy2wcZpM+XAfqtN3VU4CAxvrP1ZFz1rTMRC24QolNSK 94Sjn/X7LNL57MeIcHonmGp2cd9bYTIxrq4Tt5gQQgeueKgTGZi18iuY0Xb6//56w2 mu5U6elZFnsQUXtgKTeH4sEHX27M3UUUhdchG+WI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id F0FA3F80542; Tue, 2 Mar 2021 22:26:44 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8D362F80525; Tue, 2 Mar 2021 22:26:35 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 32A2BF804A9 for ; Tue, 2 Mar 2021 22:26:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 32A2BF804A9 IronPort-SDR: HkEuCiCh5F5YPi1NGCi0vbFfJWSb4QCrV+SVwsNwn1B88/7gDYuyGLYPYI4ZUIo6TPjjp+gHSk hU+qRabFtnHw== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="183603759" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="183603759" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:04 -0800 IronPort-SDR: fRf+ytAdffZJky1HKboVAnpSWGe/g8eoRKzVpU2ycYyCS23Po9RW1ByFkt7Uz/tZ37NfCbLTUG BRN2FZTDSCTw== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223408" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:25:57 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 09/24] ASoC: rt5645: use logical OR Date: Tue, 2 Mar 2021 15:25:12 -0600 Message-Id: <20210302212527.55158-10-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warning: sound/soc/codecs/rt5645.c:693:37: style:inconclusive: Boolean expression 'reg>=420&®<=461' is used in bitwise operation. Did you mean '||'? [bitwiseOnBoolean] if ((reg >= 0x1a4 && reg <= 0x1cd) | (reg >= 0x1e5 && reg <= 0x1f8) | ^ sound/soc/codecs/rt5645.c:693:70: style:inconclusive: Boolean expression 'reg==177' is used in bitwise operation. Did you mean '||'? [bitwiseOnBoolean] if ((reg >= 0x1a4 && reg <= 0x1cd) | (reg >= 0x1e5 && reg <= 0x1f8) | ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt5645.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index 63a7e052eaa0..4db6cd70e32b 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -690,7 +690,7 @@ static int rt5645_hweq_get(struct snd_kcontrol *kcontrol, static bool rt5645_validate_hweq(unsigned short reg) { - if ((reg >= 0x1a4 && reg <= 0x1cd) | (reg >= 0x1e5 && reg <= 0x1f8) | + if ((reg >= 0x1a4 && reg <= 0x1cd) || (reg >= 0x1e5 && reg <= 0x1f8) || (reg == RT5645_EQ_CTRL2)) return true; From patchwork Tue Mar 2 21:25:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112327 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 978C1C433E0 for ; Tue, 2 Mar 2021 21:34:24 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CDC5564F2C for ; Tue, 2 Mar 2021 21:34:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CDC5564F2C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 478551ADA; Tue, 2 Mar 2021 22:33:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 478551ADA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720862; bh=/4VIPjwaSzjHAK+rktReMA9YgtOLLURZ582aQaJAb08=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=AtuWlbwZaveQkRbIPHReTNyR2Mgfsyy6CYeG2QXS71aUu3PlYxjuRd/A1PyqzoI6g Gz7MGyaS+rTq6WLTlN4zOWsOY3qdwTKh4BYWBazpnnztqztrdyApHrDoQgp7KMROCP A4vz6v5oRgWVqUZcK13YiFIqwUnr485d5p2JxLds= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A84CFF80537; Tue, 2 Mar 2021 22:26:43 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 20886F80482; Tue, 2 Mar 2021 22:26:34 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 61154F80482 for ; Tue, 2 Mar 2021 22:26:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 61154F80482 IronPort-SDR: 7XvHje3Vas84u6h5A7tUcPdBatNIyq1pYM44zdRMRGQOw7ejqxas8gk+ih3kM6V4R7FF9sRfy6 s8TTwHeVuPng== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="183603762" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="183603762" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:04 -0800 IronPort-SDR: AqpxUWlGDX7DoD+K3sKjfu/+YSUpU74kkj3UG0kS2HcdbyCbjCX2tSPSMFXeDh31Blpi7P1X8l UBqSpMQZUSAw== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223418" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:25:58 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 10/24] ASoC: rt5645: clarify expression Date: Tue, 2 Mar 2021 15:25:13 -0600 Message-Id: <20210302212527.55158-11-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warning: sound/soc/codecs/rt5645.c:2959:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5645_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt5645.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index 4db6cd70e32b..c39095fa14ce 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -2956,8 +2956,8 @@ static int rt5645_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int source, snd_soc_component_write(component, RT5645_PLL_CTRL1, pll_code.n_code << RT5645_PLL_N_SFT | pll_code.k_code); snd_soc_component_write(component, RT5645_PLL_CTRL2, - (pll_code.m_bp ? 0 : pll_code.m_code) << RT5645_PLL_M_SFT | - pll_code.m_bp << RT5645_PLL_M_BP_SFT); + ((pll_code.m_bp ? 0 : pll_code.m_code) << RT5645_PLL_M_SFT) | + (pll_code.m_bp << RT5645_PLL_M_BP_SFT)); rt5645->pll_in = freq_in; rt5645->pll_out = freq_out; From patchwork Tue Mar 2 21:25:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112283 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2B25C433DB for ; Tue, 2 Mar 2021 21:27:37 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BB40064F31 for ; Tue, 2 Mar 2021 21:27:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB40064F31 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 04834193E; Tue, 2 Mar 2021 22:26:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 04834193E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720455; bh=jWHVSk5tQqgPNLthlDFEro4brVFNAJhKaen4iEj8TAM=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=RfVN1eEMmlk14BescAW6Q44GunAvT6qjHsvzuXMo3MrSaWjM19+TDFHhaxKSKxta7 /gPu22mjIKQluMX2ELNfNi4B05vRqYpSw62goENS3JHFq4jJMnR2Dogrl8lGiHHZYw r1Qb9efSRYBXTp7r7Y2f8Pywgn1c8aja8qCMgPKI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B7E2DF804AB; Tue, 2 Mar 2021 22:26:15 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 985C2F80482; Tue, 2 Mar 2021 22:26:13 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BA6F6F80273 for ; Tue, 2 Mar 2021 22:26:06 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BA6F6F80273 IronPort-SDR: AciAhSUQvbSE1Ota+uxCpI+Pc5qPAzxEUOa9PjEASQnTJCHVJVEFSApNFuh538l8FmppOxwEaE A030LCxUjEfQ== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="166240394" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="166240394" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:04 -0800 IronPort-SDR: PpPpqqK9oMfJ/qPO/dS/sqM8QppMsCGI3lUGos+3MZC1oWVf/EvnibezDkb4X1yg+Pk+FykJv0 7TLE7skGOwjQ== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223428" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:25:59 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 11/24] ASoC: rt5651: clarify expression Date: Tue, 2 Mar 2021 15:25:14 -0600 Message-Id: <20210302212527.55158-12-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warning: sound/soc/codecs/rt5659.c:3515:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5659_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt5651.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt5651.c b/sound/soc/codecs/rt5651.c index e59fdc81dbd4..49fab9db5917 100644 --- a/sound/soc/codecs/rt5651.c +++ b/sound/soc/codecs/rt5651.c @@ -1498,8 +1498,8 @@ static int rt5651_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int source, snd_soc_component_write(component, RT5651_PLL_CTRL1, pll_code.n_code << RT5651_PLL_N_SFT | pll_code.k_code); snd_soc_component_write(component, RT5651_PLL_CTRL2, - (pll_code.m_bp ? 0 : pll_code.m_code) << RT5651_PLL_M_SFT | - pll_code.m_bp << RT5651_PLL_M_BP_SFT); + ((pll_code.m_bp ? 0 : pll_code.m_code) << RT5651_PLL_M_SFT) | + (pll_code.m_bp << RT5651_PLL_M_BP_SFT)); rt5651->pll_in = freq_in; rt5651->pll_out = freq_out; From patchwork Tue Mar 2 21:25:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112285 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6606EC433E6 for ; Tue, 2 Mar 2021 21:28:16 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6361464F2E for ; Tue, 2 Mar 2021 21:28:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6361464F2E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7055F192B; Tue, 2 Mar 2021 22:27:23 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7055F192B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720493; bh=NAbrfsFSDKir8Bbe+Pqo/qNfH5NyoDeP3pjVvF2ibaA=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=PlG/6frdqI5/JIujefTY1LLFX9UblCihQVimx2MLz/W1ljMlJ6YCGkA8+1SDWJaHh BicYIMwtHHPMwJtVOtTlDWL1wfAqKJr5l5QEsFhyqYArMB2v/xzPCqaD3mfYwH0t2f wNe3G9y1TAVrbIlk+QrcskUSCXSegYiW+uPkQncQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C6751F804AF; Tue, 2 Mar 2021 22:26:16 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5B6ABF804AD; Tue, 2 Mar 2021 22:26:15 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id EB4D1F80277 for ; Tue, 2 Mar 2021 22:26:06 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EB4D1F80277 IronPort-SDR: yInG/Issn1rZCKmit+V2hGbyFGTkbKUXrbtKIjkQ9UMto3s+kb2qRYlt2mvC02knf7EEzAv3mU CK0mcK8QoXjw== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="174631369" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="174631369" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:04 -0800 IronPort-SDR: GCJi5vO4QAnACGQx2O1rzRKEFIpf159mL5AmKLspNlCBLIEmkPcSPjasLtULQk4n5Bsnn4UUIg Yb9cMnAg6KWQ== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223436" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:01 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 12/24] ASoC: rt5651: remove useless assignment Date: Tue, 2 Mar 2021 15:25:15 -0600 Message-Id: <20210302212527.55158-13-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warning: sound/soc/codecs/rt5651.c:1786:13: style: Variable 'report' is assigned a value that is never used. [unreadVariable] int report = 0; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt5651.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/rt5651.c b/sound/soc/codecs/rt5651.c index 49fab9db5917..fc0c83b73f09 100644 --- a/sound/soc/codecs/rt5651.c +++ b/sound/soc/codecs/rt5651.c @@ -1783,7 +1783,7 @@ static void rt5651_jack_detect_work(struct work_struct *work) struct rt5651_priv *rt5651 = container_of(work, struct rt5651_priv, jack_detect_work); struct snd_soc_component *component = rt5651->component; - int report = 0; + int report; if (!rt5651_jack_inserted(component)) { /* Jack removed, or spurious IRQ? */ From patchwork Tue Mar 2 21:25:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112287 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61EE8C433DB for ; Tue, 2 Mar 2021 21:28:49 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DABA664F30 for ; Tue, 2 Mar 2021 21:28:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DABA664F30 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 28B9C1943; Tue, 2 Mar 2021 22:27:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 28B9C1943 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720526; bh=JWJFOkwX7flxqWC5aPTclS+ItMSrD7/w5PQWKcYLk+o=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=csVqhoRX+E4R9SRzZY737kT4fmTKPAXYW+VQvvZNZI2uE/nP67qKSjUxkAyw7xjXj R5E8ECx6o9QtiVdJc0mxoH/Pk53acVzbFvx3iHTV9IxJYNfH5I4OjVtA4r3Djygdcb zl+JaNNgQp/3ztG6s8tJAd/GXzRQ7eIhgABOoEnk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6E52AF802E3; Tue, 2 Mar 2021 22:26:19 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7FF96F804B0; Tue, 2 Mar 2021 22:26:16 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E8DEBF802CA for ; Tue, 2 Mar 2021 22:26:07 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E8DEBF802CA IronPort-SDR: CslNtgEGbNI9vp7RFIlFzB2pzYLiMjjIr/vJgxFpfKujDGFKu3rz2pQkxpelue9fOm58I0EP+h B8XEuAq+9IHg== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="174631372" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="174631372" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:04 -0800 IronPort-SDR: rverH+GmYoshtG6pcd47qV+vZETjoAY6gvupKF9M788F57k4nzQppMzcE/O80UnhbUa/AoBmB0 ZLkvWMX1rx1w== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223445" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:02 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 13/24] ASoC: rt5659: clarify expression Date: Tue, 2 Mar 2021 15:25:16 -0600 Message-Id: <20210302212527.55158-14-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warning: sound/soc/codecs/rt5659.c:3515:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5659_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt5659.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt5659.c b/sound/soc/codecs/rt5659.c index 41e5917b16a5..67f0ab817135 100644 --- a/sound/soc/codecs/rt5659.c +++ b/sound/soc/codecs/rt5659.c @@ -3512,8 +3512,8 @@ static int rt5659_set_component_pll(struct snd_soc_component *component, int pll snd_soc_component_write(component, RT5659_PLL_CTRL_1, pll_code.n_code << RT5659_PLL_N_SFT | pll_code.k_code); snd_soc_component_write(component, RT5659_PLL_CTRL_2, - (pll_code.m_bp ? 0 : pll_code.m_code) << RT5659_PLL_M_SFT | - pll_code.m_bp << RT5659_PLL_M_BP_SFT); + ((pll_code.m_bp ? 0 : pll_code.m_code) << RT5659_PLL_M_SFT) | + (pll_code.m_bp << RT5659_PLL_M_BP_SFT)); rt5659->pll_in = freq_in; rt5659->pll_out = freq_out; From patchwork Tue Mar 2 21:25:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112291 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 840B8C433E0 for ; Tue, 2 Mar 2021 21:29:18 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AFC8C64F2A for ; Tue, 2 Mar 2021 21:29:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AFC8C64F2A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 17B8A1932; Tue, 2 Mar 2021 22:28:26 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 17B8A1932 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720556; bh=8y9TbB5S7lBcDvLmdhevaBaZxiaH3qOUdTKtk0cx9es=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=CgLrGQyVjaVoaqExyENe/lQ8b1sKSa40jvgSnJa04rS/Kxlq0mpM1twrNxjkB82lV xKiLIbBGcBkjqu6WAB5uHaTP84v4Mj5sQDQnmr+Usf7o6wwIobMuzmnvVcqPgWZqIb 0tSMM7JNRSRBLg87//3FCtpolw6EtX4C7drPJjvo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 72F72F804E3; Tue, 2 Mar 2021 22:26:21 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 52A1DF804B4; Tue, 2 Mar 2021 22:26:17 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D94ADF8025B for ; Tue, 2 Mar 2021 22:26:08 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D94ADF8025B IronPort-SDR: P8HuowfAWEmtGQ0N+umBOogMdj2+Acf6NlojJWeq4a+9vDV37x+KgQbA3l8it8lb2vMfoqHLIG Jre520qongRg== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="174631373" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="174631373" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:05 -0800 IronPort-SDR: HT56RU/9fyo6qiEi9RTazb6nf6c9AhUhhR/NCZ1VcD0q/Li4yFvq2WTHy4b7aXNSbfiGhWipbH FlPUotZksRIA== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223451" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:03 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 14/24] ASoC: rt5660: clarify expression Date: Tue, 2 Mar 2021 15:25:17 -0600 Message-Id: <20210302212527.55158-15-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warning: sound/soc/codecs/rt5660.c:1060:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5660_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt5660.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt5660.c b/sound/soc/codecs/rt5660.c index 0edf09d3a499..33ff9156358b 100644 --- a/sound/soc/codecs/rt5660.c +++ b/sound/soc/codecs/rt5660.c @@ -1057,8 +1057,8 @@ static int rt5660_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int source, snd_soc_component_write(component, RT5660_PLL_CTRL1, pll_code.n_code << RT5660_PLL_N_SFT | pll_code.k_code); snd_soc_component_write(component, RT5660_PLL_CTRL2, - (pll_code.m_bp ? 0 : pll_code.m_code) << RT5660_PLL_M_SFT | - pll_code.m_bp << RT5660_PLL_M_BP_SFT); + ((pll_code.m_bp ? 0 : pll_code.m_code) << RT5660_PLL_M_SFT) | + (pll_code.m_bp << RT5660_PLL_M_BP_SFT)); rt5660->pll_in = freq_in; rt5660->pll_out = freq_out; From patchwork Tue Mar 2 21:25:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112293 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5F1BC433E0 for ; Tue, 2 Mar 2021 21:29:47 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D643D64F2C for ; Tue, 2 Mar 2021 21:29:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D643D64F2C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C5BDE1A95; Tue, 2 Mar 2021 22:28:54 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C5BDE1A95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720584; bh=VcT/MthC8HtAabfeF9biAKaOm/hzkxjrolN1uollbc0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=oNn3RPmR7+knpK7hZTcKULLlzNl2aciJlKk33/OLSVfV74c9F/wpXgilPA7oFkwSW fNJe8yeox3CH+j5zpEW2lxzVGX9s72Lhi3nvD7tyUgwp9NfmngELSPOKxyzBnBZ47u UQWUqrzU5sDCkNORrNRBtZQKnWO0jSeGI9eUyHt4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 77C0BF804ED; Tue, 2 Mar 2021 22:26:22 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EB7D0F804D9; Tue, 2 Mar 2021 22:26:18 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 47F2BF802E3 for ; Tue, 2 Mar 2021 22:26:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 47F2BF802E3 IronPort-SDR: r5hdmPbdoPuaDGyUemn6pBCx7duJlqCMfSkTxjajuyHTg5OHVoWxvv89eOlR1a/3jf0hTE8Bft EtzUczNVGLlA== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="174631381" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="174631381" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:06 -0800 IronPort-SDR: +d9qI94QJJKLczfzpmm1/75y5yOfQTivrT2Xf2/IrZabioEVHUMjcCjOYj6mSxkAQ8URcqLy1O oOLVsECfN+mw== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223458" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:04 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 15/24] ASoC: rt5663: clarify expression Date: Tue, 2 Mar 2021 15:25:18 -0600 Message-Id: <20210302212527.55158-16-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warning: sound/soc/codecs/rt5663.c:2955:63: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5663_PLL_M_SHIFT | ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt5663.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt5663.c b/sound/soc/codecs/rt5663.c index 619fb9a031e3..be9fc58ff681 100644 --- a/sound/soc/codecs/rt5663.c +++ b/sound/soc/codecs/rt5663.c @@ -2952,8 +2952,8 @@ static int rt5663_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int source, snd_soc_component_write(component, RT5663_PLL_1, pll_code.n_code << RT5663_PLL_N_SHIFT | pll_code.k_code); snd_soc_component_write(component, RT5663_PLL_2, - (pll_code.m_bp ? 0 : pll_code.m_code) << RT5663_PLL_M_SHIFT | - pll_code.m_bp << RT5663_PLL_M_BP_SHIFT); + ((pll_code.m_bp ? 0 : pll_code.m_code) << RT5663_PLL_M_SHIFT) | + (pll_code.m_bp << RT5663_PLL_M_BP_SHIFT)); rt5663->pll_in = freq_in; rt5663->pll_out = freq_out; From patchwork Tue Mar 2 21:25:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112303 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED4ECC433E0 for ; Tue, 2 Mar 2021 21:31:31 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2987764F1E for ; Tue, 2 Mar 2021 21:31:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2987764F1E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 740F11AA1; Tue, 2 Mar 2021 22:30:39 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 740F11AA1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720689; bh=axW5bJMhWwbWb+67wcsLySow8nhp+n6s3h0DmWbZQAY=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rBPLW2x60zj8dMXTGvJhibGDhKYVAsZ/NT5aePeyf/RjAmx9sLF3cKy/3qtFlEHpQ 4NHjlrHgGOTF1bsYfoJmh+8O+1WsL005R14KAtL0xgIxcb/1hrq4wlkZg77r9peh41 5KUcTR9HgWrNSQVxCuLU4fiKn8KdOuEOm0DRZWu8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id AE671F8042F; Tue, 2 Mar 2021 22:26:28 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0A07EF804F2; Tue, 2 Mar 2021 22:26:24 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E286EF802E7 for ; Tue, 2 Mar 2021 22:26:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E286EF802E7 IronPort-SDR: uLZm0TiPlqNyCryOITYKCA81Jzkj9b2H4mK8y71MmdZjZk6O5aw5UVYd/uixwp6D4YuJHtDnfE 7lC/VzzxuTPg== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="174631390" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="174631390" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:07 -0800 IronPort-SDR: Cr+nNPB08wEVP68KQeGnd48cBiottDZHvriswr3PIgKMBCh+Etx4ibjI3xSHytEhBDjpDleR8U skg85Y90eawQ== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223465" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:06 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 16/24] ASoC: rt5665: clarify expression Date: Tue, 2 Mar 2021 15:25:19 -0600 Message-Id: <20210302212527.55158-17-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warning: sound/soc/codecs/rt5665.c:4388:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5665_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt5665.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt5665.c b/sound/soc/codecs/rt5665.c index 8a915cdce0fe..e59323fd5bf2 100644 --- a/sound/soc/codecs/rt5665.c +++ b/sound/soc/codecs/rt5665.c @@ -4385,8 +4385,8 @@ static int rt5665_set_component_pll(struct snd_soc_component *component, int pll snd_soc_component_write(component, RT5665_PLL_CTRL_1, pll_code.n_code << RT5665_PLL_N_SFT | pll_code.k_code); snd_soc_component_write(component, RT5665_PLL_CTRL_2, - (pll_code.m_bp ? 0 : pll_code.m_code) << RT5665_PLL_M_SFT | - pll_code.m_bp << RT5665_PLL_M_BP_SFT); + ((pll_code.m_bp ? 0 : pll_code.m_code) << RT5665_PLL_M_SFT) | + (pll_code.m_bp << RT5665_PLL_M_BP_SFT)); rt5665->pll_in = freq_in; rt5665->pll_out = freq_out; From patchwork Tue Mar 2 21:25:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112299 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC3D4C433E0 for ; Tue, 2 Mar 2021 21:30:47 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5776F64F32 for ; Tue, 2 Mar 2021 21:30:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5776F64F32 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D3E011A95; Tue, 2 Mar 2021 22:29:55 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D3E011A95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720645; bh=Q065eO8MejPruu882TJVdLj59j5lXFpi+/XuT/44aeU=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=fYZSLtJ7F8UqJCXBIWidzOnJEgNS0NcGXTbTg+ezBR2GE0t2+QRUG1DilmxjQpgQJ Hv6pdJDtAh5ESjn1Ae/8dP/e7cErU+3f9lmKR143FZ31OJwCj15U20T6N1H1pPl60A 9783n9FEHRJNhp8p8laoizaAGEZUcoejchGfeEHY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6C204F804FA; Tue, 2 Mar 2021 22:26:26 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 75986F8032D; Tue, 2 Mar 2021 22:26:23 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D270EF80423 for ; Tue, 2 Mar 2021 22:26:10 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D270EF80423 IronPort-SDR: sjq619QcZt5ytA6CHQJj8IFMq7PM6aDY1wSXv92YB0n58XmlmbDxPpFP4BDY+4qlEsCSrKR60z +PcRRlvKvbuw== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="174631400" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="174631400" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:08 -0800 IronPort-SDR: 8kCVpxLF5xNGOjvSgtOMdyH4PHmNsboeXcWPD1VC+7Ew769hH21NFvUiYgfzKz69kuqJaGjBMx 8Wn8nVVC8zEw== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223468" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:07 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 17/24] ASoC: rt5668: clarify expression Date: Tue, 2 Mar 2021 15:25:20 -0600 Message-Id: <20210302212527.55158-18-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warning: sound/soc/codecs/rt5668.c:2185:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5668_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt5668.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt5668.c b/sound/soc/codecs/rt5668.c index bc69adc9c8b7..d966d6d1bf64 100644 --- a/sound/soc/codecs/rt5668.c +++ b/sound/soc/codecs/rt5668.c @@ -2182,8 +2182,8 @@ static int rt5668_set_component_pll(struct snd_soc_component *component, snd_soc_component_write(component, RT5668_PLL_CTRL_1, pll_code.n_code << RT5668_PLL_N_SFT | pll_code.k_code); snd_soc_component_write(component, RT5668_PLL_CTRL_2, - (pll_code.m_bp ? 0 : pll_code.m_code) << RT5668_PLL_M_SFT | - pll_code.m_bp << RT5668_PLL_M_BP_SFT); + ((pll_code.m_bp ? 0 : pll_code.m_code) << RT5668_PLL_M_SFT) | + (pll_code.m_bp << RT5668_PLL_M_BP_SFT)); rt5668->pll_in = freq_in; rt5668->pll_out = freq_out; From patchwork Tue Mar 2 21:25:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112323 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56368C433DB for ; Tue, 2 Mar 2021 21:33:30 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A090E64F2C for ; Tue, 2 Mar 2021 21:33:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A090E64F2C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id F34201AD0; Tue, 2 Mar 2021 22:32:37 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F34201AD0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720808; bh=4opAOFTpPjiKbJlwKlrKg/lGIu8gVdteQNL1Kx3jQNw=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=kVMIIj3SOkeps2v1GSxJPmvem8Qi1nK5IJ4mzQKMKz5P91kAiIp937dJrYE3hdRGA N3BuTrkN9innSCNZNe08HeJWOG5o1jPzZ+2XDBfboL+ujU9Hc9Azb6/JMVrw5vZqqL b5bL0ltJu3eQv+jKXfShNoUEIfapTtEZrVkSbdHk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D1461F80430; Tue, 2 Mar 2021 22:26:41 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E5B2BF80511; Tue, 2 Mar 2021 22:26:29 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 656F3F80425 for ; Tue, 2 Mar 2021 22:26:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 656F3F80425 IronPort-SDR: Sghn54Ujl68GRySm8yw/bTsGQyL2KFzpy0GbtDtL9tXWftpJIWxP13TtP4lpmVVZpYoBV4jnRn yz76oEZJV+KA== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="174631411" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="174631411" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:09 -0800 IronPort-SDR: QEbQagLSPPDlWkM7QiE0c1N//bFmR3FjYGJCZs2CvWBanhPTf/+ZieXOEuD5FCW1EeBWna+d08 dzPwID67mbQg== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223470" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:08 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 18/24] ASoC: rt5668: remove useless assignments Date: Tue, 2 Mar 2021 15:25:21 -0600 Message-Id: <20210302212527.55158-19-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warnings: sound/soc/codecs/rt5668.c:1177:6: style: Redundant initialization for 'idx'. The initialized value is overwritten before it is read. [redundantInitialization] idx = rt5668_div_sel(rt5668, 1500000, div, ARRAY_SIZE(div)); ^ sound/soc/codecs/rt5668.c:1174:10: note: idx is initialized int idx = -EINVAL; ^ sound/soc/codecs/rt5668.c:1177:6: note: idx is overwritten idx = rt5668_div_sel(rt5668, 1500000, div, ARRAY_SIZE(div)); ^ sound/soc/codecs/rt5668.c:1202:6: style: Redundant initialization for 'idx'. The initialized value is overwritten before it is read. [redundantInitialization] idx = rt5668_div_sel(rt5668, ref, div, ARRAY_SIZE(div)); ^ sound/soc/codecs/rt5668.c:1191:25: note: idx is initialized int ref, val, reg, idx = -EINVAL; ^ sound/soc/codecs/rt5668.c:1202:6: note: idx is overwritten idx = rt5668_div_sel(rt5668, ref, div, ARRAY_SIZE(div)); ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt5668.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt5668.c b/sound/soc/codecs/rt5668.c index d966d6d1bf64..6ab1a8bc3735 100644 --- a/sound/soc/codecs/rt5668.c +++ b/sound/soc/codecs/rt5668.c @@ -1171,7 +1171,7 @@ static int set_dmic_clk(struct snd_soc_dapm_widget *w, struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); struct rt5668_priv *rt5668 = snd_soc_component_get_drvdata(component); - int idx = -EINVAL; + int idx; static const int div[] = {2, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128}; idx = rt5668_div_sel(rt5668, 1500000, div, ARRAY_SIZE(div)); @@ -1188,7 +1188,7 @@ static int set_filter_clk(struct snd_soc_dapm_widget *w, struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); struct rt5668_priv *rt5668 = snd_soc_component_get_drvdata(component); - int ref, val, reg, idx = -EINVAL; + int ref, val, reg, idx; static const int div[] = {1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48}; val = snd_soc_component_read(component, RT5668_GPIO_CTRL_1) & From patchwork Tue Mar 2 21:25:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112315 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71256C433DB for ; Tue, 2 Mar 2021 21:32:10 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B114E64F2A for ; Tue, 2 Mar 2021 21:32:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B114E64F2A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 919AD1A9D; Tue, 2 Mar 2021 22:31:17 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 919AD1A9D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720727; bh=jp9xDfrZpW1ajfQ7HBrZBsMyLaLgbj3F5Ru9LxqpjWI=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=kgExuioLFL5qGz9tfD6nRu3K3BDP45dkQyTC+Qj+r95IcdGXC5pQaPMR2G/fb/Hfm ZaoQ1Lsy7/RWESDqljOt/uG1k3969MzN11RUKCNFQT9x5WI5IqgBNT3mr0DLwXgFoY 0tJTxIaUdGq9C5VxaIz3IKYFnMdhpQxbEP9iXiGs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3B1DFF80519; Tue, 2 Mar 2021 22:26:31 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 92471F80511; Tue, 2 Mar 2021 22:26:28 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 49697F8042F for ; Tue, 2 Mar 2021 22:26:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 49697F8042F IronPort-SDR: pz6iRoQgUNe4iBP/Q3TYvg8Lj7uDoOd5/XJr0HxMtetLxpQdQQ37HCXicRUlZpCNeJGvYATPPd tQRqsGw2qLeg== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="174631417" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="174631417" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:11 -0800 IronPort-SDR: vXylk8Sda1/b/lZEs4Zcj90TR2o09FWDqAvoGF3oebXrxHZRiYlnsGysynj7gX6I66EmrRhVtr x02xe3OspgFg== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223473" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:09 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 19/24] ASoC: rt5670: clarify expression Date: Tue, 2 Mar 2021 15:25:22 -0600 Message-Id: <20210302212527.55158-20-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warning: sound/soc/codecs/rt5670.c:2519:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5670_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt5670.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt5670.c b/sound/soc/codecs/rt5670.c index 4063aac2a443..8dcda24f3ceb 100644 --- a/sound/soc/codecs/rt5670.c +++ b/sound/soc/codecs/rt5670.c @@ -2588,8 +2588,8 @@ static int rt5670_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int source, snd_soc_component_write(component, RT5670_PLL_CTRL1, pll_code.n_code << RT5670_PLL_N_SFT | pll_code.k_code); snd_soc_component_write(component, RT5670_PLL_CTRL2, - (pll_code.m_bp ? 0 : pll_code.m_code) << RT5670_PLL_M_SFT | - pll_code.m_bp << RT5670_PLL_M_BP_SFT); + ((pll_code.m_bp ? 0 : pll_code.m_code) << RT5670_PLL_M_SFT) | + (pll_code.m_bp << RT5670_PLL_M_BP_SFT)); rt5670->pll_in = freq_in; rt5670->pll_out = freq_out; From patchwork Tue Mar 2 21:25:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112325 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB5C9C433DB for ; Tue, 2 Mar 2021 21:34:02 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 091FB64F1A for ; Tue, 2 Mar 2021 21:34:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 091FB64F1A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5BA971928; Tue, 2 Mar 2021 22:33:10 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5BA971928 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720840; bh=DFGkakgEfSUzmqkJpjm7bPis+BfdZNN8inhSskDZ9Nk=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=FvuSJnVktbaP18O2KbRUpWvlZtbmCjnBjEcpa41/IxawfrorwY1qa3GR6DRJJpQHq ndGhOmp/oafiHPecIysR3JTQdvG6aNG01vdFHMGi4VXdJ2aRwqJHTtxRhII7cgiOdH XJ9f9clbFbQE9OYT2LDlofwkBbXQ7JFuvdrqsfk8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1B6F7F8052F; Tue, 2 Mar 2021 22:26:43 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 76BA0F80525; Tue, 2 Mar 2021 22:26:33 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1A238F8049C for ; Tue, 2 Mar 2021 22:26:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1A238F8049C IronPort-SDR: YwmzBja6sjnEhUL0MNBt35/WcGNlxTk3BTrAa+YDvPANG6727vdqGAxVOpYdCevNJaPELVwvBA 2uWHz/rXNeyw== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="174631423" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="174631423" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:12 -0800 IronPort-SDR: 2IOOAL9MHKFoMV74SijB/WsG/GP9GzfV8AYreD9iXoRt5wpM7utTI4WDLZ6r2WXk3ElcmRfreo azCULaczhKwQ== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223479" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:11 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 20/24] ASoC: rt5677: clarify expression Date: Tue, 2 Mar 2021 15:25:23 -0600 Message-Id: <20210302212527.55158-21-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warning: sound/soc/codecs/rt5677.c:4571:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5677_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt5677.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index 9e449d35fc28..bc5d1d73470e 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c @@ -4568,8 +4568,8 @@ static int rt5677_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int source, regmap_write(rt5677->regmap, RT5677_PLL1_CTRL1, pll_code.n_code << RT5677_PLL_N_SFT | pll_code.k_code); regmap_write(rt5677->regmap, RT5677_PLL1_CTRL2, - (pll_code.m_bp ? 0 : pll_code.m_code) << RT5677_PLL_M_SFT | - pll_code.m_bp << RT5677_PLL_M_BP_SFT); + ((pll_code.m_bp ? 0 : pll_code.m_code) << RT5677_PLL_M_SFT) | + (pll_code.m_bp << RT5677_PLL_M_BP_SFT)); rt5677->pll_in = freq_in; rt5677->pll_out = freq_out; From patchwork Tue Mar 2 21:25:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112329 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61D34C433DB for ; Tue, 2 Mar 2021 21:34:45 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AF21B64F2C for ; Tue, 2 Mar 2021 21:34:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AF21B64F2C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2E1DD1ACB; Tue, 2 Mar 2021 22:33:53 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2E1DD1ACB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720883; bh=SBWj+QMmVPkOz0RIFwnWjI4QqhUYkmmzX8Fk7wSct1w=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=vZreykop0QWc7XQ55kE3aTCu6bKyQE8F8ZvEset+8ySLF5C3cCXoqf5/KfiqTAGC9 eDQ/vkQogOnq+58TxN3jYTqyKM3uBPq8aawjFuak7IT6qInQHcBaUPnpVO2kW+1iyw Sj2jZI/vyrqS0REknO5KxzLwFY0fnOyj1kgkOzK4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3F287F80539; Tue, 2 Mar 2021 22:26:44 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9D496F80525; Tue, 2 Mar 2021 22:26:34 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1F0F8F804AA for ; Tue, 2 Mar 2021 22:26:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1F0F8F804AA IronPort-SDR: cja1bmkJ2XtU9wRtIANdWx6UMMwv0PUtbkEqPHbfQcmH/MXkjscjUultVpwOyeWpQdD6qxh7fJ woBcbpmirCWg== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="174631428" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="174631428" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:13 -0800 IronPort-SDR: X6uPKS4QBacIFL+4uhPVLCXKmKDGEoXcDMwquWY0Fyywxe33rkgnIOmSxA2wcyvkDBUB+RIJ1u cSOsLsaqAbLg== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223482" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:12 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 21/24] ASoC: rt5677: remove useless assignment Date: Tue, 2 Mar 2021 15:25:24 -0600 Message-Id: <20210302212527.55158-22-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warning: sound/soc/codecs/rt5677.c:5335:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0, loop, i, reg_irq, virq; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt5677.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index bc5d1d73470e..f655228c8c4b 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c @@ -5332,7 +5332,7 @@ static bool rt5677_check_hotword(struct rt5677_priv *rt5677) static irqreturn_t rt5677_irq(int unused, void *data) { struct rt5677_priv *rt5677 = data; - int ret = 0, loop, i, reg_irq, virq; + int ret, loop, i, reg_irq, virq; bool irq_fired = false; mutex_lock(&rt5677->irq_lock); From patchwork Tue Mar 2 21:25:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112333 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC52DC433E0 for ; Tue, 2 Mar 2021 21:35:26 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2649664F2C for ; Tue, 2 Mar 2021 21:35:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2649664F2C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4D4B819FD; Tue, 2 Mar 2021 22:34:34 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4D4B819FD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720924; bh=BRnrxiuYZkmHlSN0fltmA3kO2VZt7Nyo8TY3l7m9wc0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=EB32jtGmWn0VRod98HzOtNv5nu/C27UC8ppvDUB8dhDsWPtIk2rn0apYmdROKf+yS Uac5rH3Gg36Xn5P9rFxK3E2R3WR2UONqs6//FoctY9VW/yoAyQ1/a1M3vVdBFOX3T9 mjBuMT17VmDbNKSVeznKO+MoTZWkl4+QoWAAX5dc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A54BAF80549; Tue, 2 Mar 2021 22:26:45 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8229AF80527; Tue, 2 Mar 2021 22:26:35 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1D17EF804B1 for ; Tue, 2 Mar 2021 22:26:15 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1D17EF804B1 IronPort-SDR: MH2DZzcRMETzlhyuZKhcGMtQSM2TP20tkU7HSOSw/89PFlXpoPhuNS1kIas0/geSzSiYx5ghdc qdwsUiH7x6Kg== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="174631441" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="174631441" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:14 -0800 IronPort-SDR: ojVFlyp+qxoGQ9vjzJn50ABx5G0vh2TF1GzlGsXaw6X6g+gSNJ5vNFky6M5UmSF00AtLIVt1ui Q+N27EvkwLVQ== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223487" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:13 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 22/24] ASoC: rt5682: clarify expression Date: Tue, 2 Mar 2021 15:25:25 -0600 Message-Id: <20210302212527.55158-23-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warning: sound/soc/codecs/rt5682.c:2401:65: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5682_PLL_M_SFT | Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt5682.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c index b306ac4b9b2e..e4542200009d 100644 --- a/sound/soc/codecs/rt5682.c +++ b/sound/soc/codecs/rt5682.c @@ -2396,10 +2396,10 @@ static int rt5682_set_component_pll(struct snd_soc_component *component, pll_code.n_code, pll_code.k_code); snd_soc_component_write(component, RT5682_PLL_CTRL_1, - pll_code.n_code << RT5682_PLL_N_SFT | pll_code.k_code); + (pll_code.n_code << RT5682_PLL_N_SFT) | pll_code.k_code); snd_soc_component_write(component, RT5682_PLL_CTRL_2, - (pll_code.m_bp ? 0 : pll_code.m_code) << RT5682_PLL_M_SFT | - pll_code.m_bp << RT5682_PLL_M_BP_SFT | RT5682_PLL_RST); + ((pll_code.m_bp ? 0 : pll_code.m_code) << RT5682_PLL_M_SFT) | + (pll_code.m_bp << RT5682_PLL_M_BP_SFT | RT5682_PLL_RST)); } rt5682->pll_in[pll_id] = freq_in; From patchwork Tue Mar 2 21:25:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112335 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE9A0C433E0 for ; Tue, 2 Mar 2021 21:35:45 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1ED2164F34 for ; Tue, 2 Mar 2021 21:35:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1ED2164F34 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 59B4E1AC3; Tue, 2 Mar 2021 22:34:53 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 59B4E1AC3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720943; bh=Al11bVZWOFSBD34GQkdChWF9YLIJH/XwJYR9rBcuLyg=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=UVdqPjbFEkABqkrueuwfhsNdKb7vTJsR9hPurjLjh73W0mz1b4nmdAwPtjmXEg1Uj k+RmKw/IKevVJdaWKpaTCo7YWNc7ofH7EupjDkm2hDSssSx01N39NUK0CzVuAhKkxF DmW8kZcXgnwXr/2eDlQRWRnWv2IWSgd5l7ysEKUI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 42E98F80553; Tue, 2 Mar 2021 22:26:46 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 12F23F80527; Tue, 2 Mar 2021 22:26:42 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A8D40F802A9 for ; Tue, 2 Mar 2021 22:26:16 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A8D40F802A9 IronPort-SDR: yfBZnVF8QVjjaD385f43W2qaj0EXJGbkf4YL4/EJAyRHB3+LQ8CzMoyCQaN6tVfdsuO8hLZ+8d BhOhjqupPJYg== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="174631449" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="174631449" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:16 -0800 IronPort-SDR: u5viCwLYaLyRuyuKDXHP+zEmSEk0tWl3pC0sBI1B7JToos1g/oHdBbyxCornmlahDv45iDDhGQ gmFgLmLwtNow== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223492" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:14 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 23/24] ASoC: rt5682: remove useless assignments Date: Tue, 2 Mar 2021 15:25:26 -0600 Message-Id: <20210302212527.55158-24-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck warnings: sound/soc/codecs/rt5682.c:1234:6: style: Redundant initialization for 'idx'. The initialized value is overwritten before it is read. [redundantInitialization] idx = rt5682_div_sel(rt5682, dmic_clk_rate, div, ARRAY_SIZE(div)); ^ sound/soc/codecs/rt5682.c:1228:10: note: idx is initialized int idx = -EINVAL, dmic_clk_rate = 3072000; ^ sound/soc/codecs/rt5682.c:1234:6: note: idx is overwritten idx = rt5682_div_sel(rt5682, dmic_clk_rate, div, ARRAY_SIZE(div)); ^ sound/soc/codecs/rt5682.c:1263:6: style: Redundant initialization for 'idx'. The initialized value is overwritten before it is read. [redundantInitialization] idx = rt5682_div_sel(rt5682, ref, div_f, ARRAY_SIZE(div_f)); ^ sound/soc/codecs/rt5682.c:1248:25: note: idx is initialized int ref, val, reg, idx = -EINVAL; ^ sound/soc/codecs/rt5682.c:1263:6: note: idx is overwritten idx = rt5682_div_sel(rt5682, ref, div_f, ARRAY_SIZE(div_f)); ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt5682.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c index e4542200009d..8d5b8f01f55c 100644 --- a/sound/soc/codecs/rt5682.c +++ b/sound/soc/codecs/rt5682.c @@ -1225,7 +1225,7 @@ static int set_dmic_clk(struct snd_soc_dapm_widget *w, struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); - int idx = -EINVAL, dmic_clk_rate = 3072000; + int idx, dmic_clk_rate = 3072000; static const int div[] = {2, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128}; if (rt5682->pdata.dmic_clk_rate) @@ -1245,7 +1245,7 @@ static int set_filter_clk(struct snd_soc_dapm_widget *w, struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); - int ref, val, reg, idx = -EINVAL; + int ref, val, reg, idx; static const int div_f[] = {1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48}; static const int div_o[] = {1, 2, 4, 6, 8, 12, 16, 24, 32, 48}; From patchwork Tue Mar 2 21:25:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12112337 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62584C433DB for ; Tue, 2 Mar 2021 21:36:10 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A473464F38 for ; Tue, 2 Mar 2021 21:36:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A473464F38 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 18DD41AD4; Tue, 2 Mar 2021 22:35:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 18DD41AD4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1614720968; bh=uW1LMlV7iQTVtexkWuUHbpGOnRf5yNNEFq9POn6+7Jo=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=MjCFSEiiErMB12X6JBhhDLL8tPk/vfJjqOOYUFGVNUhIh4HvxmSnEjsYkiIVlCPL3 hcVc9dbHrEiRwHaGKnhKNvymd0PxTMM+J8kLqfjhQdTTXlV/i/MfoTRuDQ4CIz0sQ+ INNgl0XboyFElwPNwImzgQDAC8fe6C7lK1oXTCHY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C562DF80557; Tue, 2 Mar 2021 22:26:46 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 94194F8052E; Tue, 2 Mar 2021 22:26:42 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D4A63F804D1 for ; Tue, 2 Mar 2021 22:26:17 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D4A63F804D1 IronPort-SDR: qSGJcAnflutKmPO9t/1Qqfwv40tpXBaEa+FQHIsCbAZDvqsCnRNPWyLNZ8mpTgI12M6q2bX/xl QOMIdbYffB/Q== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="174631453" X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="174631453" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:17 -0800 IronPort-SDR: pC9NKtUICHh4s6qodHufeA2cQjkaWUPwgZSGCuHlh+bWzgDtCE3g7QpHfXZp/K1CHCjtYTxFtV iCLbrckwha9A== X-IronPort-AV: E=Sophos;i="5.81,217,1610438400"; d="scan'208";a="399223494" Received: from btucker-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.209.60.230]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 13:26:16 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 24/24] ASoC: rt5682: remove useless initialization Date: Tue, 2 Mar 2021 15:25:27 -0600 Message-Id: <20210302212527.55158-25-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> References: <20210302212527.55158-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Oder Chiou , Jack Yu , tiwai@suse.de, Pierre-Louis Bossart , broonie@kernel.org, Shuming Fan , Bard liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" cppcheck complains about a possible null pointer dereference, but the problem is rather an useless initialization before walking through a list. Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt5682.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c index 8d5b8f01f55c..559dc6db1f7c 100644 --- a/sound/soc/codecs/rt5682.c +++ b/sound/soc/codecs/rt5682.c @@ -2751,7 +2751,7 @@ static int rt5682_bclk_set_rate(struct clk_hw *hw, unsigned long rate, container_of(hw, struct rt5682_priv, dai_clks_hw[RT5682_DAI_BCLK_IDX]); struct snd_soc_component *component = rt5682->component; - struct snd_soc_dai *dai = NULL; + struct snd_soc_dai *dai; unsigned long factor; if (!rt5682_clk_check(rt5682))