[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201804281044.CzuyqYbe%fengguang.wu@intel.com>
Date: Sat, 28 Apr 2018 11:12:41 +0800
From: kbuild test robot <lkp@...el.com>
To: Sujeev Dias <sdias@...eaurora.org>
Cc: kbuild-all@...org, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Arnd Bergmann <arnd@...db.de>,
Sujeev Dias <sdias@...eaurora.org>,
linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
Tony Truong <truong@...eaurora.org>
Subject: Re: [PATCH v1 2/4] mhi_bus: controller: MHI support for QCOM modems
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: openrisc-allmodconfig (attached as .config)
compiler: or1k-linux-gcc (GCC) 6.0.0 20160327 (experimental)
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=openrisc
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_deinit_pci_dev':
>> drivers/bus/mhi/controllers/mhi_qcom.c:46:2: error: implicit declaration of function 'pci_free_irq_vectors' [-Werror=implicit-function-declaration]
pci_free_irq_vectors(pci_dev);
^~~~~~~~~~~~~~~~~~~~
>> drivers/bus/mhi/controllers/mhi_qcom.c:51:2: error: implicit declaration of function 'pci_clear_master' [-Werror=implicit-function-declaration]
pci_clear_master(pci_dev);
^~~~~~~~~~~~~~~~
>> drivers/bus/mhi/controllers/mhi_qcom.c:52:2: error: implicit declaration of function 'pci_release_region' [-Werror=implicit-function-declaration]
pci_release_region(pci_dev, mhi_dev->resn);
^~~~~~~~~~~~~~~~~~
drivers/bus/mhi/controllers/mhi_qcom.c: In function 'mhi_init_pci_dev':
>> drivers/bus/mhi/controllers/mhi_qcom.c:77:8: error: implicit declaration of function 'pci_request_region' [-Werror=implicit-function-declaration]
ret = pci_request_region(pci_dev, mhi_dev->resn, "mhi");
^~~~~~~~~~~~~~~~~~
>> drivers/bus/mhi/controllers/mhi_qcom.c:93:8: error: implicit declaration of function 'pci_alloc_irq_vectors' [-Werror=implicit-function-declaration]
ret = pci_alloc_irq_vectors(pci_dev, mhi_cntrl->msi_required,
^~~~~~~~~~~~~~~~~~~~~
>> drivers/bus/mhi/controllers/mhi_qcom.c:94:34: error: 'PCI_IRQ_MSI' undeclared (first use in this function)
mhi_cntrl->msi_required, PCI_IRQ_MSI);
^~~~~~~~~~~
drivers/bus/mhi/controllers/mhi_qcom.c:94:34: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/bus/mhi/controllers/mhi_qcom.c:109:23: error: implicit declaration of function 'pci_irq_vector' [-Werror=implicit-function-declaration]
mhi_cntrl->irq[i] = pci_irq_vector(pci_dev, i);
^~~~~~~~~~~~~~
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 +/pci_free_irq_vectors +46 drivers/bus/mhi/controllers/mhi_qcom.c
> 25 #include <linux/mhi.h>
26 #include "mhi_qcom.h"
27
28 static struct pci_device_id mhi_pcie_device_id[] = {
29 {PCI_DEVICE(MHI_PCIE_VENDOR_ID, 0x0300)},
30 {PCI_DEVICE(MHI_PCIE_VENDOR_ID, 0x0301)},
31 {PCI_DEVICE(MHI_PCIE_VENDOR_ID, 0x0302)},
32 {PCI_DEVICE(MHI_PCIE_VENDOR_ID, 0x0303)},
33 {PCI_DEVICE(MHI_PCIE_VENDOR_ID, 0x0304)},
34 {PCI_DEVICE(MHI_PCIE_VENDOR_ID, 0x0305)},
35 {PCI_DEVICE(MHI_PCIE_VENDOR_ID, MHI_PCIE_DEBUG_ID)},
36 {0},
37 };
38
39 static struct pci_driver mhi_pcie_driver;
40
41 void mhi_deinit_pci_dev(struct mhi_controller *mhi_cntrl)
42 {
43 struct mhi_dev *mhi_dev = mhi_controller_get_devdata(mhi_cntrl);
44 struct pci_dev *pci_dev = mhi_dev->pci_dev;
45
> 46 pci_free_irq_vectors(pci_dev);
47 kfree(mhi_cntrl->irq);
48 mhi_cntrl->irq = NULL;
49 iounmap(mhi_cntrl->regs);
50 mhi_cntrl->regs = NULL;
> 51 pci_clear_master(pci_dev);
> 52 pci_release_region(pci_dev, mhi_dev->resn);
53 pci_disable_device(pci_dev);
54 }
55
56 static int mhi_init_pci_dev(struct mhi_controller *mhi_cntrl)
57 {
58 struct mhi_dev *mhi_dev = mhi_controller_get_devdata(mhi_cntrl);
59 struct pci_dev *pci_dev = mhi_dev->pci_dev;
60 int ret;
61 resource_size_t start, len;
62 int i;
63
64 mhi_dev->resn = MHI_PCI_BAR_NUM;
65 ret = pci_assign_resource(pci_dev, mhi_dev->resn);
66 if (ret) {
67 MHI_ERR("Error assign pci resources, ret:%d\n", ret);
68 return ret;
69 }
70
71 ret = pci_enable_device(pci_dev);
72 if (ret) {
73 MHI_ERR("Error enabling device, ret:%d\n", ret);
74 goto error_enable_device;
75 }
76
> 77 ret = pci_request_region(pci_dev, mhi_dev->resn, "mhi");
78 if (ret) {
79 MHI_ERR("Error pci_request_region, ret:%d\n", ret);
80 goto error_request_region;
81 }
82
83 pci_set_master(pci_dev);
84
85 start = pci_resource_start(pci_dev, mhi_dev->resn);
86 len = pci_resource_len(pci_dev, mhi_dev->resn);
87 mhi_cntrl->regs = ioremap_nocache(start, len);
88 if (!mhi_cntrl->regs) {
89 MHI_ERR("Error ioremap region\n");
90 goto error_ioremap;
91 }
92
> 93 ret = pci_alloc_irq_vectors(pci_dev, mhi_cntrl->msi_required,
> 94 mhi_cntrl->msi_required, PCI_IRQ_MSI);
95 if (IS_ERR_VALUE((ulong)ret) || ret < mhi_cntrl->msi_required) {
96 MHI_ERR("Failed to enable MSI, ret:%d\n", ret);
97 goto error_req_msi;
98 }
99
100 mhi_cntrl->msi_allocated = ret;
101 mhi_cntrl->irq = kmalloc_array(mhi_cntrl->msi_allocated,
102 sizeof(*mhi_cntrl->irq), GFP_KERNEL);
103 if (!mhi_cntrl->irq) {
104 ret = -ENOMEM;
105 goto error_alloc_msi_vec;
106 }
107
108 for (i = 0; i < mhi_cntrl->msi_allocated; i++) {
> 109 mhi_cntrl->irq[i] = pci_irq_vector(pci_dev, i);
110 if (mhi_cntrl->irq[i] < 0) {
111 ret = mhi_cntrl->irq[i];
112 goto error_get_irq_vec;
113 }
114 }
115
116 dev_set_drvdata(&pci_dev->dev, mhi_cntrl);
117
118 /* configure runtime pm */
119 pm_runtime_set_autosuspend_delay(&pci_dev->dev, MHI_RPM_SUSPEND_TMR_MS);
120 pm_runtime_use_autosuspend(&pci_dev->dev);
121 pm_suspend_ignore_children(&pci_dev->dev, true);
122
123 /*
124 * pci framework will increment usage count (twice) before
125 * calling local device driver probe function.
126 * 1st pci.c pci_pm_init() calls pm_runtime_forbid
127 * 2nd pci-driver.c local_pci_probe calls pm_runtime_get_sync
128 * Framework expect pci device driver to call
129 * pm_runtime_put_noidle to decrement usage count after
130 * successful probe and and call pm_runtime_allow to enable
131 * runtime suspend.
132 */
133 pm_runtime_mark_last_busy(&pci_dev->dev);
134 pm_runtime_put_noidle(&pci_dev->dev);
135
136 return 0;
137
138 error_get_irq_vec:
139 kfree(mhi_cntrl->irq);
140 mhi_cntrl->irq = NULL;
141
142 error_alloc_msi_vec:
143 pci_free_irq_vectors(pci_dev);
144
145 error_req_msi:
146 iounmap(mhi_cntrl->regs);
147
148 error_ioremap:
149 pci_clear_master(pci_dev);
150
151 error_request_region:
152 pci_disable_device(pci_dev);
153
154 error_enable_device:
155 pci_release_region(pci_dev, mhi_dev->resn);
156
157 return ret;
158 }
159
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (44455 bytes)
Powered by blists - more mailing lists