From nobody Mon Dec 1 23:05:42 2025 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 7C8EF30F929 for ; Sat, 29 Nov 2025 13:18:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764422297; cv=none; b=G2YmlVa0bYk6Aqx3BtcmrTKngmxLSX+lToVp1bsD2T0LbcW+SX123zcXyrMzt2vequ/fbv5Wmx2Qu0dvM5sw21+3IKLeV+utOUo0tVQPKFpSDpGVkZ4xTM2yk1hn+qwfBiKcWg41Ek402SuKVUbqg8lw0o6JMPCwOJf1xGN5gUQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764422297; c=relaxed/simple; bh=x9vtLXfXzdPDIM01j+riInZ7EHgzllLsAHPJN+4rMdk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=X7LYjzt9AXZmjy9AAELFqxlBXWe3Yf/7CCqUIaP0Yy88gUMc1CHM3CXYfZhRd4MWyjFJdrRBbT6T9cden/Cr+dtNnM53dwvEOyA8+6RmI3ymVbapoM27YLWDtGisMLqom/EVjHJrduiDEopAEd9chB4uROAnsnyxANIMyyhTZD0= 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=ZhFb6lKn; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=ACKHnII2; arc=none smtp.client-ip=205.220.168.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="ZhFb6lKn"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="ACKHnII2" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5AT28bqc1634761 for ; Sat, 29 Nov 2025 13:18:09 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= tZdI4KwvA+/rcyU/a5Z2diTmh95gzReC/grImFy8oOU=; b=ZhFb6lKnzkGiLDuh XvDj2B6Z5JPDtS1n0msQiSSrhCAT9wGEcCHDn7I6TsJNEHFDwtksye2Yv7pkAdR+ XvOun3nQ1pBZI3LDwdnxaSdJp7wqYNthRwXK+EIhESQ6SKJ2AvU8hVoGTWuBitTO e8GOxqetdZWHvQT3rrH2ZUyM01ZhlvD5m3v4ROHhg08pzxDLFE0Usw9D/YbLmNHx zMGtxw5pG1Pd7v6saZhijtQgZpUfka4cXFkli7N55B5Y9MFY4NRo6duac0Mz26h6 UCdekOy/sOvlqqkMHmPQgAgr4kr9Jqm8sjQfxg9tiO9Pl1CYHQOzhcMCEvBMNbuC 2JzQPA== 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 4aqqsqgtdv-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sat, 29 Nov 2025 13:18:09 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-8b245c49d0cso540707985a.3 for ; Sat, 29 Nov 2025 05:18:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764422288; x=1765027088; 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=tZdI4KwvA+/rcyU/a5Z2diTmh95gzReC/grImFy8oOU=; b=ACKHnII2lUf2LgHxdv52HC8XbvD/UVlFyqcCnCMVVeCLC/neVrXoYNo+6wzm71tWfK jdU8f3Gh0I+sdcfBTc2G63uN3mqWmzCQUL1eCWA3PiBSekTPIk/GzvvFeK7jUyElLye4 aJeqFOLD8+6lrJsdRFhoBPfQjyG+f8ps5MXv6NpitM720szzQ0AmhHJI6oQcjtHSK7ff 0lOol4c8VeQPvooytxmSZnwcxMEOcsaajz6qVQNeFoRSez2VXzaCYz+NDnSaFprCd7wb +xAh9MPKamSRXfOU7Cj3Eu4xWXVN/MFJ6xQMh4RPGIW1zv4jEGLkPVeb+EzvBdR+nMgg ko0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764422288; x=1765027088; 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=tZdI4KwvA+/rcyU/a5Z2diTmh95gzReC/grImFy8oOU=; b=jDhstT6+fZq270DenRyI/MJBTjjis1QXq4bN6TU8v2g9XxHsEhlA7fZCKJORbgtuav TRmv/PX/rJGLUG2E88AdjOrtMHfaj1gJilPA1B0H9FZPYc8j1o/A4gQp3+B4p1bOG4q4 Cvaqu9QIztJQTwss4pouOnwsych9t7K7YGS9iUBb5ZVCAyPGAauW1yDAS5Aov9xtzc0m lBZ58Fkwrf/uVUB23z/6xInSB95VvISX0bXLMF5B0ymUOBBLbPrHHDjSFwUdd3DGniGc cX2G+CGrEwImnbuHOQ2ReThmuDRaQIGBazDWczhO7x1z8p5XjYsm7jlmRIAw89QbhGQ7 5Wsg== X-Forwarded-Encrypted: i=1; AJvYcCXInrBACCLYih2p/ilbKN0w3DXGSYqOTU1P0P0C5R3foJjRvYlq/yWuoTc9TOKvUgS89HcZ5Cl3rFVuWUs=@vger.kernel.org X-Gm-Message-State: AOJu0YyiYVD2LmK8tQnr9CukA4b91lSC+yW4FunMYGvtTivFppITgnGW T010UnITyGCWg01wJrmfwEZKmsZ1qnkxCwN7jOvCy3B7zJDgrBtIYEN0ZFJ9u7OzxRp1HiQVCvC Vw2igEypYSUOeMH/CvmT1y6UDEKPe6g+TaZbNFYWP9bFOmYNnJyZLh/ckkogodpovD0w= X-Gm-Gg: ASbGncuKoU/XTGkapeI5qLNgm3aJ4nflKuTQLj6uKEhHeVM7zJHOxDj1nab3prF5LeP jK/lisan/NlQcM0FreeyjXAvLWRRbTAM6tRpQ39XvDaUk2F7GINh1VlxYk0N6oU2loITtzs1M9Y 9vi5kfLFQrCihpaCyUB7apf592R08nBmANAd1g0Ymosdx5wpFSAD27RdKIuzonK+Xn431n+Giu7 2K51kbtG1LvsDs2lPah/30cNI6lS9Ugea3a/E6lohwluAIdncZi7wpMZ9/gfMy8UAWaBx0C304E TyPpkTPliORWNyWg4p/MtQ7Pdi5O/mDWE3/R0YnObY5KYo+JLcuGa/tB7RuaDtLwUkOwiVX3pRY OzBl4JKi6KoJ1ElbAJpI/HwGBWCzTMvM8Aw== X-Received: by 2002:a05:620a:40c3:b0:892:ce2b:f84d with SMTP id af79cd13be357-8b33d1f05c4mr4102207485a.33.1764422288368; Sat, 29 Nov 2025 05:18:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IH5tY6ebmJtGqCyfgXdxSwaxTDwXXKyfw+fj/QGY6k18f5MfeED2Tz9aIlMysPzC/z/UAqkmg== X-Received: by 2002:a05:620a:40c3:b0:892:ce2b:f84d with SMTP id af79cd13be357-8b33d1f05c4mr4102201085a.33.1764422287827; Sat, 29 Nov 2025 05:18:07 -0800 (PST) Received: from [127.0.1.1] ([178.197.195.159]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b76f5163903sm723233866b.7.2025.11.29.05.18.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Nov 2025 05:18:07 -0800 (PST) From: Krzysztof Kozlowski Date: Sat, 29 Nov 2025 14:17:54 +0100 Subject: [PATCH 2/6] ASoC: qcom: q6asm: 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: <20251129-asoc-wrong-cleanup-h-can-people-stop-sending-this-without-reading-docs-v1-2-c38b06884e39@oss.qualcomm.com> References: <20251129-asoc-wrong-cleanup-h-can-people-stop-sending-this-without-reading-docs-v1-0-c38b06884e39@oss.qualcomm.com> In-Reply-To: <20251129-asoc-wrong-cleanup-h-can-people-stop-sending-this-without-reading-docs-v1-0-c38b06884e39@oss.qualcomm.com> To: Srinivas Kandagatla , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2363; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=x9vtLXfXzdPDIM01j+riInZ7EHgzllLsAHPJN+4rMdk=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBpKvKHOGB7XVrfrOoQU0ZIGpIbWVAtgd3UgWUV3 0lxoSPPWlqJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaSryhwAKCRDBN2bmhouD 1/gHD/4mhpePBUHZKY/6cj/Xw/wgxSk9sxiAromZPPkzhJdObb4LNusWmshHJ5rTJkknLqj2joA 1tq8bIYVHRqBOHn6VgMQrYGWp1rj+lk1FXFEV5xx6R8DJEMuZJXnweVZtwjQMzqWCg2HxI+BCjM Te/czUYchFWcYho5G28gw0Gt+Qchz9E/yhOGFXfLqTsDYtAT8eqyuxzwNwpM8WkBB1THmVJCmGC w9+X6TA60e4BZKdIa3YteLolWCD2Ns+xZ5h+aOMsipAawkogiO09BTAcXWOF1KNvyN0qLhy5ejA MIYdmG2D60knDSzNmgrv9/paPzFlITdq6LlDhSM+QrGX8qXj/9+RXgJEVmY7sSeuvVx+0NaefxD iG2G4vtuh6HvaYNd6GlRdiwbniauwgcEdJiROcWXjU0IQ+JjWWgn9PAz2UfksqZ+gT8p3GUrI6R f0HhtdYbynsanZOdfUd2xJxRWmKh37JFalp6KZqgb+bZh2eZZEGwb/N1kHOEk00rIFyXAtRJuRX m5RHae6ieuAwF6HYkw9e+OQKz0PK30A0w4VhIq7x8GjFvM1ORHvToquG5OVo2XHeQEpwYNGhyMt SptKAEofoxw2Ii33y5EK4CxCiNcuiQUbJ2nbufc0jdKHUGK0UL8KHFJQFocmUkitnIEOJ1r4K0o 5JoKNPbTk098BRQ== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Authority-Analysis: v=2.4 cv=UqVu9uwB c=1 sm=1 tr=0 ts=692af291 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=FPK7cjBCgYbqzSTDLBmM0Q==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=4IEakBAXEm9B9VIJy2sA:9 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-ORIG-GUID: Y9tbrvDGombm0U4zLI25xXKdJ-RVMWSa X-Proofpoint-GUID: Y9tbrvDGombm0U4zLI25xXKdJ-RVMWSa X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI5MDEwNiBTYWx0ZWRfXzR31kXx+BquG 4Rb6T9gmyvHudIuz+1ByXSOMZz/KSiE9tsKseDC19782ifpZ0vAUpwbs1ZHviXrqrze2JlItvpC THMqjgMl9O2fyHQTUL9LxmRmgYu1WFK6nPEirGKDRPLEr06MlY+SerRvPtOxkckBbhc/4dFekJL sVZscUBaZigE8L+xhbKgSwOtgdNGqeEn4wmcGKCRpazLM+TBThvxSJU/+ahS8NPJWO4urUlTvDv +c9Dy08ZxeQ+JzLewmJWFFESArd+twFl1jUUojkM7jtAodeI8sooaquvxrT0eGrEUOVba9WIx41 vemORnSSfIgfbKr3SQ/CGlcoClD092H1NyzvNUDCQQ8R1lPAo8Yc5+xN3WLbmhWoygByAMPweTA H8DpeEE7KWjZWuN8+uPO57tKZ018Zw== 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-11-28_08,2025-11-27_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 impostorscore=0 phishscore=0 adultscore=0 malwarescore=0 suspectscore=0 clxscore=1015 lowpriorityscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511290106 Commit 6e00112d31c8 ("ASoc: qcom: q6asm: Use automatic cleanup of kfree()") did not make the code simpler but more complicated. Already simple code of allocation and free, without any error paths, got now declaration with one constructor followed by another allocation, which 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/qcom/qdsp6/q6asm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/qcom/qdsp6/q6asm.c b/sound/soc/qcom/qdsp6/q6asm.c index e7295b7b2461..890a1f786627 100644 --- a/sound/soc/qcom/qdsp6/q6asm.c +++ b/sound/soc/qcom/qdsp6/q6asm.c @@ -335,7 +335,6 @@ static int __q6asm_memory_unmap(struct audio_client *ac, struct q6asm *a =3D dev_get_drvdata(ac->dev->parent); struct apr_pkt *pkt; int rc, pkt_size; - void *p __free(kfree) =3D NULL; =20 if (ac->port[dir].mem_map_handle =3D=3D 0) { dev_err(ac->dev, "invalid mem handle\n"); @@ -343,7 +342,7 @@ static int __q6asm_memory_unmap(struct audio_client *ac, } =20 pkt_size =3D APR_HDR_SIZE + sizeof(*mem_unmap); - p =3D kzalloc(pkt_size, GFP_KERNEL); + void *p __free(kfree) =3D kzalloc(pkt_size, GFP_KERNEL); if (!p) return -ENOMEM; =20 @@ -428,7 +427,6 @@ static int __q6asm_memory_map_regions(struct audio_clie= nt *ac, int dir, struct audio_port_data *port =3D NULL; struct audio_buffer *ab =3D NULL; struct apr_pkt *pkt; - void *p __free(kfree) =3D NULL; unsigned long flags; uint32_t num_regions, buf_sz; int i, pkt_size; @@ -447,7 +445,7 @@ static int __q6asm_memory_map_regions(struct audio_clie= nt *ac, int dir, pkt_size =3D APR_HDR_SIZE + sizeof(*cmd) + (sizeof(*mregions) * num_regions); =20 - p =3D kzalloc(pkt_size, GFP_KERNEL); + void *p __free(kfree) =3D kzalloc(pkt_size, GFP_KERNEL); if (!p) return -ENOMEM; =20 --=20 2.48.1