Hi wanghaibin,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: dd14d8eb16732508135cd386c09cc747615571f7 commit: e4c0f18287a89cbdf34dffd6ac672d89e8add238 [2583/2583] virt_plat_dev: Register the virt platform device driver config: arm64-randconfig-003-20241216 (https://download.01.org/0day-ci/archive/20241216/202412161357.rpwPDaPz-lkp@i...) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241216/202412161357.rpwPDaPz-lkp@i...)
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/202412161357.rpwPDaPz-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/misc/virt_plat_dev.c: In function 'virt_device_probe': drivers/misc/virt_plat_dev.c:37:43: error: implicit declaration of function 'vp_get_irq_domain'; did you mean 'dev_get_msi_domain'? [-Werror=implicit-function-declaration] 37 | struct irq_domain *vp_irqdomain = vp_get_irq_domain(); | ^~~~~~~~~~~~~~~~~ | dev_get_msi_domain
drivers/misc/virt_plat_dev.c:37:43: warning: initialization of 'struct irq_domain *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
vim +37 drivers/misc/virt_plat_dev.c
31 32 static int virt_device_probe(struct platform_device *pdev) 33 { 34 struct msi_desc *desc; 35 unsigned int *drvdata = dev_get_drvdata(&pdev->dev); 36 unsigned int nvec = *drvdata;
37 struct irq_domain *vp_irqdomain = vp_get_irq_domain();
38 int ret; 39 40 if (!vp_irqdomain) 41 return -ENXIO; 42 43 virtdev_info("Allocate platform msi irqs nvecs: %d\n", nvec); 44 dev_set_msi_domain(&pdev->dev, vp_irqdomain); 45 46 ret = platform_msi_domain_alloc_irqs(&pdev->dev, nvec, 47 virt_write_msi_msg); 48 if (ret) { 49 pr_err("Allocate platform msi irqs failed %d\n", ret); 50 goto error; 51 } 52 53 virtdev_info("Allocate platform msi irqs succeed\n"); 54 for_each_msi_entry(desc, &pdev->dev) { 55 virtdev_info("Request irq %d\n", desc->irq); 56 ret = request_irq(desc->irq, virt_irq_handle, 0, 57 "virt_dev_host", pdev); 58 if (ret) { 59 pr_err("Request irq %d failed %d\n", desc->irq, ret); 60 goto error_free_irqs; 61 } 62 } 63 64 virtdev_info("Init virtual platform device driver successfully.\n"); 65 return 0; 66 67 error_free_irqs: 68 for_each_msi_entry(desc, &pdev->dev) 69 free_irq(desc->irq, pdev); 70 71 platform_msi_domain_free_irqs(&pdev->dev); 72 error: 73 return ret; 74 } 75