public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [bluetooth-next:master /72] drivers/bluetooth/btintel_pcie.c:2309:7: error: call to undeclared function 'acpi_has_method'; ISO C99 and later do not support implicit function declarations
@ 2026-04-16 23:50 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-04-16 23:50 UTC (permalink / raw)
  To: Chandrashekar Devegowda
  Cc: llvm, oe-kbuild-all, linux-bluetooth, Luiz Augusto von Dentz

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
head:   b57b0f27cb05c5a9dac9eeb2cb2798a4c189a685
commit: 912a499a7955a2773a20f33e495a5ce24d7279f0 [/72] Bluetooth: btintel_pcie: Support Product level reset
config: um-allmodconfig (https://download.01.org/0day-ci/archive/20260417/202604170717.KYieBeVa-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260417/202604170717.KYieBeVa-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604170717.KYieBeVa-lkp@intel.com/

Note: the bluetooth-next/master HEAD b57b0f27cb05c5a9dac9eeb2cb2798a4c189a685 builds fine.
      It only hurts bisectability.

All errors (new ones prefixed by >>):

   In file included from drivers/bluetooth/btintel_pcie.c:13:
   In file included from include/linux/pci.h:38:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from arch/um/include/asm/hardirq.h:24:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:12:
   In file included from arch/um/include/asm/io.h:24:
   include/asm-generic/io.h:1209:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
    1209 |         return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
         |                                                   ~~~~~~~~~~ ^
>> drivers/bluetooth/btintel_pcie.c:2309:7: error: call to undeclared function 'acpi_has_method'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    2309 |         if (!acpi_has_method(handle, "_PRR")) {
         |              ^
   drivers/bluetooth/btintel_pcie.c:2309:7: note: did you mean 'acpi_has_watchdog'?
   include/linux/acpi.h:1494:20: note: 'acpi_has_watchdog' declared here
    1494 | static inline bool acpi_has_watchdog(void) { return false; }
         |                    ^
   1 warning and 1 error generated.


vim +/acpi_has_method +2309 drivers/bluetooth/btintel_pcie.c

  2282	
  2283	static int btintel_pcie_acpi_reset_method(struct btintel_pcie_data *data)
  2284	{
  2285		union acpi_object *obj, argv4;
  2286		acpi_handle handle;
  2287		int ret;
  2288		struct pldr_mode {
  2289			__le16	cmd_type;
  2290			__le16	cmd_payload;
  2291		} __packed;
  2292	
  2293		/* set 1 for _PRR mode
  2294		 * Product Reset (PLDR Abort flow)
  2295		 */
  2296		static const struct pldr_mode mode = {
  2297			.cmd_type = cpu_to_le16(1),
  2298			.cmd_payload = cpu_to_le16(BTINTEL_PCIE_DSM_PLDR_MODE_EN_PROD_RESET |
  2299				       BTINTEL_PCIE_DSM_PLDR_MODE_EN_WIFI_FLR),
  2300		};
  2301		struct hci_dev *hdev = data->hdev;
  2302	
  2303		handle = ACPI_HANDLE(GET_HCIDEV_DEV(data->hdev));
  2304		if (!handle) {
  2305			bt_dev_err(data->hdev, "No support for bluetooth device in ACPI firmware");
  2306			return -EACCES;
  2307		}
  2308	
> 2309		if (!acpi_has_method(handle, "_PRR")) {
  2310			bt_dev_err(data->hdev, "No support for _PRR ACPI method, cold boot");
  2311			return -ENODEV;
  2312		}
  2313	
  2314		argv4.buffer.type = ACPI_TYPE_BUFFER;
  2315		argv4.buffer.length = sizeof(mode);
  2316		argv4.buffer.pointer = (void *)&mode;
  2317	
  2318		obj = acpi_evaluate_dsm(handle, &btintel_guid_dsm, 0,
  2319					BTINTEL_PCIE_DSM_DYNAMIC_PLDR, &argv4);
  2320		if (!obj) {
  2321			bt_dev_err(data->hdev, "Failed to call dsm to set reset method");
  2322			return -EIO;
  2323		}
  2324		ACPI_FREE(obj);
  2325	
  2326		pci_dev_lock(data->pdev);
  2327		pci_save_state(data->pdev);
  2328		ret = btintel_acpi_reset_method(hdev);
  2329		if (ret)
  2330			bt_dev_err(data->hdev, "ACPI _PRR reset failed (%d), PLDR incomplete",
  2331				   ret);
  2332		pci_restore_state(data->pdev);
  2333		pci_dev_unlock(data->pdev);
  2334		return ret;
  2335	}
  2336	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-16 23:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-16 23:50 [bluetooth-next:master /72] drivers/bluetooth/btintel_pcie.c:2309:7: error: call to undeclared function 'acpi_has_method'; ISO C99 and later do not support implicit function declarations kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox