From nobody Tue Sep 9 21:32:22 2025 Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) (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 83CA425949A; Fri, 5 Sep 2025 08:19:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.32 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757060349; cv=none; b=t2XMPd+2BV7czc9GlREJkfVPKlC2WMenlxsvvUG4jaNMRkOAd4WPIGgo4pmJeEHjdtY9C8aw1Vpeos40UrFBtjHSIywOEIXlEkyGzA0B+eYCXsRJ5UPJmIDvwr9J+J+Xyf9g9IwIRQFRs6qDauePfpBi5qCZbdD55A1Tw2r2bB0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757060349; c=relaxed/simple; bh=9yoRVIvhk5C1PfPAObd14uUpbtbJ+f9TA3IATTlSm3w=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cskY0HUYt2qphwfV0fPHZFR5pnuoSDRCkuT17ukhJwIrPAGk3GDSkG4tlKuw4mVf8SbgKqko9lFUS2Qx4rlUjyozBN4i4DI2azj4aN32rHOdk7ZtnGg9AxBHc6Rwg/GHNMzX/E/Xb/TEaenA5UE4U14KuBsvl1AuibivJKIYP/8= 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.32 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.163.17]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4cJ8RH6jgLz3tZVQ; Fri, 5 Sep 2025 16:20:11 +0800 (CST) Received: from dggemv705-chm.china.huawei.com (unknown [10.3.19.32]) by mail.maildlp.com (Postfix) with ESMTPS id B74601A0188; Fri, 5 Sep 2025 16:19:03 +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; Fri, 5 Sep 2025 16:19:02 +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; Fri, 5 Sep 2025 16:19:01 +0800 From: Huisong Li To: , CC: , , , , , , , Subject: [PATCH v2 1/3] ACPI: processor: Fix function defined but not used warning Date: Fri, 5 Sep 2025 16:18:58 +0800 Message-ID: <20250905081900.663869-2-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20250905081900.663869-1-lihuisong@huawei.com> References: <20250905081900.663869-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: kwepems500002.china.huawei.com (7.221.188.17) 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 compling warnings as the following link said. The acpi_processor_register/unregister_idle_driver() would not be used when CONFIG_ACPI_PROCESSOR_IDLE is n. So remove these empty function definition. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202508300519.tZQHY6HA-lkp@int= el.com/ Fixes: 7a8c994cbb2d ("ACPI: processor: idle: Optimize ACPI idle driver regi= stration") Signed-off-by: Huisong Li --- include/acpi/processor.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 360b673f05e5..ff864c1cee3a 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h @@ -445,12 +445,6 @@ static inline int acpi_processor_hotplug(struct acpi_p= rocessor *pr) { return -ENODEV; } -static inline void acpi_processor_register_idle_driver(void) -{ -} -static inline void acpi_processor_unregister_idle_driver(void) -{ -} #endif /* CONFIG_ACPI_PROCESSOR_IDLE */ =20 /* in processor_thermal.c */ --=20 2.33.0 From nobody Tue Sep 9 21:32:22 2025 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) (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 56B1B25949A; Fri, 5 Sep 2025 08:19:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.188 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757060353; cv=none; b=Qad1EkV9jFrIU7tq1hZlOoXfovLhsS3a8JbinHEi5fhVCdQG4a5mp/085iJOflH3t2aYLpVpW2UNfoF/wN8AePgN5uTf1PEhpV640yJJrB6ILwirerxf7ssNfXBzaPBsNw4a/Nh2z0K5CCXIRx3iIgdCZyYGvbpzMuj/gkMqM8A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757060353; c=relaxed/simple; bh=o7B+YiWTDXLS32+gY7wd13a9QP45qCc3OGT8R0QrfYs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kiM3LJ6nW20+5UgfDf0U3mhx4azsN2a4TokChEJDkFGw1GAaOOfvJNyXclyofjU3xv41EXrdmqNi807E9JLk2Xy+H839CjrISQWqrOkcinyLpERXN+hJFa4oLiWOIlrjmdFfcY7Z0oxTUT9/mLYTA3PNj/7Sh8F1nU0jurhTX7E= 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.188 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.105]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4cJ8Jf0vwtzQlLB; Fri, 5 Sep 2025 16:14:26 +0800 (CST) Received: from dggemv706-chm.china.huawei.com (unknown [10.3.19.33]) by mail.maildlp.com (Postfix) with ESMTPS id CE230140147; Fri, 5 Sep 2025 16:19:02 +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; Fri, 5 Sep 2025 16:19:02 +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; Fri, 5 Sep 2025 16:19:01 +0800 From: Huisong Li To: , CC: , , , , , , , Subject: [PATCH v2 2/3] ACPI: processor: Remove unused empty function definition for processor_idle.c Date: Fri, 5 Sep 2025 16:18:59 +0800 Message-ID: <20250905081900.663869-3-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20250905081900.663869-1-lihuisong@huawei.com> References: <20250905081900.663869-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: kwepems500002.china.huawei.com (7.221.188.17) 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 enc= ounter some warnings about function defined but not used. All external functions of processor_idle.c are just used in processor_drive= r.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 | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/include/acpi/processor.h b/include/acpi/processor.h index ff864c1cee3a..d6a87dc42a9a 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h @@ -417,34 +417,14 @@ static inline void acpi_processor_throttling_init(voi= d) {} #endif /* CONFIG_ACPI_CPU_FREQ_PSS */ =20 /* in processor_idle.c */ -extern struct cpuidle_driver acpi_idle_driver; #ifdef CONFIG_ACPI_PROCESSOR_IDLE +extern struct cpuidle_driver acpi_idle_driver; int acpi_processor_power_init(struct acpi_processor *pr); int acpi_processor_power_exit(struct acpi_processor *pr); 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 Tue Sep 9 21:32:22 2025 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) (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 B3482301488; Fri, 5 Sep 2025 08:19:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.187 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757060353; cv=none; b=cEDvmZJ0JlTaocJL40pPBri44YSF+TSmlF4SGBTXZRuHdtU9maSP1CYM2Ej7S5hXpG3DEnvYXSvpQ+QR4egrZmhMx6552t85cubC9MCBOjzDaopl82qc8CLD3574W0ZbHs75NgRjZVqcYvF0wJWQumuasRAcojqLP+bozrDvTGw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757060353; c=relaxed/simple; bh=7miSWgnG8UrDriLWjuLtnCeX0nVUoyuHZuBm3OomKmc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jQvOqNVYN6ldEoSFmURif2XpnmLdS9kBjbrDGKwjX/kithW4jh8mND++0hz3g+5USkHSEmpu6U5oN+Ecj3vmz1da7h4Lih5/4y60GUYM5u8tu1VhkQ79tS6muNwEvDvMKudMUzA8+LKCcZBFM5Ezr3NqSN1BjKub+FEm6avsxgM= 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.187 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.105]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4cJ8KT1RLQz13NPd; Fri, 5 Sep 2025 16:15:09 +0800 (CST) Received: from dggemv706-chm.china.huawei.com (unknown [10.3.19.33]) by mail.maildlp.com (Postfix) with ESMTPS id 167A8140147; Fri, 5 Sep 2025 16:19:03 +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; Fri, 5 Sep 2025 16:19:02 +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; Fri, 5 Sep 2025 16:19:02 +0800 From: Huisong Li To: , CC: , , , , , , , Subject: [PATCH v2 3/3] ACPI: processor: Fix acpi_processor_ffh_lpi_xxx() declaration Date: Fri, 5 Sep 2025 16:19:00 +0800 Message-ID: <20250905081900.663869-4-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20250905081900.663869-1-lihuisong@huawei.com> References: <20250905081900.663869-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: kwepems500002.china.huawei.com (7.221.188.17) 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 d6a87dc42a9a..34d6ecfece39 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