From patchwork Fri May 19 19:56:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= X-Patchwork-Id: 13248257 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 3D6E5C7EE23 for ; Fri, 19 May 2023 11:57:15 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 532B582A; Fri, 19 May 2023 13:56:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 532B582A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684497433; bh=b0vw4/BWWUzYHBzT8kf0bK3WB1iPtl55IGzU8yqtfiA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=rwWk+f+yJucL5r95BPbjEqt9TLWfOgNjX8ozTDCrTOVjYItx9KiRQSXXHur91Z8MM ro2Trc7DnWsN8xKNRi4GgpIl/Rep78v3Ij5PfKbka3/C1zBBNPbBRPVPhCogmbjzTK ifLMhlcqfRWnJbXmbh1XVFMLzn/9g1fJ5P0R/qsA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3934AF80579; Fri, 19 May 2023 13:55:15 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A347BF8057C; Fri, 19 May 2023 13:55:14 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0F4EDF80558; Fri, 19 May 2023 13:55:08 +0200 (CEST) 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 38D22F8016D for ; Fri, 19 May 2023 13:54:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 38D22F8016D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=J71f1TcR DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684497300; x=1716033300; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=b0vw4/BWWUzYHBzT8kf0bK3WB1iPtl55IGzU8yqtfiA=; b=J71f1TcRo1UaVshBz/zRjwY3s1NI8Ug5TL3Dt5+aQqoYMHQZNz5GJwSj FVkq6K4az6RSqZILKNbET8/2KDeEM6vTa6pvUTRuOS1XEjke00TKQ0epW UptlEcFGB1Fh06s+n3gptMzMEIj+55lf8PyqyPfyDILlMyCLbNYqi8CsK eQA1UmqLNBduzdVLzp67dx1HEc76B4wihjkm5G74zaCw9eRUlHb4omojI PWe+q0h58M0DTCnDsuSvQhJcD2EgJyfoR+EQMM464f+Tod0gsr46pNjF/ H93nPwJ9XNwUjf8SXT6dKVscSwGDPvR7fu7aDIlqPUE1BEI3QClyVz39c g==; X-IronPort-AV: E=McAfee;i="6600,9927,10714"; a="336946024" X-IronPort-AV: E=Sophos;i="6.00,176,1681196400"; d="scan'208";a="336946024" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2023 04:54:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10714"; a="705593793" X-IronPort-AV: E=Sophos;i="6.00,176,1681196400"; d="scan'208";a="705593793" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by fmsmga007.fm.intel.com with ESMTP; 19 May 2023 04:54:54 -0700 From: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= To: Mark Brown Cc: Cezary Rojewski , Pierre-Louis Bossart , Takashi Iwai , Jaroslav Kysela , Ranjani Sridharan , alsa-devel@alsa-project.org, =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= Subject: [PATCH 1/5] ASoC: topology: Log control load errors in soc_tplg_control_load() Date: Fri, 19 May 2023 21:56:07 +0200 Message-Id: <20230519195611.4068853-2-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230519195611.4068853-1-amadeuszx.slawinski@linux.intel.com> References: <20230519195611.4068853-1-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: ES7RQRBWRFMN7UF4XCG5FBBP4N7IWMQE X-Message-ID-Hash: ES7RQRBWRFMN7UF4XCG5FBBP4N7IWMQE X-MailFrom: amadeuszx.slawinski@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Simplify code by logging any errors in function that does the actual work instead of doing so in its callers. Signed-off-by: Amadeusz Sławiński --- sound/soc/soc-topology.c | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index 47ab5cf99497..242abbd875fa 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -585,11 +585,15 @@ EXPORT_SYMBOL_GPL(snd_soc_tplg_widget_bind_event); static int soc_tplg_control_load(struct soc_tplg *tplg, struct snd_kcontrol_new *k, struct snd_soc_tplg_ctl_hdr *hdr) { + int ret = 0; + if (tplg->ops && tplg->ops->control_load) - return tplg->ops->control_load(tplg->comp, tplg->index, k, - hdr); + ret = tplg->ops->control_load(tplg->comp, tplg->index, k, hdr); - return 0; + if (ret) + dev_err(tplg->dev, "ASoC: failed to init %s\n", hdr->name); + + return ret; } @@ -691,10 +695,8 @@ static int soc_tplg_dbytes_create(struct soc_tplg *tplg, size_t size) /* pass control to driver for optional further init */ ret = soc_tplg_control_load(tplg, &kc, &be->hdr); - if (ret < 0) { - dev_err(tplg->dev, "ASoC: failed to init %s\n", be->hdr.name); + if (ret < 0) goto err; - } /* register control here */ ret = soc_tplg_add_kcontrol(tplg, &kc, &sbe->dobj.control.kcontrol); @@ -776,10 +778,8 @@ static int soc_tplg_dmixer_create(struct soc_tplg *tplg, size_t size) /* pass control to driver for optional further init */ ret = soc_tplg_control_load(tplg, &kc, &mc->hdr); - if (ret < 0) { - dev_err(tplg->dev, "ASoC: failed to init %s\n", mc->hdr.name); + if (ret < 0) goto err; - } /* register control here */ ret = soc_tplg_add_kcontrol(tplg, &kc, &sm->dobj.control.kcontrol); @@ -945,10 +945,8 @@ static int soc_tplg_denum_create(struct soc_tplg *tplg, size_t size) /* pass control to driver for optional further init */ ret = soc_tplg_control_load(tplg, &kc, &ec->hdr); - if (ret < 0) { - dev_err(tplg->dev, "ASoC: failed to init %s\n", ec->hdr.name); + if (ret < 0) goto err; - } /* register control here */ ret = soc_tplg_add_kcontrol(tplg, &kc, &se->dobj.control.kcontrol); @@ -1162,11 +1160,8 @@ static int soc_tplg_dapm_widget_dmixer_create(struct soc_tplg *tplg, struct snd_ /* pass control to driver for optional further init */ err = soc_tplg_control_load(tplg, kc, &mc->hdr); - if (err < 0) { - dev_err(tplg->dev, "ASoC: failed to init %s\n", - mc->hdr.name); + if (err < 0) return err; - } return 0; } @@ -1246,11 +1241,8 @@ static int soc_tplg_dapm_widget_denum_create(struct soc_tplg *tplg, struct snd_k /* pass control to driver for optional further init */ err = soc_tplg_control_load(tplg, kc, &ec->hdr); - if (err < 0) { - dev_err(tplg->dev, "ASoC: failed to init %s\n", - ec->hdr.name); + if (err < 0) return err; - } return 0; } @@ -1298,11 +1290,8 @@ static int soc_tplg_dapm_widget_dbytes_create(struct soc_tplg *tplg, struct snd_ /* pass control to driver for optional further init */ err = soc_tplg_control_load(tplg, kc, &be->hdr); - if (err < 0) { - dev_err(tplg->dev, "ASoC: failed to init %s\n", - be->hdr.name); + if (err < 0) return err; - } return 0; } From patchwork Fri May 19 19:56:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= X-Patchwork-Id: 13248255 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 F2749C77B7F for ; Fri, 19 May 2023 11:56:55 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 32F046C1; Fri, 19 May 2023 13:55:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 32F046C1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684497408; bh=lobxPCKWfcsY0E/0K7qViyiItbMxfZAYDogS+Iul9ZM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=qs61P/N7C5J8oSyZkyFLGZtMbSm8vycqAOaIGkT/mLuPvmEBj6U/9t0TOg1eD45Jw hie0ST6sjjEGTTk8lirky8nV4Rl8tr1LzEyzzrYZ2k0tHoQMXppu4tOdilNmHv9zXv VK5yORtnOGFOMKBTi7mlbWZhSaiY7OSXONV/wWhI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8A24BF8016D; Fri, 19 May 2023 13:55:09 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D5734F8055C; Fri, 19 May 2023 13:55:08 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5FC2BF8053D; Fri, 19 May 2023 13:55:04 +0200 (CEST) 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 33B34F80272 for ; Fri, 19 May 2023 13:55:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 33B34F80272 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=PUIq200n DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684497301; x=1716033301; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lobxPCKWfcsY0E/0K7qViyiItbMxfZAYDogS+Iul9ZM=; b=PUIq200nWpUuB6CidUX/14tKi1rnabjKz5W9c0Za5aAVQOGzvAZ/XcZF Z83EMsaE/D9Y9/p8gQHrsphUUG2orKc6ctk10HDvmJEJS3+3LrxI7ehFQ a0TPCHPNhy+LyG3OrFKdzsff5kt27ZPl6FHyU1D91yq6+sf6fwkwRpwl2 JewzpIGiorX9d+m4NHX9/Z9B5IpwKgfdKr398pCMRCXoNBT06uv7SL4Us N9G2XjeKhna/t4KeEz741cWva27oLt9D9wB4aPFE+ZtxQ5S1OzEphYWKc vnqCvKNbliuBvdehSrmfly9aPeJ61YvORv3mpnX/2V0wH33Sqj2vQ3QIJ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10714"; a="336946034" X-IronPort-AV: E=Sophos;i="6.00,176,1681196400"; d="scan'208";a="336946034" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2023 04:54:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10714"; a="705593802" X-IronPort-AV: E=Sophos;i="6.00,176,1681196400"; d="scan'208";a="705593802" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by fmsmga007.fm.intel.com with ESMTP; 19 May 2023 04:54:56 -0700 From: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= To: Mark Brown Cc: Cezary Rojewski , Pierre-Louis Bossart , Takashi Iwai , Jaroslav Kysela , Ranjani Sridharan , alsa-devel@alsa-project.org, =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= Subject: [PATCH 2/5] ASoC: topology: Remove redundant logs Date: Fri, 19 May 2023 21:56:08 +0200 Message-Id: <20230519195611.4068853-3-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230519195611.4068853-1-amadeuszx.slawinski@linux.intel.com> References: <20230519195611.4068853-1-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: PDOHZCGLUSZQ2NRG2NZQ2ZXVG25LXPVC X-Message-ID-Hash: PDOHZCGLUSZQ2NRG2NZQ2ZXVG25LXPVC X-MailFrom: amadeuszx.slawinski@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: soc_tplg_add_kcontrol() logs all the failures in detail already. Signed-off-by: Amadeusz Sławiński --- sound/soc/soc-topology.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index 242abbd875fa..b5c47b3c63ab 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -700,10 +700,8 @@ static int soc_tplg_dbytes_create(struct soc_tplg *tplg, size_t size) /* register control here */ ret = soc_tplg_add_kcontrol(tplg, &kc, &sbe->dobj.control.kcontrol); - if (ret < 0) { - dev_err(tplg->dev, "ASoC: failed to add %s\n", be->hdr.name); + if (ret < 0) goto err; - } list_add(&sbe->dobj.list, &tplg->comp->dobj_list); @@ -783,10 +781,8 @@ static int soc_tplg_dmixer_create(struct soc_tplg *tplg, size_t size) /* register control here */ ret = soc_tplg_add_kcontrol(tplg, &kc, &sm->dobj.control.kcontrol); - if (ret < 0) { - dev_err(tplg->dev, "ASoC: failed to add %s\n", mc->hdr.name); + if (ret < 0) goto err; - } list_add(&sm->dobj.list, &tplg->comp->dobj_list); @@ -950,10 +946,8 @@ static int soc_tplg_denum_create(struct soc_tplg *tplg, size_t size) /* register control here */ ret = soc_tplg_add_kcontrol(tplg, &kc, &se->dobj.control.kcontrol); - if (ret < 0) { - dev_err(tplg->dev, "ASoC: could not add kcontrol %s\n", ec->hdr.name); + if (ret < 0) goto err; - } list_add(&se->dobj.list, &tplg->comp->dobj_list); From patchwork Fri May 19 19:56:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= X-Patchwork-Id: 13248256 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 45EFDC77B7A for ; Fri, 19 May 2023 11:57:02 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B3BF21FE; Fri, 19 May 2023 13:56:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B3BF21FE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684497420; bh=JBKztdWoY4/izRQ7rvvFxSEV9UWrDbzjxVvyDdi3lTQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=p7FzzsqIA+cPQHwoLTe0lcSVfDW9iWckiW+afnK1UpFN+zH2OTW5J9cBIBtpUMevG eDrYd22DRFwLH0Z6Iph6xVk1My7rgu8pPSoOVHBgsMWz4bbS/gFYbci5s1dHbvNiIB zSqSDNYhebJOS2PKoTLYO/dV/saR2Y1BCqDL/sqE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7571FF80568; Fri, 19 May 2023 13:55:12 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id EBA6FF80568; Fri, 19 May 2023 13:55:11 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B51D8F802E8; Fri, 19 May 2023 13:55:05 +0200 (CEST) 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 618D2F8025A for ; Fri, 19 May 2023 13:55:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 618D2F8025A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=nZpK0q3Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684497302; x=1716033302; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JBKztdWoY4/izRQ7rvvFxSEV9UWrDbzjxVvyDdi3lTQ=; b=nZpK0q3Y8Qfau7LmFHwcNNu5VycDeg5BxlZWwm4UKRO4YombdDZgxPtY QQNett8cBw3AWjq18NKHBj1sTycdpMB4zQi+L8W6gVvWjo7DD0OcpAUUL a3JTK6RcJhHskIaaocBCl8RtY8MaTVPC6Yv6tt5FIdOLs0lpD1uW9Q09c V1ZXORPZibcQ6LAOKBTMCVpoScBPTYmwuiFE4axfOIiiV/RVXcfqnsegl iWGApMhl57e6vawXLxXO0SFeD+OwvFlI2Qd+RCy4xIOA5qIbF2a6GJsSv 2ebqMDqpJAi6kbNSsaq9rmunUJXKpfGHV9DzAy651nQ/46j+REU7p6eIR A==; X-IronPort-AV: E=McAfee;i="6600,9927,10714"; a="336946042" X-IronPort-AV: E=Sophos;i="6.00,176,1681196400"; d="scan'208";a="336946042" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2023 04:55:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10714"; a="705593816" X-IronPort-AV: E=Sophos;i="6.00,176,1681196400"; d="scan'208";a="705593816" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by fmsmga007.fm.intel.com with ESMTP; 19 May 2023 04:54:58 -0700 From: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= To: Mark Brown Cc: Cezary Rojewski , Pierre-Louis Bossart , Takashi Iwai , Jaroslav Kysela , Ranjani Sridharan , alsa-devel@alsa-project.org, =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= Subject: [PATCH 3/5] ASoC: topology: Do not split message string on multiple lines Date: Fri, 19 May 2023 21:56:09 +0200 Message-Id: <20230519195611.4068853-4-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230519195611.4068853-1-amadeuszx.slawinski@linux.intel.com> References: <20230519195611.4068853-1-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: TIRIQXL6MPRKNPTRYPREWL4O6VA4DDNT X-Message-ID-Hash: TIRIQXL6MPRKNPTRYPREWL4O6VA4DDNT X-MailFrom: amadeuszx.slawinski@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Kernel coding guidelines recommend to not split string unnecessarily. While at it adapt the other print present in the function to 100 characters line limit. Signed-off-by: Amadeusz Sławiński --- sound/soc/soc-topology.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index b5c47b3c63ab..0249e915eafe 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -1513,15 +1513,13 @@ static int soc_tplg_dapm_complete(struct soc_tplg *tplg) * If so, just return success. */ if (!snd_soc_card_is_instantiated(card)) { - dev_warn(tplg->dev, "ASoC: Parent card not yet available," - " widget card binding deferred\n"); + dev_warn(tplg->dev, "ASoC: Parent card not yet available, widget card binding deferred\n"); return 0; } ret = snd_soc_dapm_new_widgets(card); if (ret < 0) - dev_err(tplg->dev, "ASoC: failed to create new widgets %d\n", - ret); + dev_err(tplg->dev, "ASoC: failed to create new widgets %d\n", ret); return ret; } From patchwork Fri May 19 19:56:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= X-Patchwork-Id: 13248259 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 75740C77B7F for ; Fri, 19 May 2023 11:57:49 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 6BC07206; Fri, 19 May 2023 13:56:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6BC07206 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684497467; bh=J8IlpiZ0cWfskFgS6fMco2Ui2XwVN+JFcGr15tILLfE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=EpjuSuizft4fdeRoJZJF9NYgeB864flFoc7CQtYIsW+kJdE98OJDHRDXjvLuTDYC+ beh7wfQgSH5ozBq9iZjyoxmIA8JtrZ0QDqyh9MECxwt20UJ7So57ZfuajtagtWlrKy V93QN3X3nvG3WWB3ZT+GkA8xZq/aQF+hW+77Oh6w= Received: by alsa1.perex.cz (Postfix, from userid 50401) id B8938F805BF; Fri, 19 May 2023 13:55:18 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 819F5F805B2; Fri, 19 May 2023 13:55:18 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 05958F80564; Fri, 19 May 2023 13:55:10 +0200 (CEST) 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 5EE61F80431 for ; Fri, 19 May 2023 13:55:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5EE61F80431 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=hSuv5Yln DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684497304; x=1716033304; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=J8IlpiZ0cWfskFgS6fMco2Ui2XwVN+JFcGr15tILLfE=; b=hSuv5YlnAAIiweYjhk5a22jlflYAwCn4NtbJcZh2LaIVg+fC54N5OTsP lGNNZyBvM7SlgG1V2aIPydr0/6XSVjreHgTCeVJlwSkUKs3HsQwR3NXOJ vteV2foD7EJv3pK4I0u02Z78kpemG0PEoddrTWIRAfR1DFF/3J0Gp1US0 5buJf8XGIXhjY1Q1Sgbm5WtA6uKx/PbMbX+KQJ6DLy9irOBiN6/qesXo2 OVfYs6BJOlqMIaUCz9W4j6Jl5iPYERJgkg1mrHI4qlNGMOZ1EhMMFI3Ox qEz97b/xxCrNNABizL/94AZ6LaKh/sHaw8OemYmfM0Ot/7RxPw1Q1aH4B g==; X-IronPort-AV: E=McAfee;i="6600,9927,10714"; a="336946051" X-IronPort-AV: E=Sophos;i="6.00,176,1681196400"; d="scan'208";a="336946051" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2023 04:55:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10714"; a="705593826" X-IronPort-AV: E=Sophos;i="6.00,176,1681196400"; d="scan'208";a="705593826" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by fmsmga007.fm.intel.com with ESMTP; 19 May 2023 04:55:00 -0700 From: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= To: Mark Brown Cc: Cezary Rojewski , Pierre-Louis Bossart , Takashi Iwai , Jaroslav Kysela , Ranjani Sridharan , alsa-devel@alsa-project.org, =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= Subject: [PATCH 4/5] ASoC: topology: Remove redundant log Date: Fri, 19 May 2023 21:56:10 +0200 Message-Id: <20230519195611.4068853-5-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230519195611.4068853-1-amadeuszx.slawinski@linux.intel.com> References: <20230519195611.4068853-1-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: JT5UGCS4CSRI5LXIAGXVLQTNHQISP2CI X-Message-ID-Hash: JT5UGCS4CSRI5LXIAGXVLQTNHQISP2CI X-MailFrom: amadeuszx.slawinski@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: soc_tplg_dapm_complete() logs all the failures in detail already. Signed-off-by: Amadeusz Sławiński --- sound/soc/soc-topology.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index 0249e915eafe..9bb4c6d2a2c9 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -2510,9 +2510,6 @@ static int soc_tplg_process_headers(struct soc_tplg *tplg) /* signal DAPM we are complete */ ret = soc_tplg_dapm_complete(tplg); - if (ret < 0) - dev_err(tplg->dev, - "ASoC: failed to initialise DAPM from Firmware\n"); return ret; } From patchwork Fri May 19 19:56:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= X-Patchwork-Id: 13248258 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 D8699C77B7F for ; Fri, 19 May 2023 11:57:41 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9A18574C; Fri, 19 May 2023 13:56:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9A18574C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684497459; bh=ZaZVVwu0Td0cLklbKrANj9tQeRb/0u72Qu93yS6nUpI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=VhAL5XyojppUXWbtujoZy5nGiLsezgLA+r4LlQQtf+Vnotz9Xog8ArNLP3rRhgTW0 4XtFIzPAgZB6CGNMsZvqxvQTTBt2cRcSchiyEpPu4zasl8lBeDIU6x+dA0e/skWy9b pv73KeTVeUINElbKGCKasAWqhx1ioKw9hQlIgaGk= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8EC5DF805B1; Fri, 19 May 2023 13:55:17 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id F3096F805AB; Fri, 19 May 2023 13:55:16 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C9D49F80557; Fri, 19 May 2023 13:55:08 +0200 (CEST) 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 CAEB9F80087 for ; Fri, 19 May 2023 13:55:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CAEB9F80087 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Jcyi2Hsz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684497306; x=1716033306; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZaZVVwu0Td0cLklbKrANj9tQeRb/0u72Qu93yS6nUpI=; b=Jcyi2HszzaAgkYbKkkAIbrwZ7oZVs58S8cYUaNLL4dbmE5a3z4LQPF5l 0Wcz9n2HNYaZ9HfMTS70efM0yeReOU2bfewedo9KMiIPVVSifwAgpaKzx dKtBcMMAxKDDpF98062XiKntnnbhw1OsA214uFEQLraU79FQvBUiHu6YG 6fwc7wiCiSh3oc05JLevF3ovLT67qPgtPgDPyhy8jhNvAvTz7adndxzWQ 1qVFaiGL4btosaIuJXNFehFRXBJzUQpioG5qSYEPML3ekd1jXJebCc2MB zXh8DgR+jQEJkEKSGEkrUzNTpogtRS0hlE1DTQkTm59Jcah3Y9SgDNBpn Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10714"; a="336946056" X-IronPort-AV: E=Sophos;i="6.00,176,1681196400"; d="scan'208";a="336946056" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2023 04:55:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10714"; a="705593837" X-IronPort-AV: E=Sophos;i="6.00,176,1681196400"; d="scan'208";a="705593837" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by fmsmga007.fm.intel.com with ESMTP; 19 May 2023 04:55:02 -0700 From: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= To: Mark Brown Cc: Cezary Rojewski , Pierre-Louis Bossart , Takashi Iwai , Jaroslav Kysela , Ranjani Sridharan , alsa-devel@alsa-project.org, =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= Subject: [PATCH 5/5] ASoC: topology: Remove redundant log Date: Fri, 19 May 2023 21:56:11 +0200 Message-Id: <20230519195611.4068853-6-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230519195611.4068853-1-amadeuszx.slawinski@linux.intel.com> References: <20230519195611.4068853-1-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: UK2OKY46ELVLBYMM5RJ3M7NZHD35CZI6 X-Message-ID-Hash: UK2OKY46ELVLBYMM5RJ3M7NZHD35CZI6 X-MailFrom: amadeuszx.slawinski@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: soc_tplg_valid_header() logs all the failures in detail already. Signed-off-by: Amadeusz Sławiński --- sound/soc/soc-topology.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index 9bb4c6d2a2c9..20fd46a41cbb 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -2486,11 +2486,8 @@ static int soc_tplg_process_headers(struct soc_tplg *tplg) /* make sure header is valid before loading */ ret = soc_tplg_valid_header(tplg, hdr); - if (ret < 0) { - dev_err(tplg->dev, - "ASoC: topology: invalid header: %d\n", ret); + if (ret < 0) return ret; - } /* load the header object */ ret = soc_tplg_load_header(tplg, hdr);