From patchwork Mon Oct 7 08:53:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 834006 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 B6E35CFB440 for ; Mon, 7 Oct 2024 08:55:00 +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 E1A4B868; Mon, 7 Oct 2024 10:54:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E1A4B868 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1728291298; bh=QsrPG+nN03FY9btqeKg1xaLJbXJWbSWRHKBnbuZ9o90=; 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=K8a6wKiueg0z4sOY+9mEw8DNxR+uiigngrvujnYauvpKb5K6qXQ2ojciMsPNRjNhm LQwy8g1NfX5PyTU49zkzmHKWlZX5AfMt/TR80oGelagMrJrYgB0f7Ifxh5wuFTN84e 9D7HRxMcBfbI+vkY5/CSv44w9ODOWsZA7knRUbiY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 09812F805DA; Mon, 7 Oct 2024 10:54:11 +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 167F2F805E1; Mon, 7 Oct 2024 10:54:11 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 601DAF80528; Mon, 7 Oct 2024 10:53:56 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2061f.outbound.protection.outlook.com [IPv6:2a01:111:f403:2415::61f]) (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 44AE3F8001E for ; Mon, 7 Oct 2024 10:53:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 44AE3F8001E Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=uoOncj5m ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KJygU34GMe2Y2RBudpf89tj1Qgy8TMxf+EEm83JyUQT5lqqDL2yT07077iTeSY95snFb9ClBRrzgIS3C6uYFqXWfqRUbXst8uLEY7GvXE9KydHo80PS8vEg9HqYqUaxCZgxRFrOVeFMe3bcZzgfShLHxWrsVPhfG8Sq7EKv/gVk4OIZSnquN1RXFm/GAd28IDFguwVKPTbE3lp9NYHqsjFxCIK/S1Rse9UysJ744rqZidjAypYJDHKkWWRCSBuBNj40BCEMOOnQGRFs6meXmlufguc5CHRZnke9CZbCGhFIts2MC0hfRs/6vt839OyzbQYOn5JdAoQmdu2zd9BMEAw== 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=sHSN62lhcsxAa4yWYNu60F4Ro33s7NYfkZJYu252SSc=; b=W72ORHhG74FQIo6h/U5772cX/zLFgGPiYk44ZuoUCa/lz5BwxML2hDlSBDu6dcu6YIz2r2BhRBOYws2eKGoYUUQo5kWKB8C9SOo/WgcrDNe5m5bStuBZ33eg+zPuNNvDtS6DXk0tqAUHkFZgbiGQQADadecibiUx9YAQOsHe3Xn/PUpHtjPyxUs4SiCOetSEx8sUdghLy2h1xy09b84B7CnV3mjMmkoMO2QH+u+P1f/Cl/VacuV/5DM+M+PHIC/bOB6Z/tZlofTONH86fWCfMuh//YFh6ktO9Ffo07Oawuxt9sg1OZQt9k95XNOaLZHTZtlH68s/v0sg99lBEzPEig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sHSN62lhcsxAa4yWYNu60F4Ro33s7NYfkZJYu252SSc=; b=uoOncj5mUZ93VDFol3DWDVoOsS3WjzOdB/SOmzUc/PfieMni0qEpgReo/umrzu/+j2xnI2WY9I6u/KCVNveLFaFsYCw+SdKQg1I8fwGVreTKRKkabCVpOU/rb8nh1jh4ZFQL9ODl/qRNuKy+r7m6ZGbkqfo2SSQOWEq1KUWdl+I= Received: from BL1PR13CA0023.namprd13.prod.outlook.com (2603:10b6:208:256::28) by IA1PR12MB6330.namprd12.prod.outlook.com (2603:10b6:208:3e4::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.22; Mon, 7 Oct 2024 08:53:46 +0000 Received: from BN2PEPF00004FBB.namprd04.prod.outlook.com (2603:10b6:208:256:cafe::dd) by BL1PR13CA0023.outlook.office365.com (2603:10b6:208:256::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.15 via Frontend Transport; Mon, 7 Oct 2024 08:53:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF00004FBB.mail.protection.outlook.com (10.167.243.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8048.13 via Frontend Transport; Mon, 7 Oct 2024 08:53:46 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 7 Oct 2024 03:53:41 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH 1/3] ASoC: amd: acp: fix for inconsistent indenting Date: Mon, 7 Oct 2024 14:23:19 +0530 Message-ID: <20241007085321.3991149-2-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241007085321.3991149-1-Vijendar.Mukunda@amd.com> References: <20241007085321.3991149-1-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF00004FBB:EE_|IA1PR12MB6330:EE_ X-MS-Office365-Filtering-Correlation-Id: bc27497d-96fb-4db8-e16e-08dce6ad8e15 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-Antispam-Message-Info: F949k9EmAZaT1Wpljzf2lhtEV6q+esmMUDeAN/JxMdE5af8zeAp3Lff9tdj1aJVG/sDh5PYKQcAGxx6KeW/SYbR/SPkkRlxEnNzQ4JyNik9/+KM4RjjpGFJlrW3ZNN5InH37Qa0pzBjUtpAJ4r2pNgfjqSyitp6inbYmuVZGM8DUbNumYKi3N3OQXGJVu8YkmQNqfaZVl/yhQEuGIRzoD2wtPmDnwiOG81mchV5FaF3awH9AxvkEm7vcgdkTu8s0vovyXhO8TKO3AudO6OmVFyEsQ2pn99yzhlf47tnVgYHuF202ZtCls2DFyuTf9ilwDaQm+EDsiQ1YYZZouU2CljA7jE2zWk7CVgxhVdLZf2Gkop7s026o79Gr+Z5VDVBVG6yoESchHRtEG36N8c0tCFvfO4h2vSVl/HrqpB4UZdqpdXc4XhZE0nCtUGi5UtdUcsLEjheC0fPnmL7rM1nD7f4bBT82PRrC5GNRvy9qZIycEiRoallgrouAUW5nvzPueMpPsejSW+52L4lvsRQdsNi5tsUzSrFgFj0FtbyHKQ3832W6SlzcffhRQesvVk3dO1wTcx0BQp4HT8FnzIYz+waOxPI8YC/Lk4HmfK51QJ0BNBAfqqnIl8Y+n2vn6jZLFbfihIoKhDDzyNU8MI0K7tWg58Y3drFUowEWGpMXarAx62Em4MWVYypWVjdDQTUqfNAFJw4FkfCp1piOj3/cBt9LYW6yin6lSDknFld70tpDvEqotqX7448ZqEHJ8me7SRjOyZWbdF3rp+fUJMxQTGvX9E7JZxxsHEtjf1xk5Bwa64vSP/S6D4uOa+pWlVLuAMiUGhQymKeq6n/TbUfMhyYzNXI0LRODtjJoupEy4GmVTB5YDL8HT7P+rPN+CP7O9qY6ha0WJOHxUEUNC1FvtJGokegCJXzw8M5UpqznuKjJ4ZSf19eG7Qmluh8yh6gmOlIhdAV7NfR8WjVcaGqzfMeoUyyuXcZrq8WlDFpFIef1uNAIdxmz4f8XJOH48pPIJ4vB9ErscI8nsQbudlLCkPXPmkM31nSczDGnNqYAF11BUJmc1D0S9D1rDMYGn4KDND/31i9jbmci6FFwm0ZWX9OE0XgZWrWLOwwgAb4N9fCBkgeU2E4FMv04IR/kiZrbFlU8l1xHZUd4kjyFCjUDUb71uoo37fJy4bJOU2CTtljRM2mZxfTz63YBtNepDaUi9XviN9VQQUm9iLIek0/EdwPnbALaR50qCss848ZDw4EIqXtEGxWL/lqc703qPN0LrgP8/58mHQgy3NK+n3OwGCHBAVkJjPp02P0SPLYIhJe5xh7zuTTeGkEgv+GZVCg8ViMXFavR9S9tcqdreQhJhARZu35E4CgPLfQsXIXJruRsy1CjC2OGduVvDT49EYlz X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(36860700013)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2024 08:53:46.6515 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bc27497d-96fb-4db8-e16e-08dce6ad8e15 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF00004FBB.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6330 Message-ID-Hash: R75WLRX4OCZAQEN6AKFBL55FC2KOULWX X-Message-ID-Hash: R75WLRX4OCZAQEN6AKFBL55FC2KOULWX X-MailFrom: Vijendar.Mukunda@amd.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: Fix below Smatch static checker warning: sound/soc/amd/acp/acp-sdw-sof-mach.c:365 sof_card_dai_links_create() warn: inconsistent indenting Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/a201e871-375e-43eb-960d-5c048956c2ff@amd.com/T/ Fixes: 6d8348ddc56e ("ASoC: amd: acp: refactor SoundWire machine driver code") Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-sdw-sof-mach.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/amd/acp/acp-sdw-sof-mach.c b/sound/soc/amd/acp/acp-sdw-sof-mach.c index 306854fb08e3..acab2675d1f5 100644 --- a/sound/soc/amd/acp/acp-sdw-sof-mach.c +++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c @@ -362,7 +362,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) dai_links = devm_kcalloc(dev, num_links, sizeof(*dai_links), GFP_KERNEL); if (!dai_links) { ret = -ENOMEM; - goto err_end; + goto err_end; } card->codec_conf = codec_conf; From patchwork Mon Oct 7 08:53:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 833354 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 B29E7CFB43F for ; Mon, 7 Oct 2024 08:55:12 +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 AA5EABC0; Mon, 7 Oct 2024 10:55:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AA5EABC0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1728291310; bh=apfTT4964LnIJyHqKMgDadof/5bd5+ZedoJd5+Vdrew=; 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=dH7DnpPteGe+blGUgWWUu7L1IKUMWlHFgHU4uvyABqYbIk6qvGj0YH+EUq7Qacxs3 sDqC7eD3+NAcgNKPpulaEmYr2kGMLoz8K4N0UBbsJcIbTVeb2ZPMRxW31WTAUzohYQ 2o4gEFx2lwIK1/9qqC0FNR6+CKQe/aSaxIyWLbWk= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3E513F805F3; Mon, 7 Oct 2024 10:54: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 1246EF805FF; Mon, 7 Oct 2024 10:54:17 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 09A4DF805A9; Mon, 7 Oct 2024 10:54:05 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on20618.outbound.protection.outlook.com [IPv6:2a01:111:f403:2416::618]) (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 7139BF80496 for ; Mon, 7 Oct 2024 10:53:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7139BF80496 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=NrqWzQh7 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=He+D3QbId/z/hQMliF5/IxS/6NoG7EtPVCW2wbF0olv8pW1nuB9fxmt9RjokjbYUjNIAkB1n2N+LvOzrlQXMCnY0xl4MJ5cvqhyciV3FSSOfNtaAKD83HEgld0IYYj2jK8NdTC4ns/7SwP+i9K/c9qoSiT2YaGGPdgP/5B/MLE27K0aiU4cmBMlLK6u0pFu8hZvFUBWhhBZJBg4deHw3Lws6YerL+DKonxS6rAClufsNQETTHvTkurxvzTOvB3l59/hP0gQdXb+zX7oR8TdW7B+4MJ5TsU0BvbZAXJYypL50kk5iNEvaJWsclnzj5bJX5D+rwqVK3Ic8Vqi+Y7l/QA== 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=M9icqqq6gOnUjbija4Vs9MCWkqfX4oCnxW6yDk2+msY=; b=x2iENei+LAwxQ7WftkfioT/jOZVr5/OiOvHB4OkZ0ltZl7r61PFu/vXHrXeDcgSsFaI2fvUrQCLHLc/+BRzwl3s2zJVodCBFnWTfoykt5+DaMi0VmmcQUwOV/fTGercN0rJm9cemRG4l1ExYy85Rq3rWWYAI+tupmyB71YUjF/NwtqnFKgxQMWb3omU2VuXnBA0XEGBd/wnDWHHJswkL6mBYelH+7QZxli3FkkB0wcFRvojs8pOuY7YxN1SeYypZ9PKHbZ3xxDLwZ9+78GPX+TRt5e4iydtuJ+2QLIQJA4pVx+W6yP67HIwUW0WSj25VA9tCy78rdpwNKob0j2aLaQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M9icqqq6gOnUjbija4Vs9MCWkqfX4oCnxW6yDk2+msY=; b=NrqWzQh7EDk9fgWy9Yo7rch/IGY6/KmdGuoIknjTHyKCYlMoBGXNOCsUZU0IvynNy4ORFMB+Oq8IJpO/7O7SbQunZuKJJ4hvAFIK096ToDQ9gfeNpHQIiCqCm7JH8TSVmMcqpxfD0cQVEhZ/EWWJ5iMEdXO741cUQ1cRYbp6/o0= Received: from BL0PR02CA0054.namprd02.prod.outlook.com (2603:10b6:207:3d::31) by IA1PR12MB9064.namprd12.prod.outlook.com (2603:10b6:208:3a8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.20; Mon, 7 Oct 2024 08:53:51 +0000 Received: from BN2PEPF00004FC0.namprd04.prod.outlook.com (2603:10b6:207:3d:cafe::c3) by BL0PR02CA0054.outlook.office365.com (2603:10b6:207:3d::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.20 via Frontend Transport; Mon, 7 Oct 2024 08:53:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF00004FC0.mail.protection.outlook.com (10.167.243.186) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8048.13 via Frontend Transport; Mon, 7 Oct 2024 08:53:50 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 7 Oct 2024 03:53:46 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH 2/3] ASoC: amd: acp: fix for cpu dai index logic Date: Mon, 7 Oct 2024 14:23:20 +0530 Message-ID: <20241007085321.3991149-3-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241007085321.3991149-1-Vijendar.Mukunda@amd.com> References: <20241007085321.3991149-1-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF00004FC0:EE_|IA1PR12MB9064:EE_ X-MS-Office365-Filtering-Correlation-Id: 1be99b92-8acb-42ff-26c8-08dce6ad908a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|1800799024|376014|36860700013; X-Microsoft-Antispam-Message-Info: lWUBHodxu9gIm6ut9vc0TnmP0kfLbLFQ9+GhCptAwC+W22KmPNF3qfAkiBew0+NnNAoLpzyOV6zebLhQLVWVGHII9NU594r8FrJg3dZs7KxlnlU9XInorDAxkJghpU+Q9dgzUHnvltj9oEyiNdNaRNBdNdazdf06i4598VJi/CKya5r55aRyR38CieuD+LNZyMc1uBUH7rJGbQb7P6phuRautPhNywMU1TuEGKac7uV71gHyIyMs+ybX8RWYw1GvP7dDw+ECX/JvDEdVKSKYiMYvRDzuwUvhERRrb20sVLW2iXnzwfdXFu/AxKxfVjEklKQkG9K1L2MRF0vohCVE35x4glqtvc61E60IC2Z6g13FJ6ADbJ+Op7Kv6y/rsJQmOnAj5jRBNJqKj1w2R3ykgJ8aEchI7I9mSpdhpDeuyTq/w8kBP9qQ0JXthti1tHfCtaEM4ynJU/d/koRCduporAiXRjdh1pZ7hepXA3wBnc363lOLjDRDpBPOVq4c3zpJV/Ha9qN/0lYa257IG0yrmuMw+iU/yS1MoGf8r8Oj6jTB7sQ27oAvSJ28YmVs/+P1CEjhzlKwD9j5Nf4uAEoRn90nR12wQiQOh/bjeowf2n1G4hhK/dx829ybtWO9xUGRgfaBUFnkIx2R+OvJZMNa5q4hql756YUbH15P9ra5WpdhML0HcrO/UitF3XH5FwWNjrGmDBbsjfMHA2OLX3m6luogfeojn5W/c2PS0ToE1GitmirvNJ2w+R75gLNM4I4u4ts2zAULs3aqtxfeUEPXqgl0/qULLqoaaQi7c83MXFKWT+swrU0UIiF/r6ekQUcRF1TOF/CFBsgAOeG3xr7dnbMNCp7DkBAULrtFnDSJyQp7M+QqtYoX/VrdJoKwPcFVNaGkRiptEEEA4OuJnQJrxKwDxpRki+L//ciMWf2hvMOFZVoiJQ7G/cEDh0PIXHJfFSfYPiAFYbw+A3qxhsIAiotAzVQ9imLkFdTwKcRCrTsZSJAyk1dkaCvAAMHBldHgqG+Iy+uIK/WW9sISPmF4O80UVYeFYSV7oU/mD9740tMkJcZ4xWQPWO4Y+CEdc/F8edSA3LnrR6jJ4MWoi1Yj8vGdjyTLtwhy/bjVb+6an4uravO0Xz5C5UWJBndNnxEHo5UFh9hNe+8OS/OGYfu5pvGtOXTAQ6SMehy2uvu6HEAj91u325p5EuHpGP00PAW96/afxvFxMtyotNAZheKrzy3H1cKve/8Uj59fOu5xoKF7pHxzx5vhVqFjEW1dj/0CDwJS5yRJWltiaaNhfB2e9KEu7Ui71yG2qSxbRBSCo8JHeH9Jhdaz1mtyAWybaL7yiB1tsX+ZMI7DR4SNlMqslpfeqO6Vju7JavMUORVuGhp1eS1ENCP80fPbGJ/40mxE X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(82310400026)(1800799024)(376014)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2024 08:53:50.7690 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1be99b92-8acb-42ff-26c8-08dce6ad908a X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF00004FC0.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB9064 Message-ID-Hash: X7OWCLL7TIOQONTTILNP3K3JWA6FQVWT X-Message-ID-Hash: X7OWCLL7TIOQONTTILNP3K3JWA6FQVWT X-MailFrom: Vijendar.Mukunda@amd.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: Multi link aggregation is not supported for acp6.3 platform. Below combinations are supported. - one sdw BE DAI <---> one-cpu DAI <---> one-codec DAI - one sdw BE DAI <---> one-cpu DAI <---> multi-codec DAIs As Single cpu dai is going to be created, In create_sdw_dailink() function cpu dai index won't be incremented. Refactor cpu dai index logic to fix below smatch static checker warning. sound/soc/amd/acp/acp-sdw-sof-mach.c:157 create_sdw_dailink() warn: iterator 'i' not incremented. Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/a201e871-375e-43eb-960d-5c048956c2ff@amd.com/T/ Fixes: 6d8348ddc56e ("ASoC: amd: acp: refactor SoundWire machine driver code") Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-sdw-sof-mach.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/soc/amd/acp/acp-sdw-sof-mach.c b/sound/soc/amd/acp/acp-sdw-sof-mach.c index acab2675d1f5..3be401c72270 100644 --- a/sound/soc/amd/acp/acp-sdw-sof-mach.c +++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c @@ -154,7 +154,7 @@ static int create_sdw_dailink(struct snd_soc_card *card, int num_cpus = hweight32(sof_dai->link_mask[stream]); int num_codecs = sof_dai->num_devs[stream]; int playback, capture; - int i = 0, j = 0; + int j = 0; char *name; if (!sof_dai->num_devs[stream]) @@ -213,14 +213,14 @@ static int create_sdw_dailink(struct snd_soc_card *card, int link_num = ffs(sof_end->link_mask) - 1; - cpus[i].dai_name = devm_kasprintf(dev, GFP_KERNEL, - "SDW%d Pin%d", - link_num, cpu_pin_id); - dev_dbg(dev, "cpu[%d].dai_name:%s\n", i, cpus[i].dai_name); - if (!cpus[i].dai_name) + cpus->dai_name = devm_kasprintf(dev, GFP_KERNEL, + "SDW%d Pin%d", + link_num, cpu_pin_id); + dev_dbg(dev, "cpu->dai_name:%s\n", cpus->dai_name); + if (!cpus->dai_name) return -ENOMEM; - codec_maps[j].cpu = i; + codec_maps[j].cpu = 0; codec_maps[j].codec = j; codecs[j].name = sof_end->codec_name; From patchwork Mon Oct 7 08:53:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 834005 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 A6100CFB440 for ; Mon, 7 Oct 2024 08:55:23 +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 779AFB6A; Mon, 7 Oct 2024 10:55:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 779AFB6A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1728291321; bh=mm8/IwTATCAwNz4prSgj7ZjPYJo+T9KM083PDT3mE2Y=; 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=YWcHc8j++oX0RsIrpncNc4MTVPxG+oXl8pjfE5pAq/hRZCV8sLvJ63A0LE0FE/Fdj 0RCeXQ6SmVuZV7hWVFKxc0C2DpJ0nD8Vi3fBk5ac3INfrO3Cy3K0W7cfm9LrgpKj2I pb9Z52ZK1eGAf4uen9qrSMsjrYKjzdoty/4VsIGE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1B9A2F80614; Mon, 7 Oct 2024 10:54:23 +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 E56E8F8060F; Mon, 7 Oct 2024 10:54:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 747E1F805B4; Mon, 7 Oct 2024 10:54:08 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2061c.outbound.protection.outlook.com [IPv6:2a01:111:f403:2416::61c]) (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 690F2F80527 for ; Mon, 7 Oct 2024 10:54:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 690F2F80527 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=Vw6ggAli ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eQXL/z9/6mAHRzEmgGyOOKhDd6Y4Y0eEtRpXbSBOpvLOEnUaYp8YCUm1pejTR7U9VbvsP5m5vV34zoqQbs9+Ubfof/X3kP4om/EPDd/XuIrIV/Dhp0qKpt0KiU0RUEt7JOYwF8t9wmuaVCJIEbgHEbxO4v1GIwBH9TdYQUihPhXCXIMNnUHJKZwZgFOhhxdbsIBGuhdORDmbo1xb0cHDF7lnmtiHrP2yPUF7Kd2Ds2PkNT1rSfnqASbqmKUWQGuZgO3otpvT5ZG7SGAYD+3J3NRuF51FBE0BKjheGS5c7pehTv7g42He+u5FkUMTgCVdDfyMvXUw4zMdIhPzwF3BVQ== 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=JGoU34SRobXPbWo+HmnwiIPTl2+Kdedz6q74T+I7PbQ=; b=ZUrP/tyDrUectb6IVt9t5kDUkcl0eDybxnS9D+UgBIkZjaduRF+RWNJxBz/ucMb06SRqz5p4ucDMENFgkTtkR3uQ5JrdqAIJ72ToVJn/vmqIi6KsB+xmDNAR1Z8D9tWmEL0mV4JBOl+RzNHTE5gq5pDVOBh9oDCxJn6ACSGaVaPKW4BBJkiEMdLVDY0xZbGR3zQg9vw5QIUmPjWrP1IW90hjZ1hLFFFZxFwleeeyF6RrZO/HwqyeNU1uW7wXLwB/5u6jTMD6LqLpBR4VPciqL/pN5HLzSLYajqps8CXJM6wqS8URIpMauSVZDZwLcb+k2YLmaRO1ec1EZoW/kfeQ8w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JGoU34SRobXPbWo+HmnwiIPTl2+Kdedz6q74T+I7PbQ=; b=Vw6ggAliDIKdaQrAWpFiLNQEpOz3g3kDDAyU9z2HZOFKowaXMuE96qY3EL8pQz6ZubS7zFoQYjgIBaJahahBRyFwSIgAWUNTp6fjJXDrLEpVU8yVw0ixGY0/y8fcOhw7o2NfFqPhGxizN4f/CmilNyHKHD3lXdq0OV5D6fmOhCs= Received: from BL1PR13CA0027.namprd13.prod.outlook.com (2603:10b6:208:256::32) by SN7PR12MB8025.namprd12.prod.outlook.com (2603:10b6:806:340::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.22; Mon, 7 Oct 2024 08:53:55 +0000 Received: from BN2PEPF00004FBB.namprd04.prod.outlook.com (2603:10b6:208:256:cafe::64) by BL1PR13CA0027.outlook.office365.com (2603:10b6:208:256::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.16 via Frontend Transport; Mon, 7 Oct 2024 08:53:54 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN2PEPF00004FBB.mail.protection.outlook.com (10.167.243.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8048.13 via Frontend Transport; Mon, 7 Oct 2024 08:53:54 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 7 Oct 2024 03:53:50 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH 3/3] ASoC: amd: acp: refactor sof_card_dai_links_create() function Date: Mon, 7 Oct 2024 14:23:21 +0530 Message-ID: <20241007085321.3991149-4-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241007085321.3991149-1-Vijendar.Mukunda@amd.com> References: <20241007085321.3991149-1-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF00004FBB:EE_|SN7PR12MB8025:EE_ X-MS-Office365-Filtering-Correlation-Id: ac31f9f0-d22e-4a8e-337e-08dce6ad92f7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: 6IBFNeBrMEKVepfgSNsrMv3VDzTEUiYVNOc8mhRekmyajsZpOMCnEwW+85xutP1/DyG+RqP1IPMhJNhb5zNUNI+ZowQFgYKimZe4JLGc6DXCNG//u/puR63xhKjMB2lxXbrrp344Q7Xv5os64k24QISxMwMnZ11znRgYth7riLw069/0dAgtn2ZHhmKzG35oK0sFpjyAU6AVtkJ0fwl7b3hxjVT7N1dKM6Hx0vnWvqNDac2LXZJujGgXIAbQ1QWxkJGU2Fu0so+RJodPNUgO117gm23b6I2tALIQZUNkSQvl1RdsaAiHUxmOEUwV1Rjr77AbF7Ocg9j4carD1w7cILGDab/ehGOUPGf28n9G5vw1/y2gd7CjjGUVm0dt3KaIACsYkrLClvyYsN3fRwSaxzf36ljbaRAa6zxvCiqV2UvR6d6aZBguaUQNB/OjU4kLdBgzLbdfSK1s4gXngJCOI6zzVzOFXmPJw61IbiB0Jxw3uAW3BqT8lfiO4dFZZpcqAoBIuQEOuGU3BrSGP1hNi8WtrBwKeqm8peUaxs01ruHGJbIBLbEFwuJi93Vg/E18lfAhpaee82qVMYHckPH6VmiY6j6r/yRB5TWUS7zqsxOIsxlzZGFFB/poDqNL2P3612QzF0XCKqA0b9xLrUclsJTBRAltwCinzBhKq+8f/dwGKJxYd+dBqXJZ1vmEFfrLPMMgkD6Q7jiWkDaA7xA10VMK6Riyxb2ZZt8T97q8dpCM/6JlGt61D4HN0RLnUx9lOWtIi9JPnx5fuLI/BgTi5Ejl9uNNPGyS9a9V5JKxtPCILDExy5XV0Hi16VxNBL7E8T5SpAyidlZLJzi+U2lfcYS8NQma9ON1baLwD3VC9B5+LpwWBPk771jb88bhK0gxSW4r+bFJmO1yogBQXCJ8CSjzjxp9GwyJGhwu/Ua1siwZJ+2YVZ+RljF+3EJSjXhD6Og28u/bOZJ9xGk1WUoAEQWozJYVIR2LOkQHIuHxlVHaj2Fuk+UC4gZuKTRDZqstXdVMR7F8d/B2T+sK/nukd1jBZ3MkOwm/Lxf6K3hNnOceuSjaBuAoro5ugsnrAZmoemWJz0mciiVOoxT4vpHcgyhz4OxyP7imid3TrH3p26CosZ9dgPqwOvwczgSfQoCgkIhpZxuAYVgPngqcLSx8vlqMo0Fa6BImIxYTaNi2GR10Q0U2Ezpc79aAoKdGZI3jciqbF6BQuugUjEKuvp42kl3+Feac/TmjFHKcwgoK48MXbNSZkx416qmHLVlQDmnHZq1IzzvPWV8Hn1mxHEqZCZN7g1RfjA//Fo2JPDXYfhpfPh+UNiRz2396JdNIojzffyZ+0MQu14nmcvtu1qBitCYEojfcpy45uCVigeGoX0Ajz0StR7NTIJLht0p8gXx2 X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(376014)(82310400026)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2024 08:53:54.8078 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ac31f9f0-d22e-4a8e-337e-08dce6ad92f7 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF00004FBB.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB8025 Message-ID-Hash: OYI2TMXM2TMFONT5WSOFNLHQHEV7LLNR X-Message-ID-Hash: OYI2TMXM2TMFONT5WSOFNLHQHEV7LLNR X-MailFrom: Vijendar.Mukunda@amd.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: Refactor sof_card_dai_links_create() function by replacing 'sof_ends' and 'sof_dais' structure declarations as struct asoc_sdw_endpoint *sof_ends __free(kfree) = NULL; struct asoc_sdw_dailink *sof_dais __free(kfree) = NULL; Use above declarations to eliminate goto statements usage. Suggested-by: Dan Carpenter Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-sdw-sof-mach.c | 33 ++++++++++------------------ 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/sound/soc/amd/acp/acp-sdw-sof-mach.c b/sound/soc/amd/acp/acp-sdw-sof-mach.c index 3be401c72270..36e6d6db90c1 100644 --- a/sound/soc/amd/acp/acp-sdw-sof-mach.c +++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c @@ -311,9 +311,9 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) int sdw_be_num = 0, dmic_num = 0; struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); struct snd_soc_acpi_mach_params *mach_params = &mach->mach_params; + struct asoc_sdw_endpoint *sof_ends __free(kfree) = NULL; + struct asoc_sdw_dailink *sof_dais __free(kfree) = NULL; struct snd_soc_codec_conf *codec_conf; - struct asoc_sdw_endpoint *sof_ends; - struct asoc_sdw_dailink *sof_dais; struct snd_soc_dai_link *dai_links; int num_devs = 0; int num_ends = 0; @@ -334,14 +334,12 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) /* One per endpoint, ie. each DAI on each codec/amp */ sof_ends = kcalloc(num_ends, sizeof(*sof_ends), GFP_KERNEL); - if (!sof_ends) { - ret = -ENOMEM; - goto err_dai; - } + if (!sof_ends) + return -ENOMEM; ret = asoc_sdw_parse_sdw_endpoints(card, sof_dais, sof_ends, &num_devs); if (ret < 0) - goto err_end; + return ret; sdw_be_num = ret; @@ -352,18 +350,14 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) dev_dbg(dev, "sdw %d, dmic %d", sdw_be_num, dmic_num); codec_conf = devm_kcalloc(dev, num_devs, sizeof(*codec_conf), GFP_KERNEL); - if (!codec_conf) { - ret = -ENOMEM; - goto err_end; - } + if (!codec_conf) + return -ENOMEM; /* allocate BE dailinks */ num_links = sdw_be_num + dmic_num; dai_links = devm_kcalloc(dev, num_links, sizeof(*dai_links), GFP_KERNEL); - if (!dai_links) { - ret = -ENOMEM; - goto err_end; - } + if (!dai_links) + return -ENOMEM; card->codec_conf = codec_conf; card->num_configs = num_devs; @@ -375,7 +369,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) ret = create_sdw_dailinks(card, &dai_links, &be_id, sof_dais, &codec_conf); if (ret) - goto err_end; + return ret; } /* dmic */ @@ -385,18 +379,13 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) } else { ret = create_dmic_dailinks(card, &dai_links, &be_id); if (ret) - goto err_end; + return ret; } } WARN_ON(codec_conf != card->codec_conf + card->num_configs); WARN_ON(dai_links != card->dai_link + card->num_links); -err_end: - kfree(sof_ends); -err_dai: - kfree(sof_dais); - return ret; }