From nobody Fri Oct 3 19:17:20 2025 Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) (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 B7E2A2FDC31; Wed, 27 Aug 2025 02:34:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=124.126.103.232 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756262092; cv=none; b=pdUinAyIHd4bKApkSbo1uZgFcP/pLw8Z8a+YuPySmZWok2wnsNuikAXo4crhGUUqaGgHgtqoxIrt0h579JDoCDpQGpbV9sYmBwA2nMi5sNfP1GoBeVevatzmp31zUKl3E8T/olf/o6p7dfykSKpeqdGbw4cLbYXXkWVWPsFhpIk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756262092; c=relaxed/simple; bh=flSfPRNQnYMom8ROcCS1tPymmpBjL2uMjRUbr65zK+U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=C0g8gSWJIIZhAQp57StK6jTCC3SWkR6I/xN9nvpvcEBf5Pz7DYP0/cPdjjt7IPrpZaWzYXmG6EHCVw5kngexXC1eRq2n83qh51KA8ZbgrinZO5PtaJ2c/6Ta+Xsk5djih3pLdkOBbmbz36ReEg5GAvIaqCya9vN0sO16OCCamd4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn; spf=pass smtp.mailfrom=kylinos.cn; arc=none smtp.client-ip=124.126.103.232 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kylinos.cn X-UUID: 64a67eb882ee11f0b29709d653e92f7d-20250827 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.45,REQID:e8eb1380-9b4f-4676-8e85-4dd94b7a98db,IP:0,U RL:0,TC:0,Content:0,EDM:-25,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:-25 X-CID-META: VersionHash:6493067,CLOUDID:ad5ebea67f0f0036752eb1b7b2dd6389,BulkI D:nil,BulkQuantity:0,Recheck:0,SF:81|82|102|850,TC:nil,Content:0|50,EDM:1, IP:nil,URL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV: 0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 64a67eb882ee11f0b29709d653e92f7d-20250827 Received: from mail.kylinos.cn [(10.44.16.175)] by mailgw.kylinos.cn (envelope-from ) (Generic MTA) with ESMTP id 976442035; Wed, 27 Aug 2025 10:34:45 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id D683BE008FAA; Wed, 27 Aug 2025 10:34:43 +0800 (CST) X-ns-mid: postfix-68AE6EC3-738925222 Received: from localhost.localdomain (unknown [172.25.120.24]) by mail.kylinos.cn (NSMail) with ESMTPA id 6F1FDE008FB0; Wed, 27 Aug 2025 10:34:38 +0800 (CST) From: Zihuan Zhang To: "Rafael J . wysocki" , Viresh Kumar , Catalin Marinas , Will Deacon , Sean Christopherson , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , Markus Mayer , Florian Fainelli , Srinivas Pandruvada , Madhavan Srinivasan , Michael Ellerman , Krzysztof Kozlowski , Alim Akhtar , Thierry Reding , Jonathan Hunter , MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Simona Vetter , Daniel Lezcano , Sascha Hauer , Shawn Guo , Eduardo Valentin , Keerthy , Matthias Brugger , AngeloGioacchino Del Regno Cc: zhenglifeng , "H . Peter Anvin" , Zhang Rui , Len Brown , Nicholas Piggin , Christophe Leroy , Lukasz Luba , Pengutronix Kernel Team , Beata Michalska , Fabio Estevam , Pavel Machek , Sumit Gupta , Prasanna Kumar T S M , Sudeep Holla , Yicong Yang , linux-pm@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org, linux-acpi@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-tegra@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, imx@lists.linux.dev, linux-omap@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Zihuan Zhang Subject: [PATCH v2 14/18] cpufreq: powerpc: macintosh: Use __free(put_cpufreq_policy) for policy reference Date: Wed, 27 Aug 2025 10:31:58 +0800 Message-Id: <20250827023202.10310-15-zhangzihuan@kylinos.cn> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250827023202.10310-1-zhangzihuan@kylinos.cn> References: <20250827023202.10310-1-zhangzihuan@kylinos.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Replace the manual cpufreq_cpu_put() with __free(put_cpufreq_policy) annotation for policy references. This reduces the risk of reference counting mistakes and aligns the code with the latest kernel style. No functional change intended. Signed-off-by: Zihuan Zhang --- drivers/macintosh/windfarm_cpufreq_clamp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/macintosh/windfarm_cpufreq_clamp.c b/drivers/macintosh= /windfarm_cpufreq_clamp.c index 28d18ef22bbb..f05e2167481f 100644 --- a/drivers/macintosh/windfarm_cpufreq_clamp.c +++ b/drivers/macintosh/windfarm_cpufreq_clamp.c @@ -62,7 +62,7 @@ static const struct wf_control_ops clamp_ops =3D { =20 static int __init wf_cpufreq_clamp_init(void) { - struct cpufreq_policy *policy; + struct cpufreq_policy *policy __free(put_cpufreq_policy); struct wf_control *clamp; struct device *dev; int ret; @@ -79,8 +79,6 @@ static int __init wf_cpufreq_clamp_init(void) ret =3D freq_qos_add_request(&policy->constraints, &qos_req, FREQ_QOS_MAX, max_freq); =20 - cpufreq_cpu_put(policy); - if (ret < 0) { pr_err("%s: Failed to add freq constraint (%d)\n", __func__, ret); --=20 2.25.1