[linux-next:master 9586/11210] drivers/platform/x86/intel/pmc/core.c:1501:3: error: call to undeclared function 'acpi_pmtmr_register_suspend_resume_callback'; ISO C99 and later do not support implicit function declarations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   32ffa5373540a8d1c06619f52d019c6cdc948bb4
commit: e86c8186d03a6ba018e881ed45f0962ad553e861 [9586/11210] platform/x86:intel/pmc: Enable the ACPI PM Timer to be turned off when suspended
config: x86_64-buildonly-randconfig-001-20240912 (https://download.01.org/0day-ci/archive/20240912/202409120421.uRV5boAk-lkp@xxxxxxxxx/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240912/202409120421.uRV5boAk-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409120421.uRV5boAk-lkp@xxxxxxxxx/

Note: the linux-next/master HEAD 32ffa5373540a8d1c06619f52d019c6cdc948bb4 builds fine.
      It may have been fixed somewhere.

All errors (new ones prefixed by >>):

>> drivers/platform/x86/intel/pmc/core.c:1501:3: error: call to undeclared function 'acpi_pmtmr_register_suspend_resume_callback'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1501 |                 acpi_pmtmr_register_suspend_resume_callback(pmc_core_acpi_pm_timer_suspend_resume,
         |                 ^
>> drivers/platform/x86/intel/pmc/core.c:1517:3: error: call to undeclared function 'acpi_pmtmr_unregister_suspend_resume_callback'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1517 |                 acpi_pmtmr_unregister_suspend_resume_callback();
         |                 ^
   2 errors generated.


vim +/acpi_pmtmr_register_suspend_resume_callback +1501 drivers/platform/x86/intel/pmc/core.c

  1433	
  1434	static int pmc_core_probe(struct platform_device *pdev)
  1435	{
  1436		static bool device_initialized;
  1437		struct pmc_dev *pmcdev;
  1438		const struct x86_cpu_id *cpu_id;
  1439		int (*core_init)(struct pmc_dev *pmcdev);
  1440		const struct pmc_reg_map *map;
  1441		struct pmc *primary_pmc;
  1442		int ret;
  1443	
  1444		if (device_initialized)
  1445			return -ENODEV;
  1446	
  1447		pmcdev = devm_kzalloc(&pdev->dev, sizeof(*pmcdev), GFP_KERNEL);
  1448		if (!pmcdev)
  1449			return -ENOMEM;
  1450	
  1451		pmcdev->crystal_freq = pmc_core_get_crystal_freq();
  1452	
  1453		platform_set_drvdata(pdev, pmcdev);
  1454		pmcdev->pdev = pdev;
  1455	
  1456		cpu_id = x86_match_cpu(intel_pmc_core_ids);
  1457		if (!cpu_id)
  1458			return -ENODEV;
  1459	
  1460		core_init = (int (*)(struct pmc_dev *))cpu_id->driver_data;
  1461	
  1462		/* Primary PMC */
  1463		primary_pmc = devm_kzalloc(&pdev->dev, sizeof(*primary_pmc), GFP_KERNEL);
  1464		if (!primary_pmc)
  1465			return -ENOMEM;
  1466		pmcdev->pmcs[PMC_IDX_MAIN] = primary_pmc;
  1467	
  1468		/* The last element in msr_map is empty */
  1469		pmcdev->num_of_pkgc = ARRAY_SIZE(msr_map) - 1;
  1470		pmcdev->pkgc_res_cnt = devm_kcalloc(&pdev->dev,
  1471						    pmcdev->num_of_pkgc,
  1472						    sizeof(*pmcdev->pkgc_res_cnt),
  1473						    GFP_KERNEL);
  1474		if (!pmcdev->pkgc_res_cnt)
  1475			return -ENOMEM;
  1476	
  1477		/*
  1478		 * Coffee Lake has CPU ID of Kaby Lake and Cannon Lake PCH. So here
  1479		 * Sunrisepoint PCH regmap can't be used. Use Cannon Lake PCH regmap
  1480		 * in this case.
  1481		 */
  1482		if (core_init == spt_core_init && !pci_dev_present(pmc_pci_ids))
  1483			core_init = cnp_core_init;
  1484	
  1485		mutex_init(&pmcdev->lock);
  1486		ret = core_init(pmcdev);
  1487		if (ret) {
  1488			pmc_core_clean_structure(pdev);
  1489			return ret;
  1490		}
  1491	
  1492		pmcdev->pmc_xram_read_bit = pmc_core_check_read_lock_bit(primary_pmc);
  1493		pmc_core_do_dmi_quirks(primary_pmc);
  1494	
  1495		pmc_core_dbgfs_register(pmcdev);
  1496		pm_report_max_hw_sleep(FIELD_MAX(SLP_S0_RES_COUNTER_MASK) *
  1497				       pmc_core_adjust_slp_s0_step(primary_pmc, 1));
  1498	
  1499		map = primary_pmc->map;
  1500		if (map->acpi_pm_tmr_ctl_offset)
> 1501			acpi_pmtmr_register_suspend_resume_callback(pmc_core_acpi_pm_timer_suspend_resume,
  1502								 pmcdev);
  1503	
  1504		device_initialized = true;
  1505		dev_info(&pdev->dev, " initialized\n");
  1506	
  1507		return 0;
  1508	}
  1509	
  1510	static void pmc_core_remove(struct platform_device *pdev)
  1511	{
  1512		struct pmc_dev *pmcdev = platform_get_drvdata(pdev);
  1513		const struct pmc *pmc = pmcdev->pmcs[PMC_IDX_MAIN];
  1514		const struct pmc_reg_map *map = pmc->map;
  1515	
  1516		if (map->acpi_pm_tmr_ctl_offset)
> 1517			acpi_pmtmr_unregister_suspend_resume_callback();
  1518	
  1519		pmc_core_dbgfs_unregister(pmcdev);
  1520		pmc_core_clean_structure(pdev);
  1521	}
  1522	

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux