From patchwork Fri May 20 21:17:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 574954 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B18F4C433F5 for ; Fri, 20 May 2022 21:19:05 +0000 (UTC) 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 BA71E174D; Fri, 20 May 2022 23:18:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BA71E174D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1653081543; bh=hnKKp+x2OFF7w/kV5A3LK4iejUEMYtF3UORFuFEazF8=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=NsvEjI+rYNmXQHveJp4axNQGWt8eCOsGb7NFXaF4u/3WP02ePya2FMUxDiQI6Uopu df/P7JF4X42He4gLMF+6LRW5QrnesK5ZuclteoIGLsikjJrxHSik7+G52Ta5hw7f9w SYNZamE09PQG0ZVU/SDONUmeEuBNMv8PE3zbkF/w= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 32BC9F8051E; Fri, 20 May 2022 23:17:44 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 17D2FF80153; Fri, 20 May 2022 23:17:43 +0200 (CEST) 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 EC3ABF80153 for ; Fri, 20 May 2022 23:17:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EC3ABF80153 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="j7LRX0dw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653081457; x=1684617457; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hnKKp+x2OFF7w/kV5A3LK4iejUEMYtF3UORFuFEazF8=; b=j7LRX0dwtivboaJ02bkV0GBRUnpZj8N0Beyk1nE3W4Ldy6Ujc5zrOCAB fhaUGEOevQrE0Bv10q1XGR7nZ4RgcsI/jUywovi1Md1YNJUn1efiPU1Pv 7zV8lkK6cDSObVG+xmNKBXMHUGW+IH/hTN93xc3ls4OYtOINjAvfUNgTF BGUGl18bhAFiVehkW1n2h6QA8piHUELJMqmZ1Ny7vAkLs/94cTx701hRu TKlJaG/KFzrNrhWvm1u8cunGcPep7q6wOBI6rfI1FkTTgtv2uujJBpsnH 6mLQmLY/FP7Wui61Zgw6YJfuqsil5X4Oyf3p/0FspE1+0xAf7DK9lsmTk Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10353"; a="270324219" X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="270324219" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:31 -0700 X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="674796009" Received: from achsu-mobl2.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.212.181.190]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:30 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 01/16] ASoC: cs35l45: typo in argument definition Date: Fri, 20 May 2022 16:17:04 -0500 Message-Id: <20220520211719.607543-2-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> References: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, =?utf-8?q?P=C3=A9ter_Ujfalusi?= , broonie@kernel.org, Bard Liao , Pierre-Louis Bossart 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/cs35l45-tables.c:36:49: style:inconclusive: Function 'cs35l45_apply_patch' argument 1 names different: declaration 'cs43l45' definition 'cs35l45'. [funcArgNamesDifferent] Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi --- sound/soc/codecs/cs35l45.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/cs35l45.h b/sound/soc/codecs/cs35l45.h index 4e266d19cd1cd..8f98cbbf6209f 100644 --- a/sound/soc/codecs/cs35l45.h +++ b/sound/soc/codecs/cs35l45.h @@ -209,7 +209,7 @@ struct cs35l45_private { extern const struct dev_pm_ops cs35l45_pm_ops; extern const struct regmap_config cs35l45_i2c_regmap; extern const struct regmap_config cs35l45_spi_regmap; -int cs35l45_apply_patch(struct cs35l45_private *cs43l45); +int cs35l45_apply_patch(struct cs35l45_private *cs35l45); unsigned int cs35l45_get_clk_freq_id(unsigned int freq); int cs35l45_probe(struct cs35l45_private *cs35l45); int cs35l45_remove(struct cs35l45_private *cs35l45); From patchwork Fri May 20 21:17:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 574952 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 2323BC433EF for ; Fri, 20 May 2022 21:20:12 +0000 (UTC) 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 709291715; Fri, 20 May 2022 23:19:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 709291715 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1653081610; bh=YN5SNnQ5Xu00AA94sT5Tk3tM9oNYubjc3Q6iQWMLRMI=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=J/T7UDg4mufePMZVuIHUn7qimkEwnmnMWekNprjVslth55AgWw5j2VSVSg7thk4Fv 2fEVLu/fGoSxt5NH+xsUWUXXxDdXXCZZcbnvG02hZh6NCjL5tZlKCLu/zRz/YqzucG +pMZh3+MHaigYgMdtbyeFmbfZmRFmcYMy7xEi3Hs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id EEAF0F8053C; Fri, 20 May 2022 23:17:51 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0C38BF80537; Fri, 20 May 2022 23:17:49 +0200 (CEST) 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 A2913F80240 for ; Fri, 20 May 2022 23:17:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A2913F80240 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jnNUHoh0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653081460; x=1684617460; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YN5SNnQ5Xu00AA94sT5Tk3tM9oNYubjc3Q6iQWMLRMI=; b=jnNUHoh0z8t18dt33wzVbK7DhGAOsOFi4LBmRH3YeaDFt2W9CBJmF0I3 KB9WBlECD4UhYJ1wHYObG+Fn7plJG/WcVJS+nwv+5JHWQj23yY4gt0Z4Y LeXZ0o79/kcKcFj+UfkjHEFbmo2/isiuZB52DhrHsPiynkug19Bd5wX0d HT90TebWo5c3J+kwZZQJ8UlUDHdhrMKURCufM8CaYZatlR1E+MfglZhPW Vux6wF0qY+QwKvoyNElLZFyBjggS3pqmDQWjAZlg0ovh6+A5z4yAT56Pn IXi+zpIVBwU+3YmQ5mdi/zJTaXM6uk3hA3paVRSlNaaCIvxoXxuLqca27 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10353"; a="270324222" X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="270324222" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:32 -0700 X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="674796011" Received: from achsu-mobl2.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.212.181.190]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:31 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 02/16] ASoC: cs42l42: remove redundant test Date: Fri, 20 May 2022 16:17:05 -0500 Message-Id: <20220520211719.607543-3-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> References: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, =?utf-8?q?P=C3=A9ter_Ujfalusi?= , broonie@kernel.org, Bard Liao , Pierre-Louis Bossart 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/cs42l42.c:1704:28: style: The statement 'if (cs42l42->plug_state!=CS42L42_TS_TRANS) cs42l42->plug_state=CS42L42_TS_TRANS' is logically equivalent to 'cs42l42->plug_state=CS42L42_TS_TRANS'. [duplicateConditionalAssign] if (cs42l42->plug_state != CS42L42_TS_TRANS) ^ sound/soc/codecs/cs42l42.c:1705:25: note: Assignment 'cs42l42->plug_state=CS42L42_TS_TRANS' cs42l42->plug_state = CS42L42_TS_TRANS; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi --- sound/soc/codecs/cs42l42.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c index 4fade23887972..6ca74c0d46eaa 100644 --- a/sound/soc/codecs/cs42l42.c +++ b/sound/soc/codecs/cs42l42.c @@ -1701,8 +1701,7 @@ static irqreturn_t cs42l42_irq_thread(int irq, void *data) break; default: - if (cs42l42->plug_state != CS42L42_TS_TRANS) - cs42l42->plug_state = CS42L42_TS_TRANS; + cs42l42->plug_state = CS42L42_TS_TRANS; } } From patchwork Fri May 20 21:17:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 574553 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 49246C433EF for ; Fri, 20 May 2022 21:19:24 +0000 (UTC) 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 6AF6B1726; Fri, 20 May 2022 23:18:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6AF6B1726 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1653081562; bh=wuumc8ngdy1UuMRDft+RyMRFXKpQrYXc5kbDXAD6KCI=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=hB6I18sSbBUmtAWVAIXCsOIJ0wC38fSAMs+dGTxtfLI7ZJpAfYVZrxa6UUpVeH9OG aT3opiIn9Tz1X828SWJP8DkDgUTTTy1skWNGCNfAspxpQ4BxFnQiGmVkK40/s8B/ON z0LrbKZG1iEM6EGQhCf2mdhce2mLYqeTfwmWjX/A= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E05ADF80529; Fri, 20 May 2022 23:17:47 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E3A7DF80525; Fri, 20 May 2022 23:17:44 +0200 (CEST) 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 DC567F8019D for ; Fri, 20 May 2022 23:17:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DC567F8019D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="mdUy8sh5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653081459; x=1684617459; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wuumc8ngdy1UuMRDft+RyMRFXKpQrYXc5kbDXAD6KCI=; b=mdUy8sh5mniuzTvKRY4YwAPUjrYrK8m9ucpgx6fVo8mNA0i2kcwBr8Hl kXHg3vwCmdcw7pMAg9o+3cquxE/wvtSicWibA6x1J8wjMd6D1dBpAajuR 8oY3dXk9714/Q7R1XGV5lfLb1AFGWEZ1VQ4vJrkDWF4zbpqa32QuRpTjo TPxUJeJx4NF+6+NSI13DDYxgxgpmXT7aRIStjRos2KWF+Uav/cc2HZdWP MyMiatInExTPDWDuCSo6IHTbcAHr1eeccG7LWmzm7s0lLXWAVesAUpxfs NAf7dEe8jRd2iFFFO6+qixVTL9JzhDG0SNqVKU1tIl2EuMituHYBLELao w==; X-IronPort-AV: E=McAfee;i="6400,9594,10353"; a="270324225" X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="270324225" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:32 -0700 X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="674796014" Received: from achsu-mobl2.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.212.181.190]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:32 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 03/16] ASoC: wcd-mbhc-v2: remove useless initialization Date: Fri, 20 May 2022 16:17:06 -0500 Message-Id: <20220520211719.607543-4-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> References: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, =?utf-8?q?P=C3=A9ter_Ujfalusi?= , broonie@kernel.org, Bard Liao , Pierre-Louis Bossart 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/wcd-mbhc-v2.c:1309:17: style: Variable 'clamp_state' is assigned a value that is never used. [unreadVariable] u8 clamp_state = 0; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi --- sound/soc/codecs/wcd-mbhc-v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wcd-mbhc-v2.c b/sound/soc/codecs/wcd-mbhc-v2.c index c53c2ef33e1a2..31009283e7d4a 100644 --- a/sound/soc/codecs/wcd-mbhc-v2.c +++ b/sound/soc/codecs/wcd-mbhc-v2.c @@ -1306,7 +1306,7 @@ static irqreturn_t wcd_mbhc_adc_hs_rem_irq(int irq, void *data) static irqreturn_t wcd_mbhc_adc_hs_ins_irq(int irq, void *data) { struct wcd_mbhc *mbhc = data; - u8 clamp_state = 0; + u8 clamp_state; u8 clamp_retry = WCD_MBHC_FAKE_INS_RETRY; /* From patchwork Fri May 20 21:17:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 574953 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 802AAC433F5 for ; Fri, 20 May 2022 21:19:32 +0000 (UTC) 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 978211712; Fri, 20 May 2022 23:18:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 978211712 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1653081570; bh=0t8/mt6j6UV5XzgqQ+i3Ss8Ro8+hdA92/oyg44K+0g8=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=GBsjdgfCTPwuOupVlvQLqZCl85V2WzmNoIT8jvIu/LC1BHvZqivnxcbGNEhvEUkfQ 975KTJaiUWanqeIMHL75E4NZ4ggyNyJQKBd2HYBwI4MRY2IHLyqVq6W10cnzV86tTe joaS1WDxIzOdA6dsZpf4UkkyrrvtBeyslQ3XP3wE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id BD7DEF80533; Fri, 20 May 2022 23:17:48 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 268BAF80520; Fri, 20 May 2022 23:17:45 +0200 (CEST) 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 3CBA2F800D2 for ; Fri, 20 May 2022 23:17:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3CBA2F800D2 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="hZluMwse" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653081459; x=1684617459; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0t8/mt6j6UV5XzgqQ+i3Ss8Ro8+hdA92/oyg44K+0g8=; b=hZluMwseGyGWJX9pYvMUTNg8WmbFEqVjor56AQs/IUqdvoJfqiZ2BCAU zuXiNfx0dseg+l6iyoK5c8Q7Z0uHU/mT+vTb0JpF2+utSQwJo7DLQrDr0 qEGknnjVW6x5YwTBBEW/9AxuVba+NuAei3ddZ8Hlq6Ro+FGWBOiK6qezd n4ER10pWYYKxWGkJlLMwysJWe5TUhrOeI5/uLNrCoJtUCVavL+JedvhjK kjm1slsUuaSRylO/wDevGfWWaIhBDIu6LI/dATpFzm+PCL2/oCXiAEgVn +gKnFxqwNpvM4x/Lc56uJavX2Z4VmzgqZJXPEI7acSFxs0h6X3oFdr5xU Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10353"; a="270324228" X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="270324228" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:33 -0700 X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="674796017" Received: from achsu-mobl2.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.212.181.190]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:32 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 04/16] ASoC: wcd9335: remove redundant tests Date: Fri, 20 May 2022 16:17:07 -0500 Message-Id: <20220520211719.607543-5-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> References: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, =?utf-8?q?P=C3=A9ter_Ujfalusi?= , broonie@kernel.org, Bard Liao , Pierre-Louis Bossart 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/wcd9335.c:1810:23: style: Condition 'tx_port>=4' is always true [knownConditionTrueFalse] } else if ((tx_port >= 4) && (tx_port < 8)) { ^ sound/soc/codecs/wcd9335.c:1806:15: note: Assuming that condition 'tx_port<4' is not redundant if (tx_port < 4) { ^ sound/soc/codecs/wcd9335.c:1810:23: note: Condition 'tx_port>=4' is always true } else if ((tx_port >= 4) && (tx_port < 8)) { ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi --- sound/soc/codecs/wcd9335.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index 617a36a89dfed..e1b6930480842 100644 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -1807,11 +1807,11 @@ static int wcd9335_set_decimator_rate(struct snd_soc_dai *dai, tx_port_reg = WCD9335_CDC_IF_ROUTER_TX_MUX_CFG0; shift = (tx_port << 1); shift_val = 0x03; - } else if ((tx_port >= 4) && (tx_port < 8)) { + } else if (tx_port < 8) { tx_port_reg = WCD9335_CDC_IF_ROUTER_TX_MUX_CFG1; shift = ((tx_port - 4) << 1); shift_val = 0x03; - } else if ((tx_port >= 8) && (tx_port < 11)) { + } else if (tx_port < 11) { tx_port_reg = WCD9335_CDC_IF_ROUTER_TX_MUX_CFG2; shift = ((tx_port - 8) << 1); shift_val = 0x03; From patchwork Fri May 20 21:17:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 574951 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 2EA40C433EF for ; Fri, 20 May 2022 21:20:43 +0000 (UTC) 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 4EFFE1742; Fri, 20 May 2022 23:19:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4EFFE1742 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1653081641; bh=PWCXGav9poGCZON1xF+ElDF2R4PZzr1n5vglJtDMPmw=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=pu1ADbcz/IWpBXeR+a/rRh7v9C6ixHXzzlz0emLPN5KI76buy1tz2rygKMcBAFdhV kqS38g4EbWau5+ibGMbE36Gn9huuGbkfKCJ9xJkSAwOD73Yw7MVmgEP7PCYx1ffrIb b4ZbqTa6aVXkEMM+vOOyfUlDHR8ISEGzPmigvMA0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1E2F9F80544; Fri, 20 May 2022 23:17:55 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 376DAF804C1; Fri, 20 May 2022 23:17:49 +0200 (CEST) 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 41D25F804C1 for ; Fri, 20 May 2022 23:17:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 41D25F804C1 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="WDH+Ar6/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653081461; x=1684617461; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PWCXGav9poGCZON1xF+ElDF2R4PZzr1n5vglJtDMPmw=; b=WDH+Ar6/dG0HVB8oJEJNY7kkNVyZ5EVZB3F5jH2QfmezxYYHIA5EUue/ p+cwHjF906jUVVHiTQBqgInGqUjUKxeFsjtuxC+nkQ65ZFbBMOyIV2qCz ZrAF5wNikTBUrznq5hnrMoLRPgKihnYUWt1+8QslA3ChI/cbrte9m2ZNX u1mxjf8Yt7T/Eo1b0UJ0GPDqznKY2d+zqQVYCBl62+zEVvjzDGFq1x3Tw eVSlYVz4hRle1Il1GOPK4zUqBHGGIF4ohNequcmFFVy3R5LQ/vAyMTQcS ZPK8zzfT2Rwwd1ZOskQwos5H1ev+Rv+MWturnlcDFCMv1RVMbyF4DgK/8 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10353"; a="270324229" X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="270324229" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:34 -0700 X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="674796020" Received: from achsu-mobl2.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.212.181.190]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:33 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 05/16] ASoC: Intel: atom: sst: remove useless initialization Date: Fri, 20 May 2022 16:17:08 -0500 Message-Id: <20220520211719.607543-6-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> References: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, =?utf-8?q?P=C3=A9ter_Ujfalusi?= , broonie@kernel.org, Bard Liao , Pierre-Louis Bossart 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 reports an invalid null pointer dereference but there's indeed no need to initialize a loop variable. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi --- sound/soc/intel/atom/sst/sst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/atom/sst/sst.c b/sound/soc/intel/atom/sst/sst.c index 3a42d68c0247b..160b50f479fb4 100644 --- a/sound/soc/intel/atom/sst/sst.c +++ b/sound/soc/intel/atom/sst/sst.c @@ -114,7 +114,7 @@ static irqreturn_t intel_sst_interrupt_mrfld(int irq, void *context) static irqreturn_t intel_sst_irq_thread_mrfld(int irq, void *context) { struct intel_sst_drv *drv = (struct intel_sst_drv *) context; - struct ipc_post *__msg, *msg = NULL; + struct ipc_post *__msg, *msg; unsigned long irq_flags; spin_lock_irqsave(&drv->rx_msg_lock, irq_flags); From patchwork Fri May 20 21:17:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 574551 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 3B172C433F5 for ; Fri, 20 May 2022 21:20:23 +0000 (UTC) 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 7A4A91735; Fri, 20 May 2022 23:19:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7A4A91735 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1653081621; bh=talhVHpiIiRh1i24aZV+2hUqQGbDBg0vp2vF49dS6gE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=EscZvNp4BsRjlL8dXz/CPx6O5oSGNUmmHLppteThg2A8N3WirVCeouiHkHzPaqMOd oDYoYet52skfi1RdDd+x1I6TtT2XTdE/OSspeX1AmHDjXLgay7jcpDVaGO0hNNSpXW iQ7oq6DGIXKcdSjIBsdQT8z+bjZiYj00qCURsDa8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 60716F80542; Fri, 20 May 2022 23:17:53 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1DDA7F80240; Fri, 20 May 2022 23:17:49 +0200 (CEST) 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 74010F8051A for ; Fri, 20 May 2022 23:17:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 74010F8051A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Oq1bnv1u" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653081461; x=1684617461; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=talhVHpiIiRh1i24aZV+2hUqQGbDBg0vp2vF49dS6gE=; b=Oq1bnv1ueDbz7RrH0lMjwUs7ZedGfb07KzYNeJnM68v/wZ9zk3VZZWRM ynd1CDmuYOE7aem/h609u+JE2hwGvP9JjoVpSpcp7fWEZXsNGRxDHUDhW 9tLyR/5eNhdd2YVX1U9KHWyNlFPxe+6PLONamawCVcZSlJkAgpTjrcLkM ANeKfZiaJes1rABQyv+CE2Rv3NTNmUXIQDHcjmK/X6rqQqWXTTopU9rnx cAAB6ivxzLfkdermQZImh4iqCJO9GJg5wt3mrE5X/c+iUiS7ELMPPMrRp hwG8LQfsfs/O7nQbSbC++f2nHIvWWWH5OpAuLhVNmRxEDlRd5LI2eJmzb A==; X-IronPort-AV: E=McAfee;i="6400,9594,10353"; a="270324233" X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="270324233" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:35 -0700 X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="674796022" Received: from achsu-mobl2.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.212.181.190]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:34 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 06/16] ASoC: Intel: atom: sst_ipc: remove redundant test Date: Fri, 20 May 2022 16:17:09 -0500 Message-Id: <20220520211719.607543-7-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> References: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, =?utf-8?q?P=C3=A9ter_Ujfalusi?= , broonie@kernel.org, Bard Liao , Pierre-Louis Bossart 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/intel/atom/sst/sst_ipc.c:344:30: style: Condition 'drv_id' is always true [knownConditionTrueFalse] if (msg_high.part.result && drv_id && !msg_high.part.large) { ^ sound/soc/intel/atom/sst/sst_ipc.c:337:13: note: Assuming that condition 'drv_id==0' is not redundant if (drv_id == SST_ASYNC_DRV_ID) { ^ sound/soc/intel/atom/sst/sst_ipc.c:344:30: note: Condition 'drv_id' is always true if (msg_high.part.result && drv_id && !msg_high.part.large) { ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi --- sound/soc/intel/atom/sst/sst_ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/atom/sst/sst_ipc.c b/sound/soc/intel/atom/sst/sst_ipc.c index 4e8382097e618..78ea67c7a1281 100644 --- a/sound/soc/intel/atom/sst/sst_ipc.c +++ b/sound/soc/intel/atom/sst/sst_ipc.c @@ -341,7 +341,7 @@ void sst_process_reply_mrfld(struct intel_sst_drv *sst_drv_ctx, } /* FW sent short error response for an IPC */ - if (msg_high.part.result && drv_id && !msg_high.part.large) { + if (msg_high.part.result && !msg_high.part.large) { /* 32-bit FW error code in msg_low */ dev_err(sst_drv_ctx->dev, "FW sent error response 0x%x", msg_low); sst_wake_up_block(sst_drv_ctx, msg_high.part.result, From patchwork Fri May 20 21:17:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 574550 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 0892AC433EF for ; Fri, 20 May 2022 21:20:58 +0000 (UTC) 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 556231713; Fri, 20 May 2022 23:20:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 556231713 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1653081656; bh=SDCxCQyAr+JHAOYb+FdHmql9m6DMqjDm7oPefgqcknY=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=hHfA/EUxSkqShNDJVlxFG5TnkjuDwvDgfhdXHmvbCvxkKhD2nvz1Nt+fVqm4EO/q4 VYCdlY7QPI9AXVw7a6asR6MfaaNluVisAk0uFm3+wwd8Fnn9B8v5FzD8MD1aeLg50U 7zDUwyEzcz20FeG8FbO7vnQJj5s/mvqeWYy3fGLE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 86AECF8054A; Fri, 20 May 2022 23:17:56 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 47D70F80534; Fri, 20 May 2022 23:17:49 +0200 (CEST) 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 4FA4FF8051C for ; Fri, 20 May 2022 23:17:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4FA4FF8051C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Mv9C2Ko7" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653081462; x=1684617462; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SDCxCQyAr+JHAOYb+FdHmql9m6DMqjDm7oPefgqcknY=; b=Mv9C2Ko7yr7wZjIIIL2001M6QZFUXciYK1ZgFop7nqpFRd2ikn08xJCe 5cAGAwWVMgGsrEkk8plppJzxcmZcVDAX1su23ablJ3pRxjxNPocUskt3R wMsBO8GQFdxufbo1PrwM2XmybmHx293Lgc4O5mPaC+vG+aRauJiyIJCG0 u5L6nhPqo8eDHUlaK+fufkrCJ3hiR8u6iQjdQx2TXSWxQojLajr11lTma jxZS/cA2E3ht539r7mFe2t6yWev1IvQq9Vue+Y8nmA5XF1F3wPCBWczH+ 4n3FHkrKKCEHVZvYBXaI6DZkgLJIru3K1lSzUBRYgi+hEBqlXFyIp1mQH A==; X-IronPort-AV: E=McAfee;i="6400,9594,10353"; a="270324236" X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="270324236" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:35 -0700 X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="674796027" Received: from achsu-mobl2.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.212.181.190]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:35 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 07/16] ASoC: Intel: atom: sst_ipc: remove useless initializations Date: Fri, 20 May 2022 16:17:10 -0500 Message-Id: <20220520211719.607543-8-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> References: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, =?utf-8?q?P=C3=A9ter_Ujfalusi?= , broonie@kernel.org, Bard Liao , Pierre-Louis Bossart 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 throws invalid NULL dereference warnings but there's indeed no need to initialize a loop variable or initialize to NULL before allocating memory. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi --- sound/soc/intel/atom/sst/sst_ipc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/intel/atom/sst/sst_ipc.c b/sound/soc/intel/atom/sst/sst_ipc.c index 78ea67c7a1281..4e039c7173d8c 100644 --- a/sound/soc/intel/atom/sst/sst_ipc.c +++ b/sound/soc/intel/atom/sst/sst_ipc.c @@ -28,7 +28,7 @@ struct sst_block *sst_create_block(struct intel_sst_drv *ctx, u32 msg_id, u32 drv_id) { - struct sst_block *msg = NULL; + struct sst_block *msg; dev_dbg(ctx->dev, "Enter\n"); msg = kzalloc(sizeof(*msg), GFP_KERNEL); @@ -63,7 +63,7 @@ struct sst_block *sst_create_block(struct intel_sst_drv *ctx, int sst_wake_up_block(struct intel_sst_drv *ctx, int result, u32 drv_id, u32 ipc, void *data, u32 size) { - struct sst_block *block = NULL; + struct sst_block *block; dev_dbg(ctx->dev, "Enter\n"); @@ -91,7 +91,7 @@ int sst_wake_up_block(struct intel_sst_drv *ctx, int result, int sst_free_block(struct intel_sst_drv *ctx, struct sst_block *freed) { - struct sst_block *block = NULL, *__block; + struct sst_block *block, *__block; dev_dbg(ctx->dev, "Enter\n"); spin_lock_bh(&ctx->block_lock); From patchwork Fri May 20 21:17:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 574552 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 68373C433F5 for ; Fri, 20 May 2022 21:19:57 +0000 (UTC) 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 A3086174A; Fri, 20 May 2022 23:19:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A3086174A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1653081595; bh=FAx2MGkYD7Q5PvZNIT+bSe+ZVEwgYp9aY1CsIJL8knk=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rQqybR/axfru2tzKJD2a/uKsSvXOxFPZGFDhmaH8B5VRqrEFmwJUqtX9WkIUyPtGB ky34Yj4nsPajHmlruUbKFB4WoKC09Tsa8CxE5BbWyQMZk2szAxe/vuBv5V4LshVTgj OmQNpI5UqFfiAinrTCmqmeYnHa9LfmGSPm2XVesw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E4800F804C1; Fri, 20 May 2022 23:17:50 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 95EE3F80527; Fri, 20 May 2022 23:17:47 +0200 (CEST) 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 4FB1BF800F0 for ; Fri, 20 May 2022 23:17:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4FB1BF800F0 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="W/mT4hbB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653081463; x=1684617463; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FAx2MGkYD7Q5PvZNIT+bSe+ZVEwgYp9aY1CsIJL8knk=; b=W/mT4hbBF5AEY+IZUwCrRcW7Ns4/HY2/VuB+zYQXOwSr3BVcarWvNkq2 qHE8spInVYcOqMVsyCHz3jdiQ2T5p+WzQ4pzVcy/8sAe37sozj25GSua2 YBpHomyVfO7rTiYqH8GkM8t5sqk03F36xEtNmg7JeK94maUPZdL0WImKC g6DSCfeJtClze7JrhJzVsFqzaHbARxPbd7BJYZCntYH5oJGhp47uds2iW x11nCibzrhcsBWPf3cMvFkG9i5zxRAjAU1Mj9zDU+eat9vQCypk0qz1N/ Tu6nM5B9AVtRzbfpaYrvIM9c9vx8Gn5m4O1RFfSsgDtEboR0i7luTOpxX Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10353"; a="270324240" X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="270324240" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:36 -0700 X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="674796029" Received: from achsu-mobl2.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.212.181.190]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:35 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 08/16] ASoC: Intel: atom: controls: remove useless initializations Date: Fri, 20 May 2022 16:17:11 -0500 Message-Id: <20220520211719.607543-9-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> References: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, =?utf-8?q?P=C3=A9ter_Ujfalusi?= , broonie@kernel.org, Bard Liao , Pierre-Louis Bossart 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 invalid NULL dereferences but there's indeed no need to initialize loop variables or before allocating memory. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi --- sound/soc/intel/atom/sst-atom-controls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/intel/atom/sst-atom-controls.c b/sound/soc/intel/atom/sst-atom-controls.c index 335c327329945..34d63252debfd 100644 --- a/sound/soc/intel/atom/sst-atom-controls.c +++ b/sound/soc/intel/atom/sst-atom-controls.c @@ -1328,7 +1328,7 @@ int sst_send_pipe_gains(struct snd_soc_dai *dai, int stream, int mute) { struct sst_data *drv = snd_soc_dai_get_drvdata(dai); struct snd_soc_dapm_widget *w; - struct snd_soc_dapm_path *p = NULL; + struct snd_soc_dapm_path *p; dev_dbg(dai->dev, "enter, dai-name=%s dir=%d\n", dai->name, stream); @@ -1392,7 +1392,7 @@ int sst_send_pipe_gains(struct snd_soc_dai *dai, int stream, int mute) static int sst_fill_module_list(struct snd_kcontrol *kctl, struct snd_soc_dapm_widget *w, int type) { - struct sst_module *module = NULL; + struct sst_module *module; struct snd_soc_component *c = snd_soc_dapm_to_component(w->dapm); struct sst_ids *ids = w->priv; int ret = 0; From patchwork Fri May 20 21:17:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 574949 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id EEFE6C433EF for ; Fri, 20 May 2022 21:21:40 +0000 (UTC) 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 41AC81768; Fri, 20 May 2022 23:20:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 41AC81768 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1653081699; bh=EHs6eO1CLtdckRmqkO15PRqJD3a5ZaJCzlMXaUVz6bY=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=qPUnw3ufh1aKas2kYWo+1jZX3jCfAiUDkAWNGmvhyyZ9rDdUnb/0gjL3hLKUnvb5o 3JCVBRYAVl2P5hfLBBkGCnYzcnOPDorUeYXOcH5pe4kbf0qYOC1aYNuR/N6yqZP0xX BOnpUTP8//NRZpArVLI6UU9hKtlco4XCGA47bwl0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B7248F80559; Fri, 20 May 2022 23:17:59 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B3561F80549; Fri, 20 May 2022 23:17:54 +0200 (CEST) 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 6684FF801F5 for ; Fri, 20 May 2022 23:17:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6684FF801F5 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="naRRPQK/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653081463; x=1684617463; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EHs6eO1CLtdckRmqkO15PRqJD3a5ZaJCzlMXaUVz6bY=; b=naRRPQK/6wLrshAtCaTqUiS1ciDQlIO7IJxo/DcrL3qmfcD1XNMUZkCz bmU7Zzmmuu/fMEPhbdQUeIGOZUudY1yUZGvM9VjTRYSBpUxWkj1KlUTBu BMri+NJMN/w1mFy+2tQBNy6yfG4/0mpfp/B2BsayhqoY+HjPUWiqWAAS/ PQtcVj7j3hi7zbJSK5NDgND6es/pbVUSacRK+/qV7HYGfJJ78pYRa8yTE mj2R+UAvtdzCtshhlPwab8+D3/cBt5HHCjqApj/BoyEeMuNUJdcup/e74 oUA+ekqoGaHNWgkb0PaPb8KCsa2zJ+JAfycRB1yIYbi6xv6b9rsDU0OEZ A==; X-IronPort-AV: E=McAfee;i="6400,9594,10353"; a="270324244" X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="270324244" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:37 -0700 X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="674796031" Received: from achsu-mobl2.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.212.181.190]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:36 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 09/16] ASoC: Intel: boards: reset acpi_chan_package Date: Fri, 20 May 2022 16:17:12 -0500 Message-Id: <20220520211719.607543-10-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> References: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, =?utf-8?q?P=C3=A9ter_Ujfalusi?= , broonie@kernel.org, Bard Liao , Pierre-Louis Bossart 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 possible tests of uninitialized 'aif_value' members. This isn't really possible but static analysis cannot know what ACPICA does, so make sure the acpi_chan_package structure is reset prior to use to make the warning go away. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi --- sound/soc/intel/boards/bytcr_rt5640.c | 2 +- sound/soc/intel/boards/bytcr_rt5651.c | 2 +- sound/soc/intel/boards/cht_bsw_rt5645.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c index 7b948a219177d..7cc85fd862b21 100644 --- a/sound/soc/intel/boards/bytcr_rt5640.c +++ b/sound/soc/intel/boards/bytcr_rt5640.c @@ -1634,7 +1634,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) * with the codec driver/pdata are non-existent */ - struct acpi_chan_package chan_package; + struct acpi_chan_package chan_package = { 0 }; /* format specified: 2 64-bit integers */ struct acpi_buffer format = {sizeof("NN"), "NN"}; diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c index d467fcaa48eaa..03a52b1069a92 100644 --- a/sound/soc/intel/boards/bytcr_rt5651.c +++ b/sound/soc/intel/boards/bytcr_rt5651.c @@ -952,7 +952,7 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev) * with the codec driver/pdata are non-existent */ - struct acpi_chan_package chan_package; + struct acpi_chan_package chan_package = { 0 }; /* format specified: 2 64-bit integers */ struct acpi_buffer format = {sizeof("NN"), "NN"}; diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c index 45c301ea5e003..453281326c831 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5645.c +++ b/sound/soc/intel/boards/cht_bsw_rt5645.c @@ -603,7 +603,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev) * with the codec driver/pdata are non-existent */ - struct acpi_chan_package chan_package; + struct acpi_chan_package chan_package = { 0 }; /* format specified: 2 64-bit integers */ struct acpi_buffer format = {sizeof("NN"), "NN"}; From patchwork Fri May 20 21:17:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 574950 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 9C40FC433EF for ; Fri, 20 May 2022 21:21:11 +0000 (UTC) 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 CDB221755; Fri, 20 May 2022 23:20:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CDB221755 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1653081669; bh=IHXK8HCcE4ccAbpYpMLvPyShkHEN10ikSmLgvnuWPpY=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=KBs2N4QJgk89SA6Hd4S7zxAb1hl6A3e4+wC2UvY4Fup6GHYEjlYP3dfy5VDCsrE5d uxzH5MGUt9jEeb4ucmvUX3XpcUAQf+ZIhhMm6ELCAI9K1G5qfWOHkUOKU9avm4vgcv PS7mP/tjTXGpIuIlyKrTx5QnH3/lDtfbHHo8Sbk0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A9550F80526; Fri, 20 May 2022 23:17:58 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 535AEF80542; Fri, 20 May 2022 23:17:52 +0200 (CEST) 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 42414F8051F for ; Fri, 20 May 2022 23:17:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 42414F8051F Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="SVP93w2b" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653081464; x=1684617464; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IHXK8HCcE4ccAbpYpMLvPyShkHEN10ikSmLgvnuWPpY=; b=SVP93w2bRCiB0WeC58tEpUiGIND5pNDMxFheQwo5DkEBlag6PE7zS2HI aw7soSfGQ+O1ek2SwBn6XHwHohGlkYJ/Gn52OzC2tSeZzPQxjH/M9YQjG flWu63GJbmuFKnW8yLQsHtClEZPorZA/NOMLPtYJy6iULMuWFfNs8jZtp Ia8YN4axtHjVYw6MYEn2ZMIblaogzwAp4GqsgPjMhoOWCCBlzXfYkKrAT /7R6ryXgs75hqx32EmLnuPff55yxclGENsuEoA6uz6CwuPpQRYDlrQ/H9 CYap5sGDoR4nrgUn9Skni79zJiqQeRc/832IqeY7GthLYewte/W/3Bmjf g==; X-IronPort-AV: E=McAfee;i="6400,9594,10353"; a="270324245" X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="270324245" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:38 -0700 X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="674796033" Received: from achsu-mobl2.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.212.181.190]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:37 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 10/16] ASoC: Intel: sof_pcm512x: remove unnecessary init Date: Fri, 20 May 2022 16:17:13 -0500 Message-Id: <20220520211719.607543-11-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> References: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, =?utf-8?q?P=C3=A9ter_Ujfalusi?= , broonie@kernel.org, Bard Liao , Pierre-Louis Bossart 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 an invalid NULL dereference but indeed there is no need to initialize a loop variable. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi --- sound/soc/intel/boards/sof_pcm512x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/sof_pcm512x.c b/sound/soc/intel/boards/sof_pcm512x.c index 6815204e58d58..d4c67d5340a92 100644 --- a/sound/soc/intel/boards/sof_pcm512x.c +++ b/sound/soc/intel/boards/sof_pcm512x.c @@ -419,7 +419,7 @@ static int sof_audio_probe(struct platform_device *pdev) static int sof_pcm512x_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); - struct snd_soc_component *component = NULL; + struct snd_soc_component *component; for_each_card_components(card, component) { if (!strcmp(component->name, pcm512x_component[0].name)) { From patchwork Fri May 20 21:17:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 574549 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 73259C433EF for ; Fri, 20 May 2022 21:21:24 +0000 (UTC) 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 E5EBF1741; Fri, 20 May 2022 23:20:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E5EBF1741 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1653081683; bh=slqrcm7FpXNOFE4MzHtYKHZu8oxm6Ns10pm+G+gRZdc=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=OkDCY7nn45UeWYetsBNg2w6pJJl2cI5mY/SF0fVycoiIx5uWOMiuQlCV+g4Ob6x4X haspf7/e2QqUhVqGpUPSy9evtNPWlgovM0m9X2jK1/AtZKsfaPIKnlelPPK5ytUjok QDKTk1BMj1HhjctwZvm4ApcnZWjwo+ebaP8zxzE8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3198AF80558; Fri, 20 May 2022 23:17:59 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2A83DF80544; Fri, 20 May 2022 23:17:54 +0200 (CEST) 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 4086AF8019D for ; Fri, 20 May 2022 23:17:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4086AF8019D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="BJwb/Gnj" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653081465; x=1684617465; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=slqrcm7FpXNOFE4MzHtYKHZu8oxm6Ns10pm+G+gRZdc=; b=BJwb/Gnj6ZcHKW4EjhByYpKsHF5QMWu05nPs1EH0YrdxGWg6uT2Q8LLS QZrorwgPLVa0pEOjF2RAwApCIXgkW4hazerXrm+M33tub2rBTLIAeuVeG hj9NpPKDjSIvQxNbl2MSfJOdS/I7mNW28lfIvEA+qmBC41ojd+YN1Hxe9 ypKDrmPqUiFpAEQBpMZvos+n5vSExjC3+JoAYeETXuhGEssNnL/Z6ihyZ GZbB5rzv88T8g3hWznoDZPxNT3SvYS0RmmXLamlEZQOY2CSDR1DnzZepQ atXSfsVXPBINl7H3pT6BrY5idLLNRX6NXF/OmU1NZBti1xguCsOCTgeS3 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10353"; a="270324246" X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="270324246" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:38 -0700 X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="674796034" Received: from achsu-mobl2.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.212.181.190]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:38 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 11/16] ASoC: mediatek: mt8195: simplify error handling Date: Fri, 20 May 2022 16:17:14 -0500 Message-Id: <20220520211719.607543-12-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> References: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, =?utf-8?q?P=C3=A9ter_Ujfalusi?= , broonie@kernel.org, Bard Liao , Pierre-Louis Bossart 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/mediatek/mt8195/mt8195-afe-clk.c:311:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/mediatek/mt8195/mt8195-afe-clk.c:297:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/mediatek/mt8195/mt8195-afe-clk.c:311:9: note: Returning identical expression 'ret' return ret; ^ sound/soc/mediatek/mt8195/mt8195-afe-clk.c:341:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/mediatek/mt8195/mt8195-afe-clk.c:338:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/mediatek/mt8195/mt8195-afe-clk.c:341:9: note: Returning identical expression 'ret' return ret; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi --- sound/soc/mediatek/mt8195/mt8195-afe-clk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/mediatek/mt8195/mt8195-afe-clk.c b/sound/soc/mediatek/mt8195/mt8195-afe-clk.c index efd5cc364a351..2ee3872c83c36 100644 --- a/sound/soc/mediatek/mt8195/mt8195-afe-clk.c +++ b/sound/soc/mediatek/mt8195/mt8195-afe-clk.c @@ -284,7 +284,7 @@ static int mt8195_afe_enable_apll_tuner(struct mtk_base_afe *afe, { struct mt8195_afe_tuner_cfg *cfg = mt8195_afe_found_apll_tuner(id); unsigned long flags; - int ret = 0; + int ret; if (!cfg) return -EINVAL; @@ -308,7 +308,7 @@ static int mt8195_afe_enable_apll_tuner(struct mtk_base_afe *afe, spin_unlock_irqrestore(&cfg->ctrl_lock, flags); - return ret; + return 0; } static int mt8195_afe_disable_apll_tuner(struct mtk_base_afe *afe, @@ -316,7 +316,7 @@ static int mt8195_afe_disable_apll_tuner(struct mtk_base_afe *afe, { struct mt8195_afe_tuner_cfg *cfg = mt8195_afe_found_apll_tuner(id); unsigned long flags; - int ret = 0; + int ret; if (!cfg) return -EINVAL; @@ -338,7 +338,7 @@ static int mt8195_afe_disable_apll_tuner(struct mtk_base_afe *afe, if (ret) return ret; - return ret; + return 0; } int mt8195_afe_get_mclk_source_clk_id(int sel) From patchwork Fri May 20 21:17:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 574547 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 60770C433F5 for ; Fri, 20 May 2022 21:22:30 +0000 (UTC) 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 AF32C176E; Fri, 20 May 2022 23:21:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AF32C176E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1653081748; bh=ngAehnQ7+MeSSwjSeAY8VFh0ZBhyvEjFbFq5BxPj9tE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=d9uBXC2BLBBM+ybsQ2PXDynEsDZtrzVD3UlkGi5JWnehyJLp6M780FPhoGVSOd5Dg R/VAt+QV9jyi3FO0kkHgVuiYYmhF+l/UuFoOugn592+XGWqUZ0IWL1gSzOHVtp8dZs 6ZL753LCIMo7ro5EA+7zkQPu9rfNtGNwWmtsiJH4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7B40CF80578; Fri, 20 May 2022 23:18:01 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8D5DCF80525; Fri, 20 May 2022 23:17:57 +0200 (CEST) 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 523E2F80526 for ; Fri, 20 May 2022 23:17:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 523E2F80526 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="UEKJcAKf" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653081465; x=1684617465; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ngAehnQ7+MeSSwjSeAY8VFh0ZBhyvEjFbFq5BxPj9tE=; b=UEKJcAKfrGlw2UP93KXH8Wjkz4Kh2SGJTiGL+cQcz7mD7C83T2eJ6XIc MMqodbfsw2JnZ2DhHFrUI4ne9gpkfCA7uHzfO4IWCiArgza1AqiIDjgPJ nQO8+qvvxNzZu0rOhkPUg3AFxGQzhfhbPX6zDgXz74PMSHgqYJ/CfHo6O u20z+mHJBJo0Ondf6tzfxWhPw2plbbUGZYs2+G9ph2dhu5i3fHe0MvYPN QXTLr4MO2ZKKsclGjJYFFdKJsYsy1DpJPXOZhm+ofllaj/FRY70XfpEwO 5V7GTFCnWcUOdjA0IoUT+w2l5NE5urUyVaswjhGwDUAncJLdmZ9IfnXrh Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10353"; a="270324249" X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="270324249" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:39 -0700 X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="674796035" Received: from achsu-mobl2.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.212.181.190]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:38 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 12/16] ASoC: qcom: q6dsp: q6adm: remove useless initializations Date: Fri, 20 May 2022 16:17:15 -0500 Message-Id: <20220520211719.607543-13-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> References: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, =?utf-8?q?P=C3=A9ter_Ujfalusi?= , broonie@kernel.org, Bard Liao , Pierre-Louis Bossart 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 invalid NULL dereferences but there's indeed no need to initialize loop variables. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi --- sound/soc/qcom/qdsp6/q6adm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/qcom/qdsp6/q6adm.c b/sound/soc/qcom/qdsp6/q6adm.c index 72c5719f1d253..22b408c3794e0 100644 --- a/sound/soc/qcom/qdsp6/q6adm.c +++ b/sound/soc/qcom/qdsp6/q6adm.c @@ -90,7 +90,7 @@ struct q6adm_session_map_node_v5 { static struct q6copp *q6adm_find_copp(struct q6adm *adm, int port_idx, int copp_idx) { - struct q6copp *c = NULL; + struct q6copp *c; struct q6copp *ret = NULL; unsigned long flags; @@ -299,7 +299,7 @@ static struct q6copp *q6adm_find_matching_copp(struct q6adm *adm, int channel_mode, int bit_width, int app_type) { - struct q6copp *c = NULL; + struct q6copp *c; struct q6copp *ret = NULL; unsigned long flags; From patchwork Fri May 20 21:17:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 574548 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 13D4AC433F5 for ; Fri, 20 May 2022 21:21:57 +0000 (UTC) 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 51B4A1735; Fri, 20 May 2022 23:21:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 51B4A1735 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1653081715; bh=CluEd8FqJqXDrfOT6SV2FXPTdaw8R94PdqThOIQiQgY=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=esLkdA+/FT1ULhiNCPS2grnUOBlFTO8/HBDW6E7EqOGxzzZjWC2eVRepIKcVb3LkA 0sG4TnBsu+bxHHsp8XTsHSwi7KYgNIDXadFub2Gizc1QafVStapRjqaaxQYYvvpAzj +zXa5iL4a8y3q3X+W0KIU3ZgROqXwbo1b4kbgM0A= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4B6BEF80567; Fri, 20 May 2022 23:18:00 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 599AEF80551; Fri, 20 May 2022 23:17:56 +0200 (CEST) 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 7D653F800D2 for ; Fri, 20 May 2022 23:17:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7D653F800D2 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="fAH4XFoo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653081466; x=1684617466; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CluEd8FqJqXDrfOT6SV2FXPTdaw8R94PdqThOIQiQgY=; b=fAH4XFooxSXdtl5D3WuY0+SatvSYOprRlpsqduEM2w10LYmQg0bqatMf u47RrpRDEFBWZOspaU9fA5Ld4AOSWOqEJlFAfA6L1kUK2VMYyrq3Cosja OUucMAU5B/J4l7pIBU3rSTLOMe+EBnaJytbGc+ND4XHaOhishxluDrhNv DHRBaHlA6aC4VdjMOJihNaf4jXqxOzbcjMP1CwnoxzB6veTi/fDWjreOI K3wE+RuAyVf7fjczkWHIfdhUl/kYs46kTKr90E9C87VKfrPCaJXRN/AoX Dil1m+hQmNkI9Ziz+YTSfQG1n2Jy+OGZH9Gy7ddKCuDW6r5vwqfuE/kRp A==; X-IronPort-AV: E=McAfee;i="6400,9594,10353"; a="270324250" X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="270324250" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:40 -0700 X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="674796040" Received: from achsu-mobl2.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.212.181.190]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:39 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 13/16] ASoC: qcom: q6dsp: remove spurious space Date: Fri, 20 May 2022 16:17:16 -0500 Message-Id: <20220520211719.607543-14-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> References: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, =?utf-8?q?P=C3=A9ter_Ujfalusi?= , broonie@kernel.org, Bard Liao , Pierre-Louis Bossart 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/qcom/qdsp6/q6adm.c:183:14: warning:inconclusive: Found suspicious oper ator '*' [constStatement] } __packed * open = data->payload; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi --- sound/soc/qcom/qdsp6/q6adm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/qcom/qdsp6/q6adm.c b/sound/soc/qcom/qdsp6/q6adm.c index 22b408c3794e0..01f383888b622 100644 --- a/sound/soc/qcom/qdsp6/q6adm.c +++ b/sound/soc/qcom/qdsp6/q6adm.c @@ -180,7 +180,7 @@ static int q6adm_callback(struct apr_device *adev, struct apr_resp_pkt *data) u32 status; u16 copp_id; u16 reserved; - } __packed * open = data->payload; + } __packed *open = data->payload; copp = q6adm_find_copp(adm, port_idx, copp_idx); if (!copp) From patchwork Fri May 20 21:17:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 574947 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 6900DC433F5 for ; Fri, 20 May 2022 21:22:46 +0000 (UTC) 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 A6AFA1726; Fri, 20 May 2022 23:21:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A6AFA1726 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1653081764; bh=fZ22OOMIfMyFZ5KWRGnZn+ZuVUzFmdFaw6mBXxN2b3c=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=IBG7bLBpmL4a7XEyz38tue50DN+CaY0IBUWjXBcRm4is0io4Mckzx4AI+e9EVtf+I fShpVW6pv5zZJDKQyXhVC35VKqxYh71QrijJgkJG2RAxp4Inhw3DrAffv1K+6ptzPO h/cf99gJ7aulvaN91efx456zjwrlBJNsu6hibGXo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 14F22F8057D; Fri, 20 May 2022 23:18:02 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 465FBF80551; Fri, 20 May 2022 23:17:58 +0200 (CEST) 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 47CF2F80520 for ; Fri, 20 May 2022 23:17:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 47CF2F80520 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="lAhO3I0r" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653081467; x=1684617467; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fZ22OOMIfMyFZ5KWRGnZn+ZuVUzFmdFaw6mBXxN2b3c=; b=lAhO3I0rpERFvPUstsNOqgOw34M6fYsK6vSExvV8CdLbhfV9+wjox2o0 wFRpeswvFUFbGZm39dFopYd4D3KgGh0YkJ3ezlzdHV8pi9q352uJWmNos 6Dv3nO9i/uunYfWZhAwJT0EvzPhQPgjdcMgV3wNVRTIjYrEyHC6N0CtmF j7Vjxd98D13+Uw1+2Cd9bu7UaI5G/edi0bduYrdqRE/HZmoIXGR/hBStK KIdOvEaUYzUCVuL5QdFMc/p1n4PK6BfuwgxB0n6cLv1S5rMGX/BNRypN+ BuzB8ZyTZ+XbqTlMA7BFYZ4Gk2t+7lzaOyuggqdj7wCqUqQjcwnyb96h1 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10353"; a="270324251" X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="270324251" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:41 -0700 X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="674796051" Received: from achsu-mobl2.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.212.181.190]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:40 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 14/16] ASoC: rockchip: simplify error handling Date: Fri, 20 May 2022 16:17:17 -0500 Message-Id: <20220520211719.607543-15-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> References: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, =?utf-8?q?P=C3=A9ter_Ujfalusi?= , broonie@kernel.org, Bard Liao , Pierre-Louis Bossart 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/rockchip/rk3288_hdmi_analog.c:256:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/rockchip/rk3288_hdmi_analog.c:252:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/rockchip/rk3288_hdmi_analog.c:256:9: note: Returning identical expression 'ret' return ret; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi --- sound/soc/rockchip/rk3288_hdmi_analog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/rockchip/rk3288_hdmi_analog.c b/sound/soc/rockchip/rk3288_hdmi_analog.c index bcdeddeba80c9..0c6bd9a019dbe 100644 --- a/sound/soc/rockchip/rk3288_hdmi_analog.c +++ b/sound/soc/rockchip/rk3288_hdmi_analog.c @@ -169,7 +169,7 @@ static struct snd_soc_card snd_soc_card_rk = { static int snd_rk_mc_probe(struct platform_device *pdev) { - int ret = 0; + int ret; struct snd_soc_card *card = &snd_soc_card_rk; struct device_node *np = pdev->dev.of_node; struct rk_drvdata *machine; @@ -253,7 +253,7 @@ static int snd_rk_mc_probe(struct platform_device *pdev) return dev_err_probe(&pdev->dev, ret, "Soc register card failed\n"); - return ret; + return 0; } static const struct of_device_id rockchip_sound_of_match[] = { From patchwork Fri May 20 21:17:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 574948 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 4661CC433EF for ; Fri, 20 May 2022 21:22:13 +0000 (UTC) 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 7CC011746; Fri, 20 May 2022 23:21:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7CC011746 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1653081731; bh=zzzp6DdVnMVMBIYm+KLFZeV2M7cUlXgl5MrmkBwL7ZI=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Pr1EGQ9O8l5886nHWDtWn52PvKjst9gELO5AsknFxlcrnQ6z5owEIaBDA2/lQDIs1 yclLD/THONhIwH29jy+vTn1HyJ3/Y4Q0X47ngtkB6ZJNUxsz2UHjOs5nj80hEls3hn sMmnP3XJtVtFSKl+qT70G/RyxMd7nek4cHXefQv4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id DBE0EF80570; Fri, 20 May 2022 23:18:00 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1F80FF80553; Fri, 20 May 2022 23:17:57 +0200 (CEST) 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 6D472F80525 for ; Fri, 20 May 2022 23:17:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6D472F80525 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="T5+QR3Nv" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653081467; x=1684617467; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zzzp6DdVnMVMBIYm+KLFZeV2M7cUlXgl5MrmkBwL7ZI=; b=T5+QR3Nv6XJAga24YW9MiQcbVyBk+PmjyL5W12y+ecLYBwSm4BPq+cvO lMu5572d1iVKH3PIvt6TxLKZPwcrHRPrsnksWrnO7FDKZLroo1EPN2JhW TAsH1nXDqUt6HIZWTPB/rJj1C1MaqYLvvsLIDAAuHdEbBKRvqb8WIaRuK yfq9QvJctIsoQJQd6mDUsLrLmKKmjVjXGCcqUcJrKFNzU4diJiqJjfFN6 QHf0+8N3eGoUpB33TNyDNwC3xia5YaJN/9vE6tHWaYxZ8K+0bX9Bp7oU2 siiJM/X3YU8J29mdRxqywYJ/YsE1yvmBHDfI+OZEf2HThDk5TJEm+N+oE Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10353"; a="270324253" X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="270324253" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:41 -0700 X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="674796067" Received: from achsu-mobl2.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.212.181.190]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:41 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 15/16] ASoC: samsung: snow: simplify error handling Date: Fri, 20 May 2022 16:17:18 -0500 Message-Id: <20220520211719.607543-16-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> References: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, =?utf-8?q?P=C3=A9ter_Ujfalusi?= , broonie@kernel.org, Bard Liao , Pierre-Louis Bossart 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/samsung/snow.c:219:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/samsung/snow.c:215:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/samsung/snow.c:219:9: note: Returning identical expression 'ret' return ret; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi --- sound/soc/samsung/snow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/samsung/snow.c b/sound/soc/samsung/snow.c index 02372109c251e..da342da038804 100644 --- a/sound/soc/samsung/snow.c +++ b/sound/soc/samsung/snow.c @@ -216,7 +216,7 @@ static int snow_probe(struct platform_device *pdev) return dev_err_probe(&pdev->dev, ret, "snd_soc_register_card failed\n"); - return ret; + return 0; } static int snow_remove(struct platform_device *pdev) From patchwork Fri May 20 21:17:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 574546 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 63665C433EF for ; Fri, 20 May 2022 21:23:15 +0000 (UTC) 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 A141C177C; Fri, 20 May 2022 23:22:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A141C177C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1653081793; bh=jckmVIiVHj4no1YvqK8AoBjG6gfnTk0wrOWcc8n7rMQ=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=K0r/YyLv3VnUECc80y1neaz8GuK3v40Ys9j19u2ShEv2COhP0sUeBd18B3Bs/oESm Y9kmpSdtZizkw+AMnCBYMYfdtbZV9mQpqZbcz5fyfvkVsuq9mE9CUzrFnNwmn/OINM oV2e+Fz48t1uTEqpmEYgVa4Z5gtXJ8trhTI9T40Q= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 74EBDF805B2; Fri, 20 May 2022 23:18:05 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A5B03F80571; Fri, 20 May 2022 23:18:00 +0200 (CEST) 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 632A5F8052D for ; Fri, 20 May 2022 23:17:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 632A5F8052D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="V1LNK5UD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653081469; x=1684617469; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jckmVIiVHj4no1YvqK8AoBjG6gfnTk0wrOWcc8n7rMQ=; b=V1LNK5UDrAS5NXSeyR3iJWvL963gS3ydl+V7fNEqLsxT6B9+j4EV/tm1 D47r8SqVFXxyev10YNI9UHnLN7lFJBtR1oEfE+vS6We3reWWLeamUNjdr KHoJgsBCRh9ijE9p0A5KmSAi0sofIV5dRng4/1CY3sAsVZ9NSkBv5Xz8G LLRh0WlNmkXw0Slb0NZbenetV7l4AS0rLPmXYj+Ct5WfAfnhXtzEbs/jN I6CmNSnM0AKMju4i1vorRBlc3JbRRBJl3rjDx15BzDqD6MZJYGYKJo+c/ cx3MdF2NR7Wqg94TLNGKTOgQ+Dl/YkKPx1rrbdwfkHJXSp3MdvKehm1+v g==; X-IronPort-AV: E=McAfee;i="6400,9594,10353"; a="270324255" X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="270324255" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:42 -0700 X-IronPort-AV: E=Sophos;i="5.91,240,1647327600"; d="scan'208";a="674796070" Received: from achsu-mobl2.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.212.181.190]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 14:17:41 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 16/16] ASoC: meson: remove useless initialization Date: Fri, 20 May 2022 16:17:19 -0500 Message-Id: <20220520211719.607543-17-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> References: <20220520211719.607543-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, =?utf-8?q?P=C3=A9ter_Ujfalusi?= , broonie@kernel.org, Bard Liao , Pierre-Louis Bossart 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 invalid NULL dereferences but there's indeed no need to initialize a loop variable. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi --- sound/soc/meson/meson-codec-glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/meson/meson-codec-glue.c b/sound/soc/meson/meson-codec-glue.c index 2870cfad813ac..80c5ed196961d 100644 --- a/sound/soc/meson/meson-codec-glue.c +++ b/sound/soc/meson/meson-codec-glue.c @@ -13,7 +13,7 @@ static struct snd_soc_dapm_widget * meson_codec_glue_get_input(struct snd_soc_dapm_widget *w) { - struct snd_soc_dapm_path *p = NULL; + struct snd_soc_dapm_path *p; struct snd_soc_dapm_widget *in; snd_soc_dapm_widget_for_each_source_path(w, p) {