Re: Build failure in linux-next: implicit declaration of acpi_has_method

From: Rafael J. Wysocki

Date: Wed Apr 15 2026 - 10:16:56 EST


On Wed, Apr 15, 2026 at 10:35 AM Venkat Rao Bagalkote
<venkat88@xxxxxxxxxxxxx> wrote:
>
>
> On 15/04/26 12:50 pm, Rafael J. Wysocki wrote:
> > On Wed, Apr 15, 2026 at 9:16 AM Venkat Rao Bagalkote
> > <venkat88@xxxxxxxxxxxxx> wrote:
> >> Greetings!!!
> >>
> >> IBM CI has reported a build failure on linux-next repo.
> >>
> >> Failures:
> >>
> >> drivers/bluetooth/btintel_pcie.c: In function
> >> ‘btintel_pcie_acpi_reset_method’:

What kernel is this?

I cannot find the function above in the mainline.

> >> drivers/bluetooth/btintel_pcie.c:2309:14: error: implicit declaration of
> >> function ‘acpi_has_method’; did you mean ‘acpi_has_watchdog’?
> >> [-Werror=implicit-function-declaration]
> >> 2309 | if (!acpi_has_method(handle, "_PRR")) {
> >> | ^~~~~~~~~~~~~~~
> >> | acpi_has_watchdog
> >>
> >>
> >> The function acpi_has_method() lacks a stub definition in
> >> include/linux/acpi.h
> >> for the !CONFIG_ACPI case, unlike other ACPI utility functions.
> > Code that calls acpi_has_method() clearly depends on ACPI though, so
> > building it in the !CONFIG_ACPI case is questionable.
>
>
> Thank you so much for the review and explanation!!
>
> Adding the stub, would just hide the real issue. I guess, proper fix is
> to add the ACPI dependency in Kconfig.
>
>
>
> # git diff
> diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
> index c5d45cf91f88..fc1b37044a9b 100644
> --- a/drivers/bluetooth/Kconfig
> +++ b/drivers/bluetooth/Kconfig
> @@ -502,7 +502,7 @@ config BT_NXPUART
>
> config BT_INTEL_PCIE
> tristate "Intel HCI PCIe driver"
> - depends on PCI
> + depends on PCI && ACPI
> select BT_INTEL
> select FW_LOADER
> help
>
>
> Can you please confirm, if this the right approach before I submit a
> formal patch.

I'm not sure about that. You need to talk to the driver maintainer.

> Thank you again for your patience and guidance.

You're welcome.