From patchwork Thu Dec 12 02:23:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13904614 Received: from TYVP286CU001.outbound.protection.outlook.com (mail-japaneastazon11011020.outbound.protection.outlook.com [52.101.125.20]) (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 CA64C13AA3E for ; Thu, 12 Dec 2024 02:23:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.125.20 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733970197; cv=fail; b=MIfNaZxjLWc8inxgVmWkmGyEV63X2Y5KemCNX0m6+npaZqb20nwKjgfr4vn+kN7xl+SwLhrNVs11EwX2tJ4N6Oa8FtF4TRrX5IMfpq+GuS8dH5BQdDAS5AByEgVFiELBdskNoqXyxAd//m8lR2f2oOMwMrf8GN/AHdz4ty4OaDA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733970197; c=relaxed/simple; bh=pX5IrXd658gQB9LQ/9iLyicZZadhJsjfLed36peK7CM=; h=Date:Message-ID:From:Subject:To:Cc:Content-Type:MIME-Version; b=WtWNA3v8sT+G342xNUjYmhPWu2SdKngWO8HQ4IZxziiNbXCFqfVv7bUGor5vvJ4w7Tn+7IqADT6rtlfNOvYYwXmKaF5qttb0ncuCC89nhGLTKn+gC7Fruv1FrhI/AYCCclf1tOX85z6o8WsQKP73eaix7RJ+7P15POuMBXQ97fM= 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=a+4wa1GD; arc=fail smtp.client-ip=52.101.125.20 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="a+4wa1GD" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=b0urVx3/pAjZh7rukuQ9lev7PAUZr5wnpo0sSrQpkmK/1E9MVvf2o5f3NGzq/sr3z4srdNpfyvFLlr8JS/1Syf/95+AdZQMMKEZYvMdFHKPguJ/kyyRyjHZJWflk+4pFO4MXl7mQ+mIqWvb968Gb1jON24h4+LlesTIGHykERS9JWEHyLeMmHoAuVV6GNzipTNEM/kQmpzOwbpSXoxBsgb5Ze/zhN72K4Zn77snFwW7j5592hZ+24d7DZvLGhgN87pJqcNYWQ7TpRpYAyzjiJH8h1ok2tV4M2/uH2x4WklFrVyR2onvnSz3qwnDP8tt9gQJR/Z5bydJEWwHHUpR+tA== 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=XTLOnZBQd3NZjP1LqoWr+Evvp6vo8WtdpPV0s34YUj8=; b=h8zZA8ySqtWW69KTAA7nuzF3qt2XHVjU4FDoqf1q85ARjPdhvYjFZlx7YFiNiDaqqF/Qnvq3dlTC0HeH1He9a0D2zr87Z/pJ26fmy6mNR5MwsqHYVbZzGvDum4ot0GF8NvwNf+AZCQSesIOv0q6T7UbaV7wS137rSp7/0eQAHDVM+obbwSCSjgEeEvmhFXOsV1bYXk29kww7+34Sc9Z5d6qkZXYTNODDVlqufsR92piugqT6RKz4OLHWdt3MC+0WNvVTh5//PH9/RgHPNLIGCLqORMjYRNWfbVP+myZ/8LyqTXYfzVBqcojbbGZrFYpEaxnxwsxHqr/r+q5Q5GqOIQ== 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=XTLOnZBQd3NZjP1LqoWr+Evvp6vo8WtdpPV0s34YUj8=; b=a+4wa1GDIqgCkQ3j0c/6lqoqfowzOhIIlEJ/j4emZuNhG/sNsB7ESqS43VIfGmVCGNfpJQyfTAB7+ScArbiNnsDpMmBRkIwn9gCAquAeDryp4N/vbQbXkNcSQnjDSqRShB7uUOiEmdOYBA09Fdqkrfuqd4tc0N0kPs1eepjzTvw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by OSYPR01MB5509.jpnprd01.prod.outlook.com (2603:1096:604:92::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.16; Thu, 12 Dec 2024 02:23:10 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%4]) with mapi id 15.20.8251.008; Thu, 12 Dec 2024 02:23:10 +0000 Date: Thu, 12 Dec 2024 11:23:10 +0900 Message-ID: <87v7vptzap.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH] ASoC: soc-pcm: don't ignore -EINVAL on soc_pcm_ret() User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 To: Mark Brown , Hans de Goede Cc: linux-sound@vger.kernel.org X-ClientProxiedBy: TYWPR01CA0042.jpnprd01.prod.outlook.com (2603:1096:400:17f::13) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) 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: TYCPR01MB10914:EE_|OSYPR01MB5509:EE_ X-MS-Office365-Filtering-Correlation-Id: 4ece1369-182c-4f65-c877-08dd1a53ec55 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: mT+darau1ixF8fhkreLOKmav5VSlGCJgmgQt2tb7RyKNjabBD/zb0s3m5bLFy+Vl4vMdSNp6fNB3Cs6cQmbF0RjsaTnkbHo/eUb9bHG8DWKeSOi59ty75Sg+56ddH1mpFc0d/S46tbCnF70sfSK0vk5MfxjhBa/+6Fg27S5SHiqZTJ6IWtmIiOJF4pgPaMoYIKY6P3j4xhfg6PkADGMbbhAqGhGoiem1t348K/GZ2+LPB+keGRsmqpIiLm5vFMgkjAAd90RhVQ+WjYbYJ/KeLDnn7eut5A6V1Czex/xYeOEr1x2y5rEUr4jVl02MFmupgsckavvqPJSKjOqoDrjqvqT3qXUAWBZ5KTQlPSTU6VBxsf7XSPmmXKhmAuQZnoO4qjRzzLpaYTJNZ/Ig5VyEWjftjVTI3xNBPlZCkpiGMwrcucqGcyxwmLkBd5v3KZGR7ijtM1sVSK7gTWKAuN1437k5iegeRiATYql4hwD+p9B681wmRoQnE9VbDPzcO3XbIAtiADqRJ/M15RK0KSlc5u1i3oO967U75MDn28jbCEa0DXKrq2u604Hk014SAROQ921UZ8nrNoyirwYphwqc5l8KYsfkAhBpQtRgIHZqnaH3fp7mF0S+L+rZc7SuzIvzj1pHDW1PmEmL95uNl3j9ZzuFlH9r5L+UFS4S61fPZFBUnN/52jLaHqqs0qkLSFCpha10cKh8IjAYt49W04HaquqcKWqCtRJ3/PPEkANC5Vrt1iq70ZvsrKurF/HmUjiq7KE0RP5VqXw9QwAuH2pakB/FYDTSVy7ZBFX6b5PbxuXhMy1sbsMV/RczhHNkQ+PuXt4+P3Ad+Ouv4RHhmaEdy1X4oBS0TIxhOqP00i/UeBy7c/uPClDMePVKtO/gHwXJf+jylrKcfKJuwD5/Rc4MFkBvXv6znfjcytufxvbmM0VYr1RHzl15urfveQ/JRtLH0z0/s5jeEB+/sNzBZAqJHrJ6mYD1T52c4TPelRBHgeh9b0nY/myZSROMLgkpYVxt1eOKuGgDyffurz6iWydPY9rq/R2Rw25pxYppHfHIScv52rBCsnr3WAAxpzS3B2/FBjE3OXUgAx+Foc99B4lcW5emkHJX8UcJOxV8NbKUNasBGxmHJuoJlrYFWL/Y7vhgAeAgHvksha79BHqFofgCL/swgzefgfFA+gGkeU6mDlu9G83BUOhsJiZGYjfbDNRWRP76BoaId4Z6b3+96dxD9JcltqR5fNjOWAf64Gp5LBM5K6naVrmOuHqLhfY+gTWO89nJJa3bnQeH+mHgvjcm1nxei3gEWL83x9+YAamfEUGWxXhP++vZtlea8VsBr12oMTvbAE+IH8IJhlE1UXlkjVXBobxNeOF++5gu5xgMPObXYVBtDfPa4+dlelsoUXzJ62upLGixuiyb3eLosOGmVg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QFrk4MQqYqo3mdBhHvVL0GElM4Tpcm2lvubZ8qiFeDdU/H2CrZec9JM+MEmBe+cR2tokj1lmfdDvhiru58GymPk831BBtkgs4ARJm+ZJzNgF1MGCH30Qeqbc9aWvmriw/vcHf3tyIYeSY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okIvEU6psoclKsOwNKOG8ukF4KE4PnVssS37h6q+LYHn0LjuGZ2c/GtT1IX8H+oyPWLTJN2VKQv8tQMis3KwILEG6d8hJARzTvg1boa+Y82ipCGzuZs2KelQphNZEgNki5H2O3qIT+q4A7otB9GTS6JWFzS0tBTWZAWnw/NlqVXrJbqtAkVmRDJyRS7iWg0WjiUl5c8JiW39/eV6ZPjNOu+T15//oZNvmlft3hMoVKD3WKO8dKcQ+h8nfP5ew0PExonxdJxWZ4qiR8817l1UDoE4uy/vvbHBLNrOPsUkVRBEHyv99FUWXBVR7eCEQgOyFyzr9eo7IT+LEUjZOf/LtMh5RKpKdrfouOk6pL2xICRqWWFNgWAuiZeT6TkvxPI+AFtXwXWeYY6JI1xF98P5TvIbyrDnxkI= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4ece1369-182c-4f65-c877-08dd1a53ec55 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2024 02:23:10.7617 (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: 9LyX2Ac9Z15QOWIFP1Xj2Flioewt5o2yesqTQ/vrLsWVR8jn6bNKAufSP17URj8YcR8CRGarGUy5+uemD/K/w7h0G12di7UTeqDNH/yEn5Gh9NfdVrEpBintTZmtREg0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSYPR01MB5509 commit 1f5664351410 ("ASoC: lower "no backend DAIs enabled for ... Port" log severity") ignores -EINVAL error message on common soc_pcm_ret(). It is used from many functions, ignoring -EINVAL is not good idea. The reason why -EINVAL was ignored is only for ignoring dpcm_fe_dai_prepare() error flood. It should be handled at dpcm_fe_dai_prepare() side, not soc_pcm_ret() side. Cc: Hans de Goede Signed-off-by: Kuninori Morimoto --- sound/soc/soc-pcm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 1150455619aa4..7ea580f0a6f7f 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -38,7 +38,6 @@ static inline int _soc_pcm_ret(struct snd_soc_pcm_runtime *rtd, switch (ret) { case -EPROBE_DEFER: case -ENOTSUPP: - case -EINVAL: break; default: dev_err(rtd->dev, @@ -2560,8 +2559,8 @@ static int dpcm_fe_dai_prepare(struct snd_pcm_substream *substream) fe->dai_link->name); dev_dbg(fe->dev, "ASoC: no backend DAIs enabled for %s\n", fe->dai_link->name); - ret = -EINVAL; - goto out; + /* don't use soc_pcm_ret() to lower error log severity */ + return -EINVAL; } ret = dpcm_be_dai_prepare(fe, stream);