From nobody Mon Feb 9 16:38:30 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 2212F34CFCF for ; Wed, 3 Dec 2025 16:12:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764778377; cv=none; b=uokcHTBjdsIoM2RbC61VICT6nT0BeuFl5kYJ54fggkNkIU4JYr+KsSnhcaJRK+0BChXpuf7hoitQ0AG9l4l52qhlTCDe6Kv7jF4F4zlFMhaWdnx+fwyAcaMoRSVdjbuxVq8rCkgCVddUe2z/G4A0K/Pl03EYIHG39rvTobGDjIY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764778377; c=relaxed/simple; bh=543uZbtWiMVGOhMt1EFi6MWdkGU4JZJce/ZXu+LOHz4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pZi58Ial6fswZV17UYStkcIv8fW3Gn6u+onHgq05qyVmjvhg+gfFG1jVPKWg7rhJBHA02Wovazg9Cb4f5oY5+5P9TM1GCy75cWHYvH3tuOrRPn+QSQhtS9ZKpknPOskI3/DXG5zQXmz9tcC/oSdKuR+8MrAzAdsIIB05tP+28uc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=guHAPy12; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=TvJBKjhk; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="guHAPy12"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="TvJBKjhk" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5B3Ds5He1904815 for ; Wed, 3 Dec 2025 16:12:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= NqQszyJu9Cnrc6QCnRzCmahKIVnEK44SZYk5kehv1Xk=; b=guHAPy12PijowAkc m7HaFIsf0gpgPFyFt8gth1OZ8lHJl9RtTP1avZ+FEXzYr5de6c4pHDBrc8DV/whl cWKzif7d5BMH7KBFErCEfeQUChdWcC+BuRe94iB7NxrWt8h57NnyI+13ay8uCoCI ciV011fcZKMtKWHRS7QTTp1LOo3MwacfYwfW65KOPoRC8mWzqGKK6nSEyf9WqiiO SbPbPAYp/cQw36Yq5zg/XhlSliXSV5oEhx0DiAI/j0FbhmhoD+Oy7PL//ve1esp7 AECxSa8yGjzN9ywU89LsBhIedQH4W6pAgkEUe+s3rf1aKS17b++o+HcfYsu7xKJg ocSCCg== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4atgx3hk32-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 03 Dec 2025 16:12:54 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-8b2e235d4d2so1087798385a.3 for ; Wed, 03 Dec 2025 08:12:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764778374; x=1765383174; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=NqQszyJu9Cnrc6QCnRzCmahKIVnEK44SZYk5kehv1Xk=; b=TvJBKjhkBPSSn2OpMztRQMLc9mnRFmtVgv2owSPnW/ce6EcErjRzf2bAg5GzseDdaN d80RZSOEqdLMcQP+37oLLQs/AZCXGdYQbkvp9n5Pfp0CscEeKkwEm/7r5/GNrRoQQQC0 8SCLxICJ6NwOuMjYxSb0roHrGdZWTHFY4dvrXBAXOGac0dtZhTO4axuAw3iOrVr+4f4n ERADD7TLoYE7dGH/0zzxAajGO2fcrh7pCsx1BE44qvedCgxkPEl4wnrIHXepUB0bSqFQ mck2hPhMvKv+4AbOA1fmdnj22Bpn1YLgOcm2BagQy+30KKY0LIZXBR2jPFSbfJu0R4sA ORbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764778374; x=1765383174; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=NqQszyJu9Cnrc6QCnRzCmahKIVnEK44SZYk5kehv1Xk=; b=Hs2Z3eeFJ40uWkw1/tWiFEkYTRFA6dEf+bxUjgUy6qNgPujyZt9rXIKG618zs7ZJ/T Sv1+ecEAmzirNLjYRmmRw13D1SqTQTD252S3OUjgUpcOVcGKlRvaeFOeGc4MV/0JAPsj ggX0t+hADJlCVXwlnZIGpihv3HFYNTPWEr9N6+rcUBOtlVXDebae9ErBlNpfiTIf2SFk iNZB3t/Dq42AdnsAjgVNbq6aJ2cDaIPSdPxeWkAtF2pWiAho305e4gVUooHlkIzMRp3y xmIlE2oGi1k3iwT0owz496Wli8UGX7D4EN89x5jTyuySaQXdKUzTvQXuGn2+8qZ91yqK kOfA== X-Forwarded-Encrypted: i=1; AJvYcCUhdGsX/VDm0Klh24ewQnphtU42Cj/Q6qb1gmC4i1M/JEkLQsfnYY/wICialB41gMNZg6foHmH42zxWCL8=@vger.kernel.org X-Gm-Message-State: AOJu0YwzPg+5XdZtg0xMSF2ZF2ssvrRWCZpTzZvLZjBVioNr4IvmT1gx DXrmsLaChoiUDZ5tKbNIz0eJE4YRyBmOGoecT0uy6NgxqieqvaQRPkaIrGzHYyH3OjWN6rdLzU8 WaWQxg9X71UfTPurWdBRsviTdq02zGvLk+J38l3x1yeRgp/iVoUmzrowiyZ2ls9fL4w8= X-Gm-Gg: ASbGncs+emNpB1/6yq+rOAJpcCC8apUkoIW2zALRYO4lMbnHaAd9vzHzI52gTb7TyW4 dNUfQZd5u4CmBNrSUs7HPEpyXce8pbZeo18yD79UrXqDCchWKJlmOTbGBgVJgslMu9NVfqPdTja WrQ+mc6kePI/qiFs2xZNbOMX+FjUb0T4w9lXeGCRslBs2kg20j6IJiFjJRthe8hdyW7hrX5oOAR wgXISArhaTXJdSlRhHlNWlP/+8qPOXoOQuh+dYBgOd/RQYg4DitI0MpRjCOIL33KwBcuCL9nRQz MhytVVOJr5Lv69j2vs1rV+/WizhZ6/iisEWWsGK0ye4W5iSk29TVIsnrDq959NkK3HMyuMm26Kr TFEkN4sP3ymeb3Nlvs9taSNnMTfokh4HdRg== X-Received: by 2002:a05:620a:2902:b0:8b5:5a02:8658 with SMTP id af79cd13be357-8b5e6a923c9mr375913385a.55.1764778374419; Wed, 03 Dec 2025 08:12:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IFbE2KBuawB4wi3v4A5xeU22zVmkxn5Wqy2t+Sz9WHgOn7UoHqiKV0A015/doABPqTp0AFP7Q== X-Received: by 2002:a05:620a:2902:b0:8b5:5a02:8658 with SMTP id af79cd13be357-8b5e6a923c9mr375869785a.55.1764778370225; Wed, 03 Dec 2025 08:12:50 -0800 (PST) Received: from [127.0.1.1] ([178.197.195.159]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4792b021cd2sm23688295e9.1.2025.12.03.08.12.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Dec 2025 08:12:49 -0800 (PST) From: Krzysztof Kozlowski Date: Wed, 03 Dec 2025 17:12:38 +0100 Subject: [PATCH 1/3] ASoC: amd: acp-sdw-legacy: Fix confusing cleanup.h syntax Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251203-asoc-wrong-cleanup-h-continued-v1-1-5142be4874fb@oss.qualcomm.com> References: <20251203-asoc-wrong-cleanup-h-continued-v1-0-5142be4874fb@oss.qualcomm.com> In-Reply-To: <20251203-asoc-wrong-cleanup-h-continued-v1-0-5142be4874fb@oss.qualcomm.com> To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Charles Keepax , Maciej Strozek , Bard Liao , Pierre-Louis Bossart Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, Krzysztof Kozlowski X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2259; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=543uZbtWiMVGOhMt1EFi6MWdkGU4JZJce/ZXu+LOHz4=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBpMGF7V+fZNI1QJO2gwVsb7vCTymR9t/liRPCi5 jOqK2JyBPCJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaTBhewAKCRDBN2bmhouD 14uGD/oCuy3no9CwhtWLNdxkneQFWwU/U/5/0WY6HMB7rhhzDIr9ns5dkWzQnk9rduYT4gEVDll v8zwvZzkq5vZptnxQzmNAWLTDQoJFB2Dc62rqVVm/dEQ2908FCX94e3UuvtZLD/d3HSrinzEwi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 0TT9G70Wtp2UQ27zKMbaV0YKppc4LA== X-Proofpoint-GUID: Yi8P91WC7X1XZp2ZqPfHTDS_IIwcJTBi X-Proofpoint-ORIG-GUID: Yi8P91WC7X1XZp2ZqPfHTDS_IIwcJTBi X-Authority-Analysis: v=2.4 cv=R/QO2NRX c=1 sm=1 tr=0 ts=69306186 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=FPK7cjBCgYbqzSTDLBmM0Q==:17 a=IkcTkHD0fZMA:10 a=wP3pNCr1ah4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=ibVJ-gTn2yuHLo6HpAsA:9 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-12-03_02,2025-11-27_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 adultscore=0 phishscore=0 clxscore=1015 impostorscore=0 spamscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512030128 Initializing automatic __free variables to NULL without need (e.g. branches with different allocations), followed by actual allocation is in contrary to explicit coding rules guiding cleanup.h: "Given that the "__free(...) =3D NULL" pattern for variables defined at the top of the function poses this potential interdependency problem the recommendation is to always define and assign variables in one statement and not group variable definitions at the top of the function when __free() is used." Code does not have a bug, but is less readable and uses discouraged coding practice, so fix that by moving declaration to the place of assignment. Signed-off-by: Krzysztof Kozlowski --- sound/soc/amd/acp/acp-sdw-legacy-mach.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/amd/acp/acp-sdw-legacy-mach.c b/sound/soc/amd/acp/ac= p-sdw-legacy-mach.c index fae94b9edd5a..9cb55d592c3c 100644 --- a/sound/soc/amd/acp/acp-sdw-legacy-mach.c +++ b/sound/soc/amd/acp/acp-sdw-legacy-mach.c @@ -358,8 +358,6 @@ static int soc_card_dai_links_create(struct snd_soc_car= d *card) int sdw_be_num =3D 0, dmic_num =3D 0; struct asoc_sdw_mc_private *ctx =3D snd_soc_card_get_drvdata(card); struct snd_soc_acpi_mach_params *mach_params =3D &mach->mach_params; - struct asoc_sdw_endpoint *soc_ends __free(kfree) =3D NULL; - struct asoc_sdw_dailink *soc_dais __free(kfree) =3D NULL; struct snd_soc_aux_dev *soc_aux; struct snd_soc_codec_conf *codec_conf; struct snd_soc_dai_link *dai_links; @@ -380,12 +378,14 @@ static int soc_card_dai_links_create(struct snd_soc_c= ard *card) num_confs =3D num_ends; =20 /* One per DAI link, worst case is a DAI link for every endpoint */ - soc_dais =3D kcalloc(num_ends, sizeof(*soc_dais), GFP_KERNEL); + struct asoc_sdw_dailink *soc_dais __free(kfree) =3D + kcalloc(num_ends, sizeof(*soc_dais), GFP_KERNEL); if (!soc_dais) return -ENOMEM; =20 /* One per endpoint, ie. each DAI on each codec/amp */ - soc_ends =3D kcalloc(num_ends, sizeof(*soc_ends), GFP_KERNEL); + struct asoc_sdw_endpoint *soc_ends __free(kfree) =3D + kcalloc(num_ends, sizeof(*soc_ends), GFP_KERNEL); if (!soc_ends) return -ENOMEM; =20 --=20 2.51.0