Re: [PATCH] driver core: platform: set numa_node before platform_add_device()

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

 



Hi guojinhui.liam,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.6-rc1 next-20230912]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/guojinhui-liam/driver-core-platform-set-numa_node-before-platform_add_device/20230912-151119
base:   linus/master
patch link:    https://lore.kernel.org/r/20230912070900.1862-1-guojinhui.liam%40bytedance.com
patch subject: [PATCH] driver core: platform: set numa_node before platform_add_device()
config: powerpc-allnoconfig (https://download.01.org/0day-ci/archive/20230912/202309122309.mbxAnAIe-lkp@xxxxxxxxx/config)
compiler: powerpc-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230912/202309122309.mbxAnAIe-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/202309122309.mbxAnAIe-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   drivers/base/platform.c: In function 'platform_device_register_full':
>> drivers/base/platform.c:846:42: error: implicit declaration of function 'acpi_get_node'; did you mean 'acpi_get_name'? [-Werror=implicit-function-declaration]
     846 |                 set_dev_node(&pdev->dev, acpi_get_node(adev->handle));
         |                                          ^~~~~~~~~~~~~
         |                                          acpi_get_name
>> drivers/base/platform.c:846:60: error: invalid use of undefined type 'struct acpi_device'
     846 |                 set_dev_node(&pdev->dev, acpi_get_node(adev->handle));
         |                                                            ^~
   cc1: some warnings being treated as errors


vim +846 drivers/base/platform.c

   797	
   798	/**
   799	 * platform_device_register_full - add a platform-level device with
   800	 * resources and platform-specific data
   801	 *
   802	 * @pdevinfo: data used to create device
   803	 *
   804	 * Returns &struct platform_device pointer on success, or ERR_PTR() on error.
   805	 */
   806	struct platform_device *platform_device_register_full(
   807			const struct platform_device_info *pdevinfo)
   808	{
   809		int ret;
   810		struct platform_device *pdev;
   811		struct acpi_device *adev = to_acpi_device_node(pdevinfo->fwnode);
   812	
   813		pdev = platform_device_alloc(pdevinfo->name, pdevinfo->id);
   814		if (!pdev)
   815			return ERR_PTR(-ENOMEM);
   816	
   817		pdev->dev.parent = pdevinfo->parent;
   818		pdev->dev.fwnode = pdevinfo->fwnode;
   819		pdev->dev.of_node = of_node_get(to_of_node(pdev->dev.fwnode));
   820		pdev->dev.of_node_reused = pdevinfo->of_node_reused;
   821	
   822		if (pdevinfo->dma_mask) {
   823			pdev->platform_dma_mask = pdevinfo->dma_mask;
   824			pdev->dev.dma_mask = &pdev->platform_dma_mask;
   825			pdev->dev.coherent_dma_mask = pdevinfo->dma_mask;
   826		}
   827	
   828		ret = platform_device_add_resources(pdev,
   829				pdevinfo->res, pdevinfo->num_res);
   830		if (ret)
   831			goto err;
   832	
   833		ret = platform_device_add_data(pdev,
   834				pdevinfo->data, pdevinfo->size_data);
   835		if (ret)
   836			goto err;
   837	
   838		if (pdevinfo->properties) {
   839			ret = device_create_managed_software_node(&pdev->dev,
   840								  pdevinfo->properties, NULL);
   841			if (ret)
   842				goto err;
   843		}
   844	
   845		if (adev)
 > 846			set_dev_node(&pdev->dev, acpi_get_node(adev->handle));
   847	
   848		ret = platform_device_add(pdev);
   849		if (ret) {
   850	err:
   851			ACPI_COMPANION_SET(&pdev->dev, NULL);
   852			platform_device_put(pdev);
   853			return ERR_PTR(ret);
   854		}
   855	
   856		return pdev;
   857	}
   858	EXPORT_SYMBOL_GPL(platform_device_register_full);
   859	

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



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux