Re: [PATCH v1 2/4] mhi_bus: controller: MHI support for QCOM modems

From: kbuild test robot
Date: Fri Apr 27 2018 - 23:05:45 EST


Hi Sujeev,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.17-rc2 next-20180426]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Sujeev-Dias/mhi_bus-core-Add-support-for-MHI-host-interface/20180428-065959
config: alpha-allmodconfig (attached as .config)
compiler: alpha-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=alpha

All errors (new ones prefixed by >>):

In file included from drivers/bus/mhi/controllers/mhi_qcom.c:25:0:
include/linux/mhi.h:658:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
static inlint int mhi_force_rddm_mode(struct mhi_controller *mhi_cntrl)
^~~
drivers/bus/mhi/controllers/mhi_qcom.c: In function 'mhi_platform_probe':
>> drivers/bus/mhi/controllers/mhi_qcom.c:587:17: error: implicit declaration of function 'memblock_start_of_DRAM'; did you mean 'memblock_alloc'? [-Werror=implicit-function-declaration]
addr_win[0] = memblock_start_of_DRAM();
^~~~~~~~~~~~~~~~~~~~~~
memblock_alloc
>> drivers/bus/mhi/controllers/mhi_qcom.c:588:17: error: implicit declaration of function 'memblock_end_of_DRAM'; did you mean 'memblock_alloc'? [-Werror=implicit-function-declaration]
addr_win[1] = memblock_end_of_DRAM();
^~~~~~~~~~~~~~~~~~~~
memblock_alloc
At top level:
drivers/bus/mhi/controllers/mhi_qcom.c:238:12: warning: 'mhi_system_resume' defined but not used [-Wunused-function]
static int mhi_system_resume(struct device *dev)
^~~~~~~~~~~~~~~~~
drivers/bus/mhi/controllers/mhi_qcom.c:186:12: warning: 'mhi_runtime_idle' defined but not used [-Wunused-function]
static int mhi_runtime_idle(struct device *dev)
^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

vim +587 drivers/bus/mhi/controllers/mhi_qcom.c

533
534 static int mhi_platform_probe(struct platform_device *pdev)
535 {
536 struct mhi_controller *mhi_cntrl;
537 struct mhi_dev *mhi_dev;
538 struct device_node *of_node = pdev->dev.of_node;
539 u64 addr_win[2];
540 int ret;
541
542 if (!of_node)
543 return -ENODEV;
544
545 mhi_cntrl = mhi_alloc_controller(sizeof(*mhi_dev));
546 if (!mhi_cntrl)
547 return -ENOMEM;
548
549 mhi_dev = mhi_controller_get_devdata(mhi_cntrl);
550
551 /* get pci bus topology for this node */
552 ret = of_property_read_u32(of_node, "qcom,pci-dev-id",
553 &mhi_cntrl->dev_id);
554 if (ret)
555 mhi_cntrl->dev_id = PCI_ANY_ID;
556
557 ret = of_property_read_u32(of_node, "qcom,pci-domain",
558 &mhi_cntrl->domain);
559 if (ret)
560 goto error_probe;
561
562 ret = of_property_read_u32(of_node, "qcom,pci-bus", &mhi_cntrl->bus);
563 if (ret)
564 goto error_probe;
565
566 ret = of_property_read_u32(of_node, "qcom,pci-slot", &mhi_cntrl->slot);
567 if (ret)
568 goto error_probe;
569
570 ret = of_property_read_u32(of_node, "qcom,smmu-cfg",
571 &mhi_dev->smmu_cfg);
572 if (ret)
573 goto error_probe;
574
575 /* if s1 translation enabled pull iova addr from dt */
576 if (mhi_dev->smmu_cfg & MHI_SMMU_ATTACH &&
577 !(mhi_dev->smmu_cfg & MHI_SMMU_S1_BYPASS)) {
578 ret = of_property_count_elems_of_size(of_node, "qcom,addr-win",
579 sizeof(addr_win));
580 if (ret != 1)
581 goto error_probe;
582 ret = of_property_read_u64_array(of_node, "qcom,addr-win",
583 addr_win, 2);
584 if (ret)
585 goto error_probe;
586 } else {
> 587 addr_win[0] = memblock_start_of_DRAM();
> 588 addr_win[1] = memblock_end_of_DRAM();
589 }
590
591 mhi_dev->iova_start = addr_win[0];
592 mhi_dev->iova_stop = addr_win[1];
593
594 /*
595 * if S1 is enabled, set MHI_CTRL start address to 0 so we can use low
596 * level mapping api to map buffers outside of smmu domain
597 */
598 if (mhi_dev->smmu_cfg & MHI_SMMU_ATTACH &&
599 !(mhi_dev->smmu_cfg & MHI_SMMU_S1_BYPASS))
600 mhi_cntrl->iova_start = 0;
601 else
602 mhi_cntrl->iova_start = addr_win[0];
603
604 mhi_cntrl->iova_stop = mhi_dev->iova_stop;
605 mhi_cntrl->of_node = of_node;
606
607 /* setup power management apis */
608 mhi_cntrl->status_cb = mhi_status_cb;
609 mhi_cntrl->runtime_get = mhi_runtime_get;
610 mhi_cntrl->runtime_put = mhi_runtime_put;
611 mhi_cntrl->link_status = mhi_link_status;
612
613 mhi_dev->pdev = pdev;
614
615 ret = mhi_arch_platform_init(mhi_dev);
616 if (ret)
617 goto error_probe;
618
619 ret = of_register_mhi_controller(mhi_cntrl);
620 if (ret)
621 goto error_register;
622
623 if (mhi_cntrl->parent)
624 debugfs_create_file("debug_mode", 0444, mhi_cntrl->parent,
625 mhi_cntrl, &debugfs_debug_ops);
626
627 return 0;
628
629 error_register:
630 mhi_arch_platform_deinit(mhi_dev);
631
632 error_probe:
633 mhi_free_controller(mhi_cntrl);
634
635 return -EINVAL;
636 };
637

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip