From nobody Thu Oct 2 20:28:25 2025 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) (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 54E2C1CAA4; Thu, 11 Sep 2025 11:24:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.189 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757589856; cv=none; b=rkDvEosiL2Qk3mJfTrXZVGqPZ8/PEhM3P67BVfiHHW9PMCgpLZUmR/uFY5X8gRKRhHAHzKtcIsKOYZLpyoNTDycEapolo0eNb/XnEUQZ20M5KKpF0toQbHUylMwbCYAK+4y17sC3iDelPu0PRilJLMEhDl9raiBASCuqGTxz/24= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757589856; c=relaxed/simple; bh=R4EExJk24GEfY/8r2nfKYYXjBuAHTGzVqbkOoGpOdzc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=c1nXIp+FZVWdzWuN/8m1VRTnGKG/UQf7+hr7OJ8QyChB9itl8yZoDOIZUuZ8P3Nh1vY55jG/z5DTUa7Fr3rIXr6jzr5AtG2nPVLkCV4W95IlZVf/tTajwrxnnyTyfrY2MjKQpB+3m9RnwrB2i7Agu/xWf/Be8oYJiY5liRIdBjk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=h-partners.com; arc=none smtp.client-ip=45.249.212.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=h-partners.com Received: from mail.maildlp.com (unknown [172.19.88.194]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4cMw7Y4q5lzdd0h; Thu, 11 Sep 2025 19:19:37 +0800 (CST) Received: from dggemv712-chm.china.huawei.com (unknown [10.1.198.32]) by mail.maildlp.com (Postfix) with ESMTPS id 99D3F140278; Thu, 11 Sep 2025 19:24:10 +0800 (CST) Received: from kwepemn100009.china.huawei.com (7.202.194.112) by dggemv712-chm.china.huawei.com (10.1.198.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 11 Sep 2025 19:24:10 +0800 Received: from localhost.localdomain (10.50.165.33) by kwepemn100009.china.huawei.com (7.202.194.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 11 Sep 2025 19:24:09 +0800 From: Huisong Li To: , CC: , , , , , , , Subject: [PATCH v3 1/3] ACPI: processor: Remove unused empty function definition for processor_idle.c Date: Thu, 11 Sep 2025 19:24:06 +0800 Message-ID: <20250911112408.1668431-2-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20250911112408.1668431-1-lihuisong@huawei.com> References: <20250911112408.1668431-1-lihuisong@huawei.com> 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 X-ClientProxiedBy: kwepems200001.china.huawei.com (7.221.188.67) To kwepemn100009.china.huawei.com (7.202.194.112) Content-Type: text/plain; charset="utf-8" If CONFIG_ACPI_PROCESSOR=3Dn and CONFIG_ACPI_PROCESSOR_IDLE=3Dn, we may encounter some warnings about function defined but not used. All external functions of processor_idle.c are just used in processor_driver.c. And if CONFIG_ACPI_PROCESSOR is selected and CONFIG_ACPI_PROCESSOR_IDLE also be selected automatically. So remove these empty function definitions. Signed-off-by: Huisong Li --- include/acpi/processor.h | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/include/acpi/processor.h b/include/acpi/processor.h index ff864c1cee3a..2976a6d0c54f 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h @@ -425,26 +425,6 @@ int acpi_processor_power_state_has_changed(struct acpi= _processor *pr); int acpi_processor_hotplug(struct acpi_processor *pr); void acpi_processor_register_idle_driver(void); void acpi_processor_unregister_idle_driver(void); -#else -static inline int acpi_processor_power_init(struct acpi_processor *pr) -{ - return -ENODEV; -} - -static inline int acpi_processor_power_exit(struct acpi_processor *pr) -{ - return -ENODEV; -} - -static inline int acpi_processor_power_state_has_changed(struct acpi_proce= ssor *pr) -{ - return -ENODEV; -} - -static inline int acpi_processor_hotplug(struct acpi_processor *pr) -{ - return -ENODEV; -} #endif /* CONFIG_ACPI_PROCESSOR_IDLE */ =20 /* in processor_thermal.c */ --=20 2.33.0 From nobody Thu Oct 2 20:28:25 2025 Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (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 7B1842D7DD4; Thu, 11 Sep 2025 11:24:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757589855; cv=none; b=UPWSXNZVfs2qZ17J+mTzqm+YYjwMCsF7uM+FX2eYeXBkdz0C2xqR6yRZJmzkWQsS7sJhRv7UHCBgMOembWnO9+8kbsbUF7CgN3NLri08eWMXliEDDKtlaKhU2V4OPaeXgJV1O0FtHAGzQO0HBeqkIgT7rmsJIkGisFbnt46+ICs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757589855; c=relaxed/simple; bh=/sbhAqa/bGWUUifrfJCtI47VcH+qtXTTG33lyC+B2Tg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=opwyaXfZMiE8eXiiON4rzVfp/0m9OeTc7r6PmcBMembW0rm2n7SmzAyXsNiVUOpkHtmPPEb77Kq2YjdX477/Kk7CVvyoYfpUtlCBo9qvMMttH6ONlRv8s6IpqBfh+H7/Ah8Ol5WeqfJ6GuCQJupBTnUAVem2n4iu3msZyrDsUdc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=h-partners.com; arc=none smtp.client-ip=45.249.212.191 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=h-partners.com Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4cMw9226Xnz24j7T; Thu, 11 Sep 2025 19:20:54 +0800 (CST) Received: from dggemv705-chm.china.huawei.com (unknown [10.3.19.32]) by mail.maildlp.com (Postfix) with ESMTPS id 232621A016C; Thu, 11 Sep 2025 19:24:11 +0800 (CST) Received: from kwepemn100009.china.huawei.com (7.202.194.112) by dggemv705-chm.china.huawei.com (10.3.19.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 11 Sep 2025 19:24:10 +0800 Received: from localhost.localdomain (10.50.165.33) by kwepemn100009.china.huawei.com (7.202.194.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 11 Sep 2025 19:24:10 +0800 From: Huisong Li To: , CC: , , , , , , , Subject: [PATCH v3 2/3] ACPI: processor: Unify the place of function declaration of processor_idle.c Date: Thu, 11 Sep 2025 19:24:07 +0800 Message-ID: <20250911112408.1668431-3-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20250911112408.1668431-1-lihuisong@huawei.com> References: <20250911112408.1668431-1-lihuisong@huawei.com> 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 X-ClientProxiedBy: kwepems200001.china.huawei.com (7.221.188.67) To kwepemn100009.china.huawei.com (7.202.194.112) Content-Type: text/plain; charset="utf-8" To unify the place of function declaration of processor_idle.c, move acpi_processor_ffh_lpi_probe and acpi_processor_ffh_lpi_enter to one place. And remove 'extern' key word in declaration by the way. Signed-off-by: Huisong Li --- include/acpi/processor.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 2976a6d0c54f..6ee4a69412de 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h @@ -425,6 +425,8 @@ int acpi_processor_power_state_has_changed(struct acpi_= processor *pr); int acpi_processor_hotplug(struct acpi_processor *pr); void acpi_processor_register_idle_driver(void); void acpi_processor_unregister_idle_driver(void); +int acpi_processor_ffh_lpi_probe(unsigned int cpu); +int acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi); #endif /* CONFIG_ACPI_PROCESSOR_IDLE */ =20 /* in processor_thermal.c */ @@ -447,11 +449,6 @@ static inline void acpi_thermal_cpufreq_exit(struct cp= ufreq_policy *policy) } #endif /* CONFIG_CPU_FREQ */ =20 -#ifdef CONFIG_ACPI_PROCESSOR_IDLE -extern int acpi_processor_ffh_lpi_probe(unsigned int cpu); -extern int acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi); -#endif - void acpi_processor_init_invariance_cppc(void); =20 #endif --=20 2.33.0 From nobody Thu Oct 2 20:28:25 2025 Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (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 25FA331076D; Thu, 11 Sep 2025 11:24:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.190 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757589856; cv=none; b=ryVFiNOgKVcw2YEInMwWyObiBscRJqIQPSh7ELn3nPWkoxlgSOfXgXn/2kHIhaVTSZBTeo5fKhWnupr29n6nyzwMuQD9rig4HbkzybL5fdzhO3ed5hoVJxYpY+j2D4h36CxIw/GPspmjEnMKE/Au3BJT3vlQcFGI2Yxrq3Ke/xg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757589856; c=relaxed/simple; bh=vbYroXDGR6aQhaF7Dk7laHsGUNOP3u4tHbEzK0uRwd4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=N4X4epnP5QnNPAphzj5IewxerIAmbrv/gOihQ4zLvH+itEXOm7VGnI7HGq0NY54R6I86hibhkmbbyQBRfSsXz/9eCCRANkQ3cTGUIsdTHpKzpgOfTgj3amLf33NkC/66JxjJTptR+kWtexGgYpd3nfLHuy/gOzW/+L1lJeAbIh0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=h-partners.com; arc=none smtp.client-ip=45.249.212.190 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=h-partners.com Received: from mail.maildlp.com (unknown [172.19.88.163]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4cMw922dY2z2VRj3; Thu, 11 Sep 2025 19:20:54 +0800 (CST) Received: from dggemv706-chm.china.huawei.com (unknown [10.3.19.33]) by mail.maildlp.com (Postfix) with ESMTPS id A56E4180042; Thu, 11 Sep 2025 19:24:11 +0800 (CST) Received: from kwepemn100009.china.huawei.com (7.202.194.112) by dggemv706-chm.china.huawei.com (10.3.19.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 11 Sep 2025 19:24:11 +0800 Received: from localhost.localdomain (10.50.165.33) by kwepemn100009.china.huawei.com (7.202.194.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 11 Sep 2025 19:24:10 +0800 From: Huisong Li To: , CC: , , , , , , , Subject: [PATCH v3 3/3] ACPI: processor: Do not expose the global acpi_idle_driver variable Date: Thu, 11 Sep 2025 19:24:08 +0800 Message-ID: <20250911112408.1668431-4-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20250911112408.1668431-1-lihuisong@huawei.com> References: <20250911112408.1668431-1-lihuisong@huawei.com> 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 X-ClientProxiedBy: kwepems200001.china.huawei.com (7.221.188.67) To kwepemn100009.china.huawei.com (7.202.194.112) Content-Type: text/plain; charset="utf-8" Currently, processor_driver just use the global acpi_idle_driver variable to check if the cpuidle driver is acpi_idle_driver. Actually, there is no need to expose this global variable defined in processor_idle.c to outside. So move the related logical to acpi_processor_power_init() and do not expose it. Signed-off-by: Huisong Li --- drivers/acpi/processor_driver.c | 3 +-- drivers/acpi/processor_idle.c | 5 +++++ include/acpi/processor.h | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_drive= r.c index bc9f58a02c1d..5d824435b26b 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c @@ -166,8 +166,7 @@ static int __acpi_processor_start(struct acpi_device *d= evice) if (result && !IS_ENABLED(CONFIG_ACPI_CPU_FREQ_PSS)) dev_dbg(&device->dev, "CPPC data invalid or not present\n"); =20 - if (!cpuidle_get_driver() || cpuidle_get_driver() =3D=3D &acpi_idle_drive= r) - acpi_processor_power_init(pr); + acpi_processor_power_init(pr); =20 acpi_pss_perf_init(pr); =20 diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 5dacf41d7cc0..967fb13f38fa 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -1404,6 +1404,11 @@ int acpi_processor_power_init(struct acpi_processor = *pr) { int retval; struct cpuidle_device *dev; + struct cpuidle_driver *drv; + + drv =3D cpuidle_get_driver(); + if (drv && drv !=3D &acpi_idle_driver) + return 0; =20 if (disabled_by_idle_boot_param()) return 0; diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 6ee4a69412de..bd96dde5eef5 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h @@ -417,7 +417,6 @@ static inline void acpi_processor_throttling_init(void)= {} #endif /* CONFIG_ACPI_CPU_FREQ_PSS */ =20 /* in processor_idle.c */ -extern struct cpuidle_driver acpi_idle_driver; #ifdef CONFIG_ACPI_PROCESSOR_IDLE int acpi_processor_power_init(struct acpi_processor *pr); int acpi_processor_power_exit(struct acpi_processor *pr); --=20 2.33.0