[PATCH v3 1/3] ACPI: processor: Remove unused empty function definition for processor_idle.c

Huisong Li posted 3 patches 3 weeks ago
There is a newer version of this series
[PATCH v3 1/3] ACPI: processor: Remove unused empty function definition for processor_idle.c
Posted by Huisong Li 3 weeks ago
If CONFIG_ACPI_PROCESSOR=n and CONFIG_ACPI_PROCESSOR_IDLE=n,
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 <lihuisong@huawei.com>
---
 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_processor *pr)
-{
-	return -ENODEV;
-}
-
-static inline int acpi_processor_hotplug(struct acpi_processor *pr)
-{
-	return -ENODEV;
-}
 #endif /* CONFIG_ACPI_PROCESSOR_IDLE */
 
 /* in processor_thermal.c */
-- 
2.33.0
Re: [PATCH v3 1/3] ACPI: processor: Remove unused empty function definition for processor_idle.c
Posted by Rafael J. Wysocki 2 weeks, 2 days ago
On Thu, Sep 11, 2025 at 1:24 PM Huisong Li <lihuisong@huawei.com> wrote:
>
> If CONFIG_ACPI_PROCESSOR=n and CONFIG_ACPI_PROCESSOR_IDLE=n,
> 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 <lihuisong@huawei.com>
> ---
>  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_processor *pr)
> -{
> -       return -ENODEV;
> -}
> -
> -static inline int acpi_processor_hotplug(struct acpi_processor *pr)
> -{
> -       return -ENODEV;
> -}
>  #endif /* CONFIG_ACPI_PROCESSOR_IDLE */
>
>  /* in processor_thermal.c */
> --

Applied as 6.18 material under adjusted subject and with a new
changelog, thanks!