From patchwork Mon Aug 5 00:35:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 817124 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 (unknown [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 3F38CC3DA7F for ; Mon, 5 Aug 2024 00:41:51 +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 1350849BF; Mon, 5 Aug 2024 02:41:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1350849BF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1722818485; bh=0cRBQYa7X70wjyvei3chAN4k7fTkbsPa8BYLzdNmFzk=; h=From:Subject:To:Cc:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=LnPOqCQMkzlzjiVXDsw3jOPo5M2bBwTSqdStVdrt1vN+Dg8T6UfwMK0MAx9Wputuh O3ukQvsNcsW6bUlEzBPnDlcI+Pn866raeIwPoshaaKf0e8wgfESwjr21hsO2ElGz33 zffZx2HjYFWFIdNBVJmIJs8vMd5nk0B3SXK83luU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8B8A1F806D9; Mon, 5 Aug 2024 02:38:55 +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 54328F806DF; Mon, 5 Aug 2024 02:38:55 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CCA40F802DB; Mon, 5 Aug 2024 02:35:08 +0200 (CEST) Received: from TYVP286CU001.outbound.protection.outlook.com (mail-japaneastazlp170110002.outbound.protection.outlook.com [IPv6:2a01:111:f403:c405::2]) (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 9BF0BF800BF for ; Mon, 5 Aug 2024 02:35:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9BF0BF800BF Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=cFJVjafl ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=USQcUpxb56KN1x5mzSFogulePun0zPrfg/XaV00e8ivhrHCg5RaYHF6Q7OQu1wrJu/S59qj2y2mCIRcRTSiGfJSNE+WgI4Xme5nXR2bljYzkoXbpAMUDmceKbNioum4wPYkts9tv47tIBxDihYjlr1vsi5NeDDBEZqk/C1K06lOc8CIjiqzrFKmvVxJcQu0bquKzEa0HqP4fPTgbZ/jxrYzNu1ggCzrekqb5A/JUZNCA4a8a2kVAa30P1VU7nzOQFs7k2/2MEJv2SdAQnONFgN+v2DoYpL/p2SYZNXFOhwxJnbtfRi9r2593XSOB8MhxicpTUYTan/7v529q9yDAsw== 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=1ces1U53ktVFxLwc0yyu5L4AAL0qNgQj/TlhKtcqksE=; b=BW19Q5y2cC4zFSjJA6P1hf4U9pqKvT++WZe+NxcEu/FXFB54K57VOLVzsTLhq88SLhKcbRzrLBymhNyDNbi9J2h1FGB0J+HMB8YqK2Jwkx7RGmsTlM4pQaZV8vfjmyrOOj0N88XemXefSnA8U+kDH6dpw4MnWkYsHSJDCAND8AK1sDswN9ol4qc704ENSypvgmfjqkJ/PdxGL+xhBXUUTRq23ZxF4juYjEQn+VnnFwd7tNYZXnfgZgfpB/LllCkIjsqWxYINJdHIpkEu+eecKMcjGaLh1SuxPnx+xDjVWFjEIKJuer0TzfxYQnrmMP9bJ849K28BGWj07pVUM52tPQ== 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=1ces1U53ktVFxLwc0yyu5L4AAL0qNgQj/TlhKtcqksE=; b=cFJVjaflIyv3nJfpRiPJ3mBXbysPd+kmEBO8sKuEzqwPsB+5GnAqkZkikdTUN9mxJwp4pUxRRDE735+ygoHtIe9PP1avDWDK+Xfjc1csdZi2sOwBoiYeKK0XpGyBtWGgVG+TiEn7WdMsDmXYwzmIt1Nf2t99iMymCs7MSEg1/4I= 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 OS3PR01MB7994.jpnprd01.prod.outlook.com (2603:1096:604:163::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.25; Mon, 5 Aug 2024 00:35:01 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.7828.023; Mon, 5 Aug 2024 00:35:00 +0000 Message-ID: <87sevj24en.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 008/113] usb: gadget: use for_each_pcm_streams() User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 To: Mark Brown Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-staging@lists.linux.dev, Linux-ALSA In-Reply-To: <874j7z3j1a.wl-kuninori.morimoto.gx@renesas.com> References: <874j7z3j1a.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 5 Aug 2024 00:35:00 +0000 X-ClientProxiedBy: TYAPR01CA0222.jpnprd01.prod.outlook.com (2603:1096:404:11e::18) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS3PR01MB7994:EE_ X-MS-Office365-Filtering-Correlation-Id: 91f5396c-188b-431e-b376-08dcb4e6706a 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: scsHlm2gPFeLcTsY6KhChba8aw0qg9y+j+afEktsyJq1lM7IZ4Ef9jTDfX/KZ7e5OvE8XQwJP3xk+09GcNBIYDBiYqtfyl7XJQ10U09L6hclwCrba+glDYMvWBKMBQWlkULC+D6dL/+NRVq8SNnYmlNbhQpz59NPH5EW9QWvfvyGos54PLETNbiALTyscqGj7kLui6UPnNfcGfyxdaJir+DzMXuaLoJQrMwjOmmLshlakqhLQ27PgOR721cybnV02w5kkioPH5kgsJvYwX+HO4lylL0WhBqslWGeqw5zmD+Dz93wnaA97DZzADJ/++kOa+v+JYBPPKW0fsIQPzg4SQE08kANrNIO9gzyIRwJM2HO8tkzg+E9TYq+BMeR4fupoaRg0R8jbWldrsuvti+o7rObciEACS69z6kp7VEIIVFqeKhN07atMq1Qx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.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: cDhDGU+mcuqbgW+XUkTysuV8pkOfRi/tcisuEjd2PuO8HtiHOWAc8q7ahuA2ocbATrE32JtW2rxuEgzjALE64ssctPfGnTtsbwfscnywvcySPyVITHTHst9R1PNbNbsII+nvAbgbSS3kkL0i7rnPow4EImbzVsRngEv6c6K4RNNAkw6ZCI5R2UDTU5cIA1WvcYuFEMLZCEgiyuDWPikhkT7dWiUmWMj6gbPgEjWOm6X/VOdnIu0D+FsII0wu75zzvGZH0AlxAzb5W6Js1MnJc3pP7Se8v/7MAOgqKpFmsrTYgylGT3v47MaE+OW2pb8dB2jw7vXTkc1z+nagiqYWGRT+xJ/Wcf3fFqrqnlZgqJhB8BnM2pHEcLe1js0SdlqluljYbaZ1A9vSdirfR4HT49NKXxR3lG6CpWeQ81WUJFApC/CbbY0pHgtIoGXhpdjKX2u68L+hb2/c2P+tRJJeKNTXTse84+8yBA6vKJlqiI3Ao3GLTzWf0URkNaDP2QiS+D4eK1YzimOxNDF65CucL09mN6F5xP9udAZW0mQpDiURV1g7piGi13V5jO6OlSBPbctX+dCua8WQGI+Dimmaj4frwJwTjkf5vaJBOk525Hp9qRzzF0ulKxiltwq6s5wPaRSI4aOSTHBozIzv1QfCJonKJ/HAwY2uKk3+BrRFhId7YxUWFiEmgwn2OkX+oJkJOgJQEqn4yjyW6Hsi2QqgBVXVeXmHm9oSOqlgSzZ+FocxcyKxuABG/Js54riNgIiHo/tvMICx7zCShfnjGSIz04Ru35DxyEuGGxEDMiLanim2AmsHz5QIiD8ZtAYk61kEh1FTrMBkXpXEYFL50pLfSxDt+TP6JQkwDIKpJyOE5u2SNVEsd+SimCaPAu4bPxuRI95kX2WvLQ0unq+ju/dTkNEUQGvAzOMcNxuyJe8XETW9q6sL4cxYFtZDpsoSNyvLu2/wlbsxszoauBZ4Ce+C3ZNQmIyVmJ4w5Kiq919+hWbVPThuZHL1Kb3LSadGTAzlxdGGm0mgecDNjIUp0x2Vn3vYi+6C86gV8L8dOk3dctUyYKfeG/uPrD5RDEqe9NpPnDYWlBHgEuAMMcqt/DzZ9PSrr0aAU5x/7XOvg1gzZ87hH3l5B6vAu84CvX8J9KvA5xyqRiD/PXfxn6stuimwSJPoS8//Vbf5BltU2EjyYdUDxEPxxM2yzSt7A3OZseCLb7s5XbsO0oert7QBs/jCTAIW7WbLUhybT22Juy0iqaQLzHme2oj7IVzY5783MPZYdUkOXQA0yqZuusdP7SKumw9m67x2IWXAOh51WaSoVKMPHBfMxrJODV2qKAKYLhzRZMFf0aMTbg/njTkwbFs5ibcFy1DtzZyY+8QJ3Ve0qmYfwPCwG+HA/4MzhAQGr1VVTnUKAaqRmTPEnqeiIbuY2TNH43E+OBFjctJHp5UKn87up/RtE+vxA0cO1iUCez0/JO49mYVQpUnGDIX7T8pHpHTh27DGlXEaCfvJQb+tIHWLIYVv0doaSbMnpl37ZfLXkCgN0PzD7Hja1dWY2HUaY+gbyHTu69J0NPPK/mWh6AioYDBtwVwkkxRryjyeGa8auQ4oDN0ynMvwuNlNS9kRvNRKVY2xhcPRO1U3BmSIzwc= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 91f5396c-188b-431e-b376-08dcb4e6706a X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2024 00:35:00.2135 (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: JXICSwgs38YGQP4AevBDgBz5GTykvSpU4LDYfOFacVkAGevAwn/LX86kj0W6Cjo/LaIMX29fwd6Hnxi7IUBY8/lzZO5ToqNHeEnTTDP3zO3qFxdp9peRbZobMTgRo0TS X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB7994 Message-ID-Hash: ZGZBBIQTRLH6T2IK5H75WFYHXBD5FMZK X-Message-ID-Hash: ZGZBBIQTRLH6T2IK5H75WFYHXBD5FMZK X-MailFrom: kuninori.morimoto.gx@renesas.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.9 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: We have for_each_pcm_streams() macro, let's use it. Signed-off-by: Kuninori Morimoto --- drivers/usb/gadget/function/u_audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/function/u_audio.c b/drivers/usb/gadget/function/u_audio.c index 89af0feb75120..40093fa1093d3 100644 --- a/drivers/usb/gadget/function/u_audio.c +++ b/drivers/usb/gadget/function/u_audio.c @@ -1290,7 +1290,7 @@ int g_audio_setup(struct g_audio *g_audio, const char *pcm_name, goto snd_fail; } - for (i = 0; i <= SNDRV_PCM_STREAM_LAST; i++) { + for_each_pcm_streams(i) { struct uac_rtd_params *prm; struct uac_fu_params *fu; char ctrl_name[24];