From nobody Fri Dec 19 20:36:33 2025 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/d3HSrinzEwiv EAtaWyTl0BLtga9mhojWYraTNaB7x4M1vy668+Ss4GPRtFJZq6t97EsLt+zkXODGyHdvtNpW6Uz Hk8Sc8Liwy9H1jSXu5UtLn7JVAhJVSiEGJf2b86joCrcd2Jnh1+gD0fP2yBAku+4hQ/XwRZndTC TJWkGLSunEcBSvs1h8PyMQ/BmXfVCmjajHVOGefms9hh8FWeV1+fL0q/Tr0UtGDRFmEtWcrMKbo E0eiU6NGUsx0CEQSxb6I2/VbeVUbhKpS+xfHbnMpHFG1GxK2rmIKkMFaVongaV9aHGD3hgII2Zn ewUu29T/yzJKKg8YH0wpkUP7iC0rCua+MFKsB6IeHub1nmnq2X8ZN2lOIJeMdLRj02kC2TtFfE/ zb6mCxpsfWcGfDMaqrGWTyYcCeMFGR6p/ni93l34mPPTDOH0oHVYs9OnIOjC+1N6nXAA1IKIFsq SgVgAmBAaJ3ezVv0UFWDDclajO6c7LgHOCaKqrmIVyixbmQTi4XzOIF1kNYpyHzVcQBbCjIHlCz T0vaJ93raYakneQ== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjAzMDEyOCBTYWx0ZWRfX0zrI/8Gwpp+H kog9+cB22Aa67/PgADVpLmehTyFKOTjDm9zYS9Pg3dZuB3ezW9tlkhzh3U97Ah1t5bVAPceL8Rw 3ncmOGwncuHQjO/WzPwb4fF+9afvT7Ztsa2HhD/SBxs3QqIJ33Q14hNvMoZv91h820ImUniTFox g/V1j0ZKJHs/T+eD4MGf6Lt0DERutVH+0VLzS8Cck6JmQ76lmyWcC9N7mkCF04YNRolrmL9QIrM 17B9hA12Z2ZRiNfDP4wRa8akb0HV02yFjK6lSyJcLJJxJ0Dz7nyqpyzUmFTD5GsJB4WuxExX0Ex y5ASM6JRafFY7fgftgoCmeunLBnQMAjLBRbsyrxKbq6sHa2iWfgYGKwpONmDNM4fKslFkqnSWO+ 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 From nobody Fri Dec 19 20:36:33 2025 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 D996034D381 for ; Wed, 3 Dec 2025 16:12:57 +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=1764778379; cv=none; b=G8PQgi098r135mqEF5F5qPl8NCLau4ACOI28P+CQCGV9v2yyJrKo6yTbPrswCRKo1HFxox2iTT+RpPW28RSxuhrQHoa5Sgn/RTQtdnSE5qDfKIyKX5QUTxfLXAKgICbSupzqhxFmcntaYhw0iEcgR+nPG3VZJmtl0NqwRKVmxRk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764778379; c=relaxed/simple; bh=8vLELv6iEJw4HQAetXguIPG9JhI9/hFFJQ4g3Jr7e+E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tNIduf4K1xN2tVeXYDcSx8VH5pFdl6ekGUnS17Wgy7WdX/JKxLRu0Cx55mHWPuIyeEKMvC/vXmut9F7tXG6Vn9eHwpMr5AK5Su6TLn7I41/2XbiXNHeRXblb8KxeTAtMQRAj9r8ExzZzRcfsztypyLTZWGsxCx7dW2OKwq+4b3Y= 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=bFNa4CVq; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=XX68fA+b; 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="bFNa4CVq"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="XX68fA+b" 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 5B3ECrv71904384 for ; Wed, 3 Dec 2025 16:12:56 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= 35fZq0L69H3uQ9aWFEbF/Zr1Rt22YIPmZ+q/BTCJbn0=; b=bFNa4CVqVj6tKR46 M+BoNWqrhNMouPwUVboFCVRaKQ4bLO3B8b/G0PhYU/chjX4//ey/JquE32KCiepa DcauSe6ehk98w7YKA85KrgcDlkaDE4gpzvTiAtDj77DfjHK5UxcWT/ZQejerSXuw q7uS5T8TFbnVeLljXqrHisMTXMPcj0mYuQLo+hbGcbMvHnVbXaxtYjLI/fvW3Cl8 95X8HoyZKR2R9k9bJDxre6W18ujdkb3+aNQpsyE6srGU6MeJNZHMOpRrX8D7BWj/ vs0ihhXPcPGbprk7Nc63WLCY1tPplmJ+R4kP2X5+W0LWjzSHp5EU2m62xyeans8D oN/oLA== 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 4atgx3hk39-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 03 Dec 2025 16:12:56 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-8b225760181so842997185a.2 for ; Wed, 03 Dec 2025 08:12:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764778376; x=1765383176; 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=35fZq0L69H3uQ9aWFEbF/Zr1Rt22YIPmZ+q/BTCJbn0=; b=XX68fA+blNPAalO+bc1JokESpel4tOmfgIsd4CRnufPo9SdMOB2up46elSrLTd+DJC VE7RgiucSAycRCOe5a5zEXCQTpCMbGXMjbCswRqU4EVb29Y2FExctC/x5pq8KGev6AM3 W2P35QuOh6NlumHk82AXgAXCP4iZKwpfNtjuxkvLC8KHRCNxSD05lQkYGhbpMIBclb14 +u3AVfDKV398ORh2OYrwbteEeSaA+O5l0B0nJRg9ARvHNGPYEx1IIRs9aYsz22hSPoKR 3BHiil/5Rpd6AlDO9OuUaEMN4V1VYtTrx8FKqKByJdMcp/AShMhcW5Gpr0/GBI4kphxW 3jIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764778376; x=1765383176; 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=35fZq0L69H3uQ9aWFEbF/Zr1Rt22YIPmZ+q/BTCJbn0=; b=mGzQjXGbflyXXom23FghQhmaKuvo8juwUxJSObMAIUGTZnenevaiF/PGD1AWHFj8bW OstAFUr5Y8DMWndlDLEzg2d+VRSTloqs7XoplUMYwXfoTBRa9WPNuR5Q/NuLAVnpSZl3 qF5jqubwz52LtsCn0Rfet6a/GRRJfYBVmz/I6lIF/MVdr04eDNfY38aY0LAyLTpFcuD1 T9u1fab8UNUxP1god56CDIrkRT0DczY1jPR3uqMNsP0dzDVLoOoGIloYjRdfKLja/GpZ PAabE+vkPhmlT7z14chafPnMovdnwpXefgv4w3o/6vWqWYzSgbQehHmKckOpi0PV53fG h6Iw== X-Forwarded-Encrypted: i=1; AJvYcCU8d8ut0lBCIqEj2/xvflU47HW6FIi1rwmc+3wra4qMrUPmpE6tsfrK4ny5239AOgTYyLd+/Kg0uLgoMI4=@vger.kernel.org X-Gm-Message-State: AOJu0YzfMlJvsjJq1dTkqqE2+El3/E+x63a2Xh8zITxN7/sCucX1/7qy 6q0xJN02scbZzi/MLAdfA4/cRTT4hm+O7PCwDAz5TXbWTsQKwLmec622U56W5OLLh4ddfYPayNf ZLvdBPXPcKUVxNyhocKIFxjuaZQiP0Te4a9o7OyOOI8k5KoLfWnYHLJog6AWSapbbYIU= X-Gm-Gg: ASbGncsSZzlrI+6hghVH5aovNWrJFmx9++DJe8Rew9bY/HimFYiIibyApgo/RitF8ro HV1LFB75HgVKiFCgp1LektPBIGIFuGjSnOgfyiJsMXFPgToREsywTBwKLWZFUXFgdv9ZoMKxeYn dO4xM+znUvEGVzNnBlFPW9u7f9qTYgk1c24MS6oImoh2GaOwjDajr47FwUK+iUNYLSxoSe89bXr btbQmODkiWLScTvF3sPdD6SJfBI1lyyQZKK+XDne2vwRKm91BNaZT4wEPYfVaHEbARNzeGQsLqI +bUjqsAuy4a/pxYRsJN/G0wioyj3tw/LVzAgwF1Q1SdN1tMfYkCdDKCNjvgegrkAk5HDeedapAM On18HF+uuA/Pwi5V1KvSpzERdDGBJXtZ2iQ== X-Received: by 2002:a05:620a:468e:b0:8b2:a4ec:6f5 with SMTP id af79cd13be357-8b5e47cd116mr353816685a.11.1764778376042; Wed, 03 Dec 2025 08:12:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFG4cfQjQIEKj3oL685GCNF60vFdQ+dp9XuJDZh+9Clo7l0D/7i3PzHksj4n7pRHY6q6Y6+Dw== X-Received: by 2002:a05:620a:468e:b0:8b2:a4ec:6f5 with SMTP id af79cd13be357-8b5e47cd116mr353813185a.11.1764778375520; Wed, 03 Dec 2025 08:12:55 -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.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Dec 2025 08:12:54 -0800 (PST) From: Krzysztof Kozlowski Date: Wed, 03 Dec 2025 17:12:39 +0100 Subject: [PATCH 2/3] ASoC: amd: acp-sdw-sof: 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-2-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=2224; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=8vLELv6iEJw4HQAetXguIPG9JhI9/hFFJQ4g3Jr7e+E=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBpMGF8rwJf6F4HnGYCxTIAsD6B/mN7ZkafBO8Io 3uPZi/fSGmJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaTBhfAAKCRDBN2bmhouD 13O8D/wLtDL1Y7runIIGFtzkOlA+CEkZuEA3RauUvgrbJF4p/8FKhG46UA5WnVSY+dofmzPguzv 3JEMpkI9+2OIMe8BW0ylRhPhNPmU2lsnBdzFch4z68sSPrieBo9WYaxnjOE7KiH/TZkdIreTi2b Ez7MQrr3cn/MVlBiRT+9wAUgltXkNPuaskYDy0uAFe1DN8ae6h6+iEMuNfc15ax9AvMM/aPfcYO s8wgqXuyCsQJIKJs5voyDTSKYeAT5Ww0CKF79H8hNkx1tmkQ3PfiKXkaLsSE2N5MOAyfTn1U/Mv 96SK177rnS/1MrueB6Ekxht6MahrFem/9MgFnmgGU0gd3q97+EsmebQlatPLc3v6glu0MHRX41o sWbEKLOSqB223g81Nx2oG52uPyaPmunvVYTJmsKUMMcTVFX46xRDhPDdb+8+bfGG2QApbFlNq6G Qfl7la6Io1fxmf2Ne1jY/vyxypQ1bbJNS30hQp8fbXeVdPZTwMhWWSHqu3Jwt1pyaXfJ1RdyWkW TWs6XLG89oTpyLkKoSiaEpo7AGNe/HEbD8LmpMyJHrV4piYy6h0d35wl89ibs0Abb7KjvKnfcKr /K5q9OMs/DBVuJim/9ayN3/+undx9vfMmYtX9Haf7QjwUZQEPRARuL1ODglBNWq/OVlPHupBtql 7aMRCCcRdbr5Nyw== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjAzMDEyOCBTYWx0ZWRfX2Q1i/tHD7LAe bZosOZ8NL/tnGfxj9mDlT0sexaaSNQJKwd67Y20Jk+aoNsFwAFF0brn179q/UzTar2KVbg1FOU0 kujKsPBeezuUGledwmCGmNMTm4dX6f2iA4IBcKHW+n8r81EDFoy63f1ppEJMPDhubQ+SVPVMHGG LiaQbJkUzzZVX8JOn+N1VEhtQK4++pOMZKvDs6k2igSN/Yuzz+1LHBikRowC8zmtcqZbJXAteA5 C6TrT41X4zq3xAMuvWRGelNArYloJOvxzO0jnj8FhqYCcXhNF7JBvt4WzcMfg3uFrxvbpRQiS0o 3NEjWFtsaKtAT1qdhaclmBFSF1tbEJgHMhw2h4NuCJriSeLeGOPjnswtkB4XvZam7XZ7deiluAy 2KWBwFiAaKHFNQExy6IBfVpIAAYR2A== X-Proofpoint-GUID: WtZ8W3XHGko7UHJBdeV_Arfrsazc1bVX X-Proofpoint-ORIG-GUID: WtZ8W3XHGko7UHJBdeV_Arfrsazc1bVX X-Authority-Analysis: v=2.4 cv=R/QO2NRX c=1 sm=1 tr=0 ts=69306188 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=G7cKtCAg_onYix8Q954A: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-sof-mach.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/amd/acp/acp-sdw-sof-mach.c b/sound/soc/amd/acp/acp-s= dw-sof-mach.c index 5677ae63fca9..da815b3f6389 100644 --- a/sound/soc/amd/acp/acp-sdw-sof-mach.c +++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c @@ -270,8 +270,6 @@ static int sof_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 *sof_ends __free(kfree) =3D NULL; - struct asoc_sdw_dailink *sof_dais __free(kfree) =3D NULL; struct snd_soc_aux_dev *sof_aux; struct snd_soc_codec_conf *codec_conf; struct snd_soc_dai_link *dai_links; @@ -289,12 +287,14 @@ static int sof_card_dai_links_create(struct snd_soc_c= ard *card) } =20 /* One per DAI link, worst case is a DAI link for every endpoint */ - sof_dais =3D kcalloc(num_ends, sizeof(*sof_dais), GFP_KERNEL); + struct asoc_sdw_dailink *sof_dais __free(kfree) =3D + kcalloc(num_ends, sizeof(*sof_dais), GFP_KERNEL); if (!sof_dais) return -ENOMEM; =20 /* One per endpoint, ie. each DAI on each codec/amp */ - sof_ends =3D kcalloc(num_ends, sizeof(*sof_ends), GFP_KERNEL); + struct asoc_sdw_endpoint *sof_ends __free(kfree) =3D + kcalloc(num_ends, sizeof(*sof_ends), GFP_KERNEL); if (!sof_ends) return -ENOMEM; =20 --=20 2.51.0 From nobody Fri Dec 19 20:36:33 2025 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 AE02B34D3B6 for ; Wed, 3 Dec 2025 16:12:59 +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=1764778381; cv=none; b=kmqigAB/0hZFdrF4l2u6I/ZjZthsSYChGSELe8UO0/R53qilP99VZjRisZiVZIa93aivD29mhRNXVv4R2tiqC3iQQxsTRtGVQKcB/6VQihk2hatxcnxCYLZuSjFnuxh0gMYZ5KqJ8Bhx7E/GKR6VvOVipGMIqS/r0X5pB8cJICA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764778381; c=relaxed/simple; bh=q9mFEQZfeT2leld7qV71CIZ5Fa2tn7vOKw3CYO/eH1o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Dn2JZHHLuIHTh+TZ0PiAjT2LhFwlsVCO6zUV0WRM+y7lo0SxFgVUpsuxnG4Aii6135U2n0L7TKcEK1MNF1IAY4Y9Y1+UM2tHgQvQLwSiYO7YPA+zM9S+lD0QUT9FQTspza9rKTI1MVNEA2iH7f++UWk15tYGXLksOPV5Z8jjoVg= 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=o5WpI5Dq; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=hZ9fqF/l; 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="o5WpI5Dq"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="hZ9fqF/l" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5B3GB9f41969508 for ; Wed, 3 Dec 2025 16:12:58 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= 9zetZLsiOGM88I/BZRhofKQK2G+O59uui3APX6JUHZc=; b=o5WpI5DqgzSUgfEo GrOVMI12yfBCjGKpm2AXoOje7RCXHRKCuuo2u0Z/mVx2b2smx5fuqvznMffn/3Ar iDoq3rnCa187nsroOweqYXqirSUAY08eA/RG+i0NjV8lNe4t6M1rUZe6FlVVtANX NBmti77jJMbFUXg2Ln2UBwq7QZTv5vOBYvbj1dLPU/usqwFaTsr4G8hPPPsIaNHt xqG1nxVAeeU/eaZdUrXS7LYQHt65RDLLk2E4jhukElq/Ys2KoXeXLMvf/x8y43K4 irCjfuUsPv61rBlMtYuORaplrTR5138Pb7zwCorXOOcmh/xP2kEhIVxO4gH/sI6o x2BFOA== Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com [209.85.222.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4atjjs17kc-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 03 Dec 2025 16:12:58 +0000 (GMT) Received: by mail-ua1-f69.google.com with SMTP id a1e0cc1a2514c-935205bd329so1081234241.0 for ; Wed, 03 Dec 2025 08:12:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764778378; x=1765383178; 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=9zetZLsiOGM88I/BZRhofKQK2G+O59uui3APX6JUHZc=; b=hZ9fqF/lKHPMI4156llBSMACvLlXH93K0/DvS3q8isZM49D7Hh6y+aGGPRvVJ8R8Hj +H06yWrFLaxUQPOxJBUiyziA0ZGSGXkaYwLaVuc0lq2kSR1CGm5pLs3NH8t9XbBgTXwh 5VNmvvS6XDovRwVcyCWRTfTFkYLqLA09HGR8v1eSbX39TkN4J7uPOiH0nrLleYNTump5 //0Uqlx8yQTRDmbUpJF1teOe4+6XndvwCeCkMjusJmvGsEGgbfs55FLrJeKpfOZGNcSt vywr4jFE9VA3C4Op7nL9AsXzY2r4QEp/chofKYj2rLe0f93elcaic3en1JCo0nc7kIjL 8f6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764778378; x=1765383178; 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=9zetZLsiOGM88I/BZRhofKQK2G+O59uui3APX6JUHZc=; b=V6jaaIgm6siZy22Vs+Pz6vzm+7T9X6v47cQvA6gqPoaZRGyu0Mofwu7rc/DHd5zesW PnNoHENaa8wpSG7KvqY8W/w9Nw8xJoyUwXcluVNBu9Ms0zfglTznB+s3Gdm3UqlqiKVC hCt1xCnnxW2szx517rLuhQPDTEi4ECIWYqVLs4Y5QyKDer/wULRTISlYJs2vR8VX3Orl myOe0EJGIvHlkHUh8UuSc2W9svqmZr7NLlf0MSL/E8nLI1tiDCBTuEJReNw4YhbXRGar SmencZ27tiaaSGwrqNd7BD4JS0QjvD43Rseibife7zzE+XerX1rojbLT9YtDfyzA+MR3 jp9Q== X-Forwarded-Encrypted: i=1; AJvYcCVo2OtAzGCazBVrmgZhCR5Hd7L+jk4Fb/OULqe4Sd6yCjho7TB1CbDE/HTM0kyeREBcYjFeHSR+03PMgMM=@vger.kernel.org X-Gm-Message-State: AOJu0YzI0zIFxXmStnfETyXe/QmlIjFJm4OgD5UZaz2VvZz1dXXLIb1H a7lgcMxabjFKxDFsOdr+brL389BWIxzLGmLkTKCYZtWno07n79EpQyuCClSfOyqKGCtoUwjHirT lhPu7Xx890tikjdyKOhRpsuhkfNKy/ZZRQKYEfz8W9SqXFxtp3e/qG+/3haEdPmd1k3Q= X-Gm-Gg: ASbGncue/AQQIWFouaMbyVvtUODV3TIeZvCrY5CMJP/D4IO10Cea+vP4NiNSr7wBING BUO9+A2PkV5+iZrxnUiYNHGYvyVRVOhy4qCTyH3ED5Hd19XkE/XBoGEb0UsIB9yq0920uvvJU0+ T0Mo4GkSNf9vyWuD1IGQTBzxs7SSb7cxRxfuXuwHHGXwxAVhxOa1I007/phPSNpRM3kkdGeojxH BU7x9PB19d8/1QXkDSrbW+5UGC5a91Dcm5nebbT7Es2CmM4HRSsbkZSMbUl60N2S8PhPdfQTzu8 7Cfu2q+MNJu5gHJSBh5d19R10iWlRXito3KGdvyx6CQLHrs+oEZL/coM9RdD85DOZy73C9cCkiY kpuGwtuylyZUH3YVJew7JC0YvPNIpOgdWKQ== X-Received: by 2002:a05:6102:b06:b0:5db:3569:9059 with SMTP id ada2fe7eead31-5e48813bd66mr1073189137.17.1764778377648; Wed, 03 Dec 2025 08:12:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IEerlhmKZZIZuxokKtvCNjfaLCZfMCV1X+c1fG9SX8ti29Pfn3n6iYlA3IhNhTNW2VVIfMvqQ== X-Received: by 2002:a05:6102:b06:b0:5db:3569:9059 with SMTP id ada2fe7eead31-5e48813bd66mr1073166137.17.1764778377202; Wed, 03 Dec 2025 08:12:57 -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.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Dec 2025 08:12:56 -0800 (PST) From: Krzysztof Kozlowski Date: Wed, 03 Dec 2025 17:12:40 +0100 Subject: [PATCH 3/3] ASoC: SDCA: functions: 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-3-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=5457; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=q9mFEQZfeT2leld7qV71CIZ5Fa2tn7vOKw3CYO/eH1o=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBpMGF91M3TnX1UKmTqGltaqVD/j6uQbaud6GhJK PXvUMrq5QSJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaTBhfQAKCRDBN2bmhouD 13VOD/9kd9fX1NQQ2qiG/kBorz6TKkPdQu0/4LselpRy45PR4PA7iNJ4GuioHYuK0pOE3YuQSv5 1gMB4WqDLkDUlz0jKBzKH4Y83hT3tmKQwy5vCgEfcafqMF1KjBEoOj3RDYhwtpv0jWCX9ClYHdh mLKe53lOunX++YCPaX/A26Vbyx6/yjDf9I3H5aTOG1IIXel6bZctM946cY9M7osSNW6H7JXLlOe WUTPKLy9huPGOCsA28gnVZtcGOdlH1hbOh2Lrprb9YXZYvgNEfpEu5x0Ub+wNbYjMS4b6CJnnLK 2els/HDnauv3rF/l8HT6DEzw4W6rrzUyBb7A8jabDZEe2Oba+F+APZyURI31ZMXUYIoLH+nIvk9 K5MkN2gpKYi7f5qVqJdGjpgxgyWNOcOK4LAg4oBx5Gblyh1NA/42hY/OnXXKpMmrkanowZelWG8 k3vHwl6PbGvXexbHzTizBRmch3YJwXTrgCFkddk6aSRZF9hcsFM+bM3oCmbN4MFw4b1sCbJjlVy Fj1A47uqjXpxzCvM65fLlfnZoWoepHHUJGiYKjmPu3AXN6iOnEvM7zGgmkA08K1fLy/1XNk5SAl UKFqM5Ufp4wfkS+61QfyU7kJiSvZi7MVG2BPoFOBHbgZ8M6NDVx0+XvNP8n3uc8LDrq7ebpNLP0 /A7TnQKVV9hiTrQ== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-ORIG-GUID: lBzOfUTrfWTE6aFKMbDINlRHyyoUUf26 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjAzMDEyOCBTYWx0ZWRfXzRKXJqJnVeLb O6Xo2ihUa0I75J44QVLL3E+3XqQRRPdYr7st9wQ+SP1pbYiyfIX1A6RFRTBQuquuymocemg5KxQ 9TmFt49AhxjpfrTPACCZCPISWQcIc46wA0r7Vfvb5u/dkoTs4KOUNh7kAWN/gyKvBwx9f+eS2ue zKHS9WOyOGSfi5WbevQAgLbnLnkzQGwWdr7MFugfcR7NnbK3fGk/tuq61W7eCEFFSNSlnEIhYI5 nEWrEAWc7dD7rgEUVMSOo+9hHPzlOrBWPSZ8X40CFlYGJpEV61tNTzoZ3GnlLPhdorb0+oAd1aU J5dtpeNrBOIFP3CKQ4JlmN36PHbAXXGmFbvH6Z8wafe9KnkRyYsOW7vDvFZ6KJ4m+MbkKb+oMZh 2MuN2F+MHE//snVVGFdzGUH+/AY84g== X-Proofpoint-GUID: lBzOfUTrfWTE6aFKMbDINlRHyyoUUf26 X-Authority-Analysis: v=2.4 cv=ZqDg6t7G c=1 sm=1 tr=0 ts=6930618a cx=c_pps a=UbhLPJ621ZpgOD2l3yZY1w==:117 a=FPK7cjBCgYbqzSTDLBmM0Q==:17 a=IkcTkHD0fZMA:10 a=wP3pNCr1ah4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=EXIqECK6dIgXzTZ5EzcA:9 a=QEXdDO2ut3YA:10 a=TOPH6uDL9cOC6tEoww4z: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 clxscore=1015 impostorscore=0 lowpriorityscore=0 suspectscore=0 priorityscore=1501 spamscore=0 bulkscore=0 adultscore=0 phishscore=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 Reviewed-by: Charles Keepax --- sound/soc/sdca/sdca_functions.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sound/soc/sdca/sdca_functions.c b/sound/soc/sdca/sdca_function= s.c index 5a1f120487ef..acac066f1d8d 100644 --- a/sound/soc/sdca/sdca_functions.c +++ b/sound/soc/sdca/sdca_functions.c @@ -1184,7 +1184,6 @@ static int find_sdca_entity_pde(struct device *dev, { static const int mult_delay =3D 3; struct sdca_entity_pde *power =3D &entity->pde; - u32 *delay_list __free(kfree) =3D NULL; struct sdca_pde_delay *delays; int num_delays; int i, j; @@ -1205,7 +1204,8 @@ static int find_sdca_entity_pde(struct device *dev, return -EINVAL; } =20 - delay_list =3D kcalloc(num_delays, sizeof(*delay_list), GFP_KERNEL); + u32 *delay_list __free(kfree) =3D kcalloc(num_delays, sizeof(*delay_list), + GFP_KERNEL); if (!delay_list) return -ENOMEM; =20 @@ -1250,7 +1250,6 @@ static int find_sdca_entity_ge(struct device *dev, struct sdca_entity *entity) { struct sdca_entity_ge *group =3D &entity->ge; - u8 *affected_list __free(kfree) =3D NULL; u8 *affected_iter; int num_affected; int i, j; @@ -1269,7 +1268,8 @@ static int find_sdca_entity_ge(struct device *dev, return -EINVAL; } =20 - affected_list =3D kcalloc(num_affected, sizeof(*affected_list), GFP_KERNE= L); + u8 *affected_list __free(kfree) =3D kcalloc(num_affected, sizeof(*affecte= d_list), + GFP_KERNEL); if (!affected_list) return -ENOMEM; =20 @@ -1495,7 +1495,6 @@ static int find_sdca_entities(struct device *dev, str= uct sdw_slave *sdw, struct fwnode_handle *function_node, struct sdca_function_data *function) { - u32 *entity_list __free(kfree) =3D NULL; struct sdca_entity *entities; int num_entities; int i, ret; @@ -1517,7 +1516,8 @@ static int find_sdca_entities(struct device *dev, str= uct sdw_slave *sdw, if (!entities) return -ENOMEM; =20 - entity_list =3D kcalloc(num_entities, sizeof(*entity_list), GFP_KERNEL); + u32 *entity_list __free(kfree) =3D kcalloc(num_entities, sizeof(*entity_l= ist), + GFP_KERNEL); if (!entity_list) return -ENOMEM; =20 @@ -1642,7 +1642,6 @@ static int find_sdca_entity_connection_pde(struct dev= ice *dev, struct sdca_entity *entity) { struct sdca_entity_pde *power =3D &entity->pde; - u32 *managed_list __free(kfree) =3D NULL; struct sdca_entity **managed; int num_managed; int i; @@ -1664,7 +1663,8 @@ static int find_sdca_entity_connection_pde(struct dev= ice *dev, if (!managed) return -ENOMEM; =20 - managed_list =3D kcalloc(num_managed, sizeof(*managed_list), GFP_KERNEL); + u32 *managed_list __free(kfree) =3D kcalloc(num_managed, sizeof(*managed_= list), + GFP_KERNEL); if (!managed_list) return -ENOMEM; =20 @@ -1961,7 +1961,6 @@ static int find_sdca_clusters(struct device *dev, struct fwnode_handle *function_node, struct sdca_function_data *function) { - u32 *cluster_list __free(kfree) =3D NULL; struct sdca_cluster *clusters; int num_clusters; int i, ret; @@ -1982,7 +1981,8 @@ static int find_sdca_clusters(struct device *dev, if (!clusters) return -ENOMEM; =20 - cluster_list =3D kcalloc(num_clusters, sizeof(*cluster_list), GFP_KERNEL); + u32 *cluster_list __free(kfree) =3D kcalloc(num_clusters, sizeof(*cluster= _list), + GFP_KERNEL); if (!cluster_list) return -ENOMEM; =20 @@ -2026,7 +2026,6 @@ static int find_sdca_filesets(struct device *dev, str= uct sdw_slave *sdw, { static const int mult_fileset =3D 3; char fileset_name[SDCA_PROPERTY_LENGTH]; - u32 *filesets_list __free(kfree) =3D NULL; struct sdca_fdl_set *sets; int num_sets; int i, j; @@ -2041,7 +2040,8 @@ static int find_sdca_filesets(struct device *dev, str= uct sdw_slave *sdw, return num_sets; } =20 - filesets_list =3D kcalloc(num_sets, sizeof(u32), GFP_KERNEL); + u32 *filesets_list __free(kfree) =3D kcalloc(num_sets, sizeof(u32), + GFP_KERNEL); if (!filesets_list) return -ENOMEM; =20 @@ -2053,7 +2053,6 @@ static int find_sdca_filesets(struct device *dev, str= uct sdw_slave *sdw, return -ENOMEM; =20 for (i =3D 0; i < num_sets; i++) { - u32 *fileset_entries __free(kfree) =3D NULL; struct sdca_fdl_set *set =3D &sets[i]; struct sdca_fdl_file *files; int num_files, num_entries; @@ -2079,7 +2078,8 @@ static int find_sdca_filesets(struct device *dev, str= uct sdw_slave *sdw, if (!files) return -ENOMEM; =20 - fileset_entries =3D kcalloc(num_entries, sizeof(u32), GFP_KERNEL); + u32 *fileset_entries __free(kfree) =3D kcalloc(num_entries, sizeof(u32), + GFP_KERNEL); if (!fileset_entries) return -ENOMEM; =20 --=20 2.51.0