From patchwork Thu Jan 9 00:14:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13931740 Received: from OS0P286CU010.outbound.protection.outlook.com (mail-japanwestazon11011065.outbound.protection.outlook.com [40.107.74.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98E3D36D for ; Thu, 9 Jan 2025 00:14:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.74.65 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736381685; cv=fail; b=VQ4Vstehnfbp2BOnKbG1PftS1Nh+p5wDLczbtULgNs8qiSHAzbbxFisRZcluS0H5yuoOj1Ykp4pSAI9msPUWCHjwAMV4U0d+9T9WZ3wt8ND3OvRat9CvGb0PEpUjPvpgCo4ynvBQIf75tSZbtfcT4d317E6sQ+oQ6bxI3Dkd794= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736381685; c=relaxed/simple; bh=BGG9h6McBeBU4XVl2Gbw66vkF/YdpJ6Qms+0YBxF0n4=; h=Message-ID:To:In-Reply-To:References:From:Subject:Content-Type: Date:MIME-Version; b=h1pXefibiAXUn5JAf5apTh3lbFlpk5e9VeA1LoerPwnqbVlNbSDLVQgXajhHKQo/RwfswMclbBrnqJ4PjzQsCxKWfFl3/zO7/0DOZxzVuOcnUx7hsYCwjQR+1dLt50BQT9ON3n/oswwUd6eN3rwFJ7/Kms6JN91VDPwzqP49agk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=B/GMI0KV; arc=fail smtp.client-ip=40.107.74.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="B/GMI0KV" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=y7DSeSKrSHqlSY4pesb48Ml0g4Osp3FiNZKm4zmaego3MwC7nJ4rZ2/ZnUDaSYzguKB2U2Qcb+9qEYmlLL0Dq+ci7LlepclcECfTFfHDwcmeb4DWbs1s63EGa0uL+7mtqnx3XxMVE8mNW23K1bQ6eWs6foJdnauZdmSxDFQlcDLazGZyV8ovFnqMN6AFdpgnhokf2vMRsfxCxRr9UbcqtUOlwk+HLLlK85mmU70onKEJPTLbbYskAJf+fsg5g/AMHFfYwY3Af5KrNqIJ0glcvGUtuFhgR1RzGWMtHVoZpimMzjXSe5XBe/HpQ4Xn7ndr9hb6AlalKdYoVvPh/2qaww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6TbsHzoJpLGVRzIih2GM2tU542uP2HRZPIXNwgdbw5M=; b=I/x7I09gOMFMBd5X/hoAt4KSNV3lFgdwfTMfEboKW/lknUHI63jdgA7wcdP9GvfOFn0sM103RRw+933v9EIOy/bM2DrwjSqVRudIdPg89VbJdlAyyzdCvW0edY6SoaW7y/Vebq19xL1+HnOyomzfotM+MOFBVFFuYck97cbsr2ftWz3z17d1GhL07P6yWkmjGa7tpDS855dgC4+PidvH3N0Kn9FmjatIWASEgZYtDxgQSrA39bK4gVQNwf8jqYwFlAHnYJpidumO7VmxKSHANta9PJXqxURkBIL26evxGmjnhhMLSSTBDyoOXWkq00C4PwBMQcqflOl/Rp8smo4udQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6TbsHzoJpLGVRzIih2GM2tU542uP2HRZPIXNwgdbw5M=; b=B/GMI0KVDtez1HmgDPHlrZorVQD17w0euA8D2YSira12WEhiV7oBPOYJaH9ORJqRmo2MoZN86KBRb2KyqOJIpFBZW9m27SqSQtb36SdAAPUoZEDG5ZwfBMohHvuLrADvybDnpcjcUuzqvGeCaEG95IqVSZdyhPDe40SZSjk2jPc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TY3PR01MB10906.jpnprd01.prod.outlook.com (2603:1096:400:3af::14) by OS3PR01MB7143.jpnprd01.prod.outlook.com (2603:1096:604:125::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.12; Thu, 9 Jan 2025 00:14:41 +0000 Received: from TY3PR01MB10906.jpnprd01.prod.outlook.com ([fe80::592:9b7b:ef57:2dd8]) by TY3PR01MB10906.jpnprd01.prod.outlook.com ([fe80::592:9b7b:ef57:2dd8%5]) with mapi id 15.20.8335.011; Thu, 9 Jan 2025 00:14:41 +0000 Message-ID: <87tta8268e.wl-kuninori.morimoto.gx@renesas.com> To: Bard Liao , Brent Lu , Cezary Rojewski , Jaroslav Kysela , Kai Vehmanen , Liam Girdwood , Mark Brown , Peter Ujfalusi , Ranjani Sridharan , Takashi Iwai , linux-sound@vger.kernel.org, Amadeusz =?iso-8859-2?q?S=B3awi=F1ski?= In-Reply-To: <87wmf4269n.wl-kuninori.morimoto.gx@renesas.com> References: <87wmf4269n.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 2/2] ASoC: remove disable_route_checks User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 Date: Thu, 9 Jan 2025 00:14:41 +0000 X-ClientProxiedBy: TYCP286CA0095.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b4::18) To TY3PR01MB10906.jpnprd01.prod.outlook.com (2603:1096:400:3af::14) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TY3PR01MB10906:EE_|OS3PR01MB7143:EE_ X-MS-Office365-Filtering-Correlation-Id: ecb6cbf9-e826-4bdd-7fea-08dd30429ce4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|52116014|7416014|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?iso-8859-2?q?r6pNZulapy2aLV4YJX1K2OF/nz?= =?iso-8859-2?q?J043XuqZsgGr2asLpmVv57lHscnoY8PQZMbjXoBNRuzXjEUY4I7qzI5PjfyO?= =?iso-8859-2?q?rR4j7PJFzOJZLaMVrKN6a/9aWPzY7SsEMOLD4WJOt2Ng/sUuwpjxdNz/wdh0?= =?iso-8859-2?q?GzXj+KLqONBldbPnmLxTF2gVFXEgjn6JkA/Qs2Bo9BrLXgvpTWPVzIemtMIA?= =?iso-8859-2?q?6Zwew4rEtsJYd0vDwDdLsCuxpKQGpVisozbjnyhvq6zCfSt8tKIL3dAgJFiZ?= =?iso-8859-2?q?Dn8aJMxbPsl1x5TTM+1gApgYTUnHxuH41pEiNkA07MFB369ZZ5/SxOESVZop?= =?iso-8859-2?q?3srF4f+emFx20AQAc3sTtZxtmd42KoG49Kn7oZs8geDVGJgelxCv6YE+fapG?= =?iso-8859-2?q?YXDxdsObYrdxFQSludKLCO+4tIWEiLuhlbL7Z2yqAcbULjDsiGIv4lxJq2qj?= =?iso-8859-2?q?lERYjidPRNYMirtHqG2hUlvP2SaUvjec3gT84yIKRGpzlgfLZx7WgUz9kuiC?= =?iso-8859-2?q?u0KAsDXngm6xqlmWXUGiCBXSCf28yv2l8/gnNItHDlYmWUazrEV5cxUbM8LI?= =?iso-8859-2?q?SM+oQayJYtCuoumNc733fcnhN5q+2Kh6EmacSRyEjVEk4movryU7KrF+yvQU?= =?iso-8859-2?q?ziJovLnXtDMz7+BoB/m8zpCSS80MEOYaFs1KOWrIl4trDRzr7ZrpYZleopUG?= =?iso-8859-2?q?SJs9MnFdTM33BhuLVYj/bjPp3ju24B3xuBW3jr6++d6o5n4CS/qjyEPLyAHq?= =?iso-8859-2?q?IQNK9YT6+O4pE3aCQ32F62k6MrCCMf8RQOIdGv4sbIzJwn/9+zCKLduU0t03?= =?iso-8859-2?q?kRwVvZgpxtaBAMZuCB7JIgINMpLfNLsELN7gkgxv3XaHEAVxGh2zmeQYp2Kh?= =?iso-8859-2?q?vtTPWpfUPIOdqgrEa5uYfiJI6yP7W+HHIAjXAIBXegEcNzgxiv4jQX5WO0rw?= =?iso-8859-2?q?7qkQQWnCtw0503v9Ez9p3AuW69n831qAManyTR5OsuCT1qJZVhWt2kJs7/sf?= =?iso-8859-2?q?F3jVgGcjsnonVXyAcbm2KdbjwB+raYGaof/0zoRNTGyWgJYk887c1bViUcMq?= =?iso-8859-2?q?ZqCt0wW1vTQc9/ngS5bTNg/HrKbQCwLHCTFtLrUpFriK2P7tL+Q/iejpMeTL?= =?iso-8859-2?q?BIDj4jePxwm5TAHT6UE6zJGU5cYRVlneWBdUnazSasCCAjZ7JlsS+ISBvBbF?= =?iso-8859-2?q?QTzDEdAAldEbTBm4Hv5Z+RsNoaYfCxODBDvbSJRW6IEwztqt7LQpJF1iU6my?= =?iso-8859-2?q?n8zegMDb9Z+AH+QjOmYmPhadBIHTWgGeVTHmdhHiCg8p8nrmIT+Z/LfDxghe?= =?iso-8859-2?q?wX1q3IVyd24ikBgSxK92Ei2TKbbnUBRkMqPPI1lwiHvG/0l3zy1R66XwD6GL?= =?iso-8859-2?q?D3/SJhwBPEyUGbJXHX3YBY5/D543Ln/dIMORwb5ZFfxJe1Q+MgecLb+VLf57?= =?iso-8859-2?q?onC87aYRROuSXveXiLgeytgVeFNWWJMhVQc+XbycqRVnMb2yLnAbyAw8CopG?= =?iso-8859-2?q?HmnFVzFBSHMNcuYz1Of5SXJD0Lyw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TY3PR01MB10906.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(52116014)(7416014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-2?q?WyXjam3lJ9syMIJZI5ZiE8l?= =?iso-8859-2?q?WmXOELuBxSFMaR8gSl/F/80AVeChtY0AW3lGD0IJ4SFbhxE4OpkBr8hqc0lk?= =?iso-8859-2?q?XiF89Yc+X0d+JFp5R8ERqFyN+jLGwxsPO8ptDWuvsa/efjk1atAmuexYASXR?= =?iso-8859-2?q?17m+r0/J+U6kmx8DbcN330OeYKOz2zdexRuQ/dyGAz2bRM4lmYtvL/iVefai?= =?iso-8859-2?q?qNchblrUF3sI1opqDPMy96hJ63921fwCrsx2r6/43A+SYL4Tdb9WZwPv/3Hp?= =?iso-8859-2?q?8bTrh1+U4yWoi6lgedWlR3jd6E8nwwsc3uKvULAFRh2oHo/nyDoHDdBkNUiq?= =?iso-8859-2?q?zyYO9zq6wbTiM4qMDHXfOOsJJtA9SO4oNbiMGi0iXx9d0kQpLwNmIFfDUmDM?= =?iso-8859-2?q?PSjKj1xQJs2woEeDZDEoX90XzPrQy+5USXc5RmjI+p8PSok6Xa4daoEF69XL?= =?iso-8859-2?q?xSBMEsB0y+JrSZyqjUAfHsV4X0T7q0+/5t31KnOPvzO0gcsST+2scDpaJ8aV?= =?iso-8859-2?q?QNRFngXD+S6NB5qbkrTElgekcC7AGC+oi8QRl46RGyYU6FOOambmGG/MjApE?= =?iso-8859-2?q?boZyioM61hsfsTfb9gq4wpljq9Uv659Yz5NBBIPKGZTWY5f8wEwNzLqxtJXo?= =?iso-8859-2?q?3eQy38KUU8zkfOgg+OP+ycVSFTIuOl44rby8uP4YtI4kdbMaavPp69m6IzGN?= =?iso-8859-2?q?FrmT+pIgZyimSNLpyWnbXcp4vIqyUhmavl9JTRCRvNZiFdQZV10yVqueKN96?= =?iso-8859-2?q?76E25T4IBO73W7WHSZQE0P3u2kZTm+eWphSvBSqH6/PF3MghhM54FDIcdEc2?= =?iso-8859-2?q?1H5R/zLaW/GbNX2Hwjx9harTBqO9SAgZYAXu8nV8bF2vowyPC/1BX78geJAn?= =?iso-8859-2?q?kE1h3b1cTt8KhBUtEEl56dT6n3eDoKe24aENBqW7EjBXI4duc5gYPtCI5goq?= =?iso-8859-2?q?3ZIJJmTNhKKDq+1irpKMoX05wZbOQhnXtOJ175CTxm6+7JO9G71LHWMsVetj?= =?iso-8859-2?q?OthIdhzZoAHTFd2PZx9DWOsBiw3tLmk919Fpcw9cZ7DgOWav8DgHKDzvkRkg?= =?iso-8859-2?q?MGIeCKE0+E0rNffhUehhGd49j1k3uTtAycVxVNv3GZkgaSqARFE5LWB+DWEC?= =?iso-8859-2?q?2Q9WpqRZhGnrAFYpkeu2ZxbRbSBpFb7mRbArS9PTIJdOBROuZfDlQaesQp5c?= =?iso-8859-2?q?DJSh/t+9EWIZNM0otzI/OxdRlg8diXdHgDyb+rwOPNS/5hQdGxNhArX92O62?= =?iso-8859-2?q?3kz2x1nHncwKbNUd3RqITt/bFlhp25ORVgBgdjHol8Xfgq2roCgFJZQtKn+d?= =?iso-8859-2?q?8HLgY8QJbN19CnTFKn28jltunLvsRQlY1hDZtlKjYPvHswODYM0T2vInHN7x?= =?iso-8859-2?q?iX4btx0NWHMicdAZwAVSqoVxu8+Zd8XFd7QYHQMpXErSMWYCFaTGdTZfYrUp?= =?iso-8859-2?q?IuNDmUGR4Cei3KiCDWa1wsAo2vRA1z+Hdw++Mh6ysazIi3fOJYluY7nslHuN?= =?iso-8859-2?q?y6/XOsFmtJPZrb1Wowa6AAmP8AoGma4CMUmMS3Q8ygVvUzaFEobLvqVBV5RB?= =?iso-8859-2?q?eSQYx1ZzioIA3uGSSQnCZuo8/3EZRvxvX4/7jiDvyxr1zSMI4mcaWTCZIn3J?= =?iso-8859-2?q?p5C7SP24lIppLHD9vyxvY3Lcnm8I1lLKsnr04RgHjk2fk5dkWjvKg3ys9jgw?= =?iso-8859-2?q?=3D?= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: ecb6cbf9-e826-4bdd-7fea-08dd30429ce4 X-MS-Exchange-CrossTenant-AuthSource: TY3PR01MB10906.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jan 2025 00:14:41.5718 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7HNFom777/jCDRF/xc3KhcKzT6rJ9lvpUAhHo2T1kmxUKd/CGrHizmBpq6c5UXKyrcm4r4hBLGzpYj40diEhEtoZtwgasG1bhwtZetzWDRyxyk0rY7Bt+JQL3edWkDqR X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB7143 No driver is using disable_route_checks, let's remove it. Because snd_soc_dapm_add_routes() itself will indicate detail error when failed, this patch removes duplicate dev_err() not only dev_warn() in error case. Signed-off-by: Kuninori Morimoto Suggested-by: Amadeusz Sławiński --- include/sound/soc.h | 1 - sound/soc/soc-core.c | 29 ++++------------------------- sound/soc/soc-topology.c | 12 ++---------- 3 files changed, 6 insertions(+), 36 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 4f5d411e3823f..1e09ff0842478 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -1118,7 +1118,6 @@ struct snd_soc_card { unsigned int instantiated:1; unsigned int topology_shortname_created:1; unsigned int fully_routed:1; - unsigned int disable_route_checks:1; unsigned int probed:1; unsigned int component_chaining:1; diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 710c278e4f36b..ca1db71740510 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1644,19 +1644,8 @@ static int soc_probe_component(struct snd_soc_card *card, ret = snd_soc_dapm_add_routes(dapm, component->driver->dapm_routes, component->driver->num_dapm_routes); - if (ret < 0) { - if (card->disable_route_checks) { - ret = 0; - dev_info(card->dev, - "%s: disable_route_checks set, ignoring errors on add_routes\n", - __func__); - } else { - dev_err(card->dev, - "%s: snd_soc_dapm_add_routes failed: %d\n", - __func__, ret); - goto err_probe; - } - } + if (ret < 0) + goto err_probe; /* see for_each_card_components */ list_add(&component->card_list, &card->component_dev_list); @@ -2235,18 +2224,8 @@ static int snd_soc_bind_card(struct snd_soc_card *card) ret = snd_soc_dapm_add_routes(&card->dapm, card->dapm_routes, card->num_dapm_routes); - if (ret < 0) { - if (card->disable_route_checks) { - dev_info(card->dev, - "%s: disable_route_checks set, ignoring errors on add_routes\n", - __func__); - } else { - dev_err(card->dev, - "%s: snd_soc_dapm_add_routes failed: %d\n", - __func__, ret); - goto probe_end; - } - } + if (ret < 0) + goto probe_end; ret = snd_soc_dapm_add_routes(&card->dapm, card->of_dapm_routes, card->num_of_dapm_routes); diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index ae2d6802cce05..9f4da061eff9e 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -1101,16 +1101,8 @@ static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg, } ret = snd_soc_dapm_add_routes(dapm, route, 1); - if (ret) { - if (dapm->card->disable_route_checks) { - ret = 0; - dev_info(tplg->dev, - "ASoC: disable_route_checks set, ignoring dapm_add_routes errors\n"); - } else { - dev_err(tplg->dev, "ASoC: dapm_add_routes failed: %d\n", ret); - break; - } - } + if (ret) + break; } return ret;