From mboxrd@z Thu Jan 1 00:00:00 1970 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 55687CA0EFF for ; Wed, 27 Aug 2025 07:23:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 80F8310E729; Wed, 27 Aug 2025 07:23:39 +0000 (UTC) Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8487C10E312; Wed, 27 Aug 2025 02:34:03 +0000 (UTC) X-UUID: 47777c0282ee11f0b29709d653e92f7d-20250827 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.45, REQID:199cecf5-7f01-4d90-bcfb-9944cd47b8c1, IP:0, U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:6493067, CLOUDID:f092454a1cef70d4b47ef8bf1194cbca, BulkI D:nil,BulkQuantity:0,Recheck:0,SF:81|82|102|850,TC:nil,Content:0|50,EDM:-3 ,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: 47777c0282ee11f0b29709d653e92f7d-20250827 Received: from mail.kylinos.cn [(10.44.16.175)] by mailgw.kylinos.cn (envelope-from ) (Generic MTA) with ESMTP id 2138779548; Wed, 27 Aug 2025 10:33:56 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id BBC82E008FAB; Wed, 27 Aug 2025 10:33:52 +0800 (CST) X-ns-mid: postfix-68AE6E90-537935210 Received: from localhost.localdomain (unknown [172.25.120.24]) by mail.kylinos.cn (NSMail) with ESMTPA id 4A0FFE008FAF; Wed, 27 Aug 2025 10:33:47 +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 06/18] cpufreq: intel_pstate: Use __free(put_cpufreq_policy) for policy reference Date: Wed, 27 Aug 2025 10:31:50 +0800 Message-Id: <20250827023202.10310-7-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> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Wed, 27 Aug 2025 07:22:35 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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/cpufreq/intel_pstate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstat= e.c index f366d35c5840..4e7e2990e9a6 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -1698,19 +1698,18 @@ static ssize_t store_no_turbo(struct kobject *a, = struct kobj_attribute *b, static void update_qos_request(enum freq_qos_req_type type) { struct freq_qos_request *req; - struct cpufreq_policy *policy; int i; =20 for_each_possible_cpu(i) { struct cpudata *cpu =3D all_cpu_data[i]; unsigned int freq, perf_pct; + struct cpufreq_policy *policy __free(put_cpufreq_policy); =20 policy =3D cpufreq_cpu_get(i); if (!policy) continue; =20 req =3D policy->driver_data; - cpufreq_cpu_put(policy); =20 if (!req) continue; --=20 2.25.1