[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202109171042.nC2FFhrd-lkp@intel.com>
Date: Fri, 17 Sep 2021 10:57:49 +0800
From: kernel test robot <lkp@...el.com>
To: Megha Dey <megha.dey@...el.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [meghadey-crypto:d_msix_one 6/8] kernel/irq/msi.c:122:13: error:
implicit declaration of function 'pci_msix_vec_count'
tree: https://github.com/meghadey/crypto d_msix_one
head: 4be770bef76cb82a55b8a326633ff21445005359
commit: 674fc64a4f0d8a565823bd33307800c1494c4e1c [6/8] PCI/MSI: Enable dynamic allocation of MSI-X vectors
config: arm64-randconfig-r006-20210916 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c8b3d7d6d6de37af68b2f379d0e37304f78e115f)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/meghadey/crypto/commit/674fc64a4f0d8a565823bd33307800c1494c4e1c
git remote add meghadey-crypto https://github.com/meghadey/crypto
git fetch --no-tags meghadey-crypto d_msix_one
git checkout 674fc64a4f0d8a565823bd33307800c1494c4e1c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
>> kernel/irq/msi.c:122:13: error: implicit declaration of function 'pci_msix_vec_count' [-Werror,-Wimplicit-function-declaration]
num_msi = pci_msix_vec_count(to_pci_dev(dev));
^
1 error generated.
vim +/pci_msix_vec_count +122 kernel/irq/msi.c
96
97 /**
98 * msi_populate_sysfs - Populate msi_irqs sysfs entries for devices
99 * @dev: The device(PCI, platform etc) who will get sysfs entries
100 *
101 * Return attribute_group ** so that specific bus MSI can save it to
102 * somewhere during initilizing msi irqs. If devices has no MSI irq,
103 * return NULL; if it fails to populate sysfs, return ERR_PTR
104 */
105 const struct attribute_group **msi_populate_sysfs(struct device *dev)
106 {
107 const struct attribute_group **msi_irq_groups;
108 struct attribute **msi_attrs, *msi_attr;
109 struct device_attribute *msi_dev_attr;
110 struct attribute_group *msi_irq_group;
111 struct msi_desc *entry;
112 int ret = -ENOMEM;
113 int num_msi = 0;
114 int count = 0;
115 int i;
116
117 entry = first_msi_entry(dev);
118 if (IS_ENABLED(CONFIG_PCI) && IS_ENABLED(CONFIG_PCI_MSI) && entry->msi_attrib.is_msix) {
119 /* Since msi-x vectors can be allocated multiple times,
120 * allocate maximum no. of vectors supported by the device
121 */
> 122 num_msi = pci_msix_vec_count(to_pci_dev(dev));
123 } else {
124 /* Determine how many msi entries we have */
125 for_each_msi_entry(entry, dev)
126 num_msi += entry->nvec_used;
127 }
128
129 if (!num_msi)
130 return NULL;
131
132 /* Dynamically create the MSI attributes for the device */
133 msi_attrs = kcalloc(num_msi + 1, sizeof(void *), GFP_KERNEL);
134 if (!msi_attrs)
135 return ERR_PTR(-ENOMEM);
136
137 for_each_msi_entry(entry, dev) {
138 for (i = 0; i < entry->nvec_used; i++) {
139 msi_dev_attr = kzalloc(sizeof(*msi_dev_attr), GFP_KERNEL);
140 if (!msi_dev_attr)
141 goto error_attrs;
142 msi_attrs[count] = &msi_dev_attr->attr;
143
144 sysfs_attr_init(&msi_dev_attr->attr);
145 msi_dev_attr->attr.name = kasprintf(GFP_KERNEL, "%d",
146 entry->irq + i);
147 if (!msi_dev_attr->attr.name)
148 goto error_attrs;
149 msi_dev_attr->attr.mode = 0444;
150 msi_dev_attr->show = msi_mode_show;
151 ++count;
152 }
153 }
154
155 msi_irq_group = kzalloc(sizeof(*msi_irq_group), GFP_KERNEL);
156 if (!msi_irq_group)
157 goto error_attrs;
158 msi_irq_group->name = "msi_irqs";
159 msi_irq_group->attrs = msi_attrs;
160
161 msi_irq_groups = kcalloc(2, sizeof(void *), GFP_KERNEL);
162 if (!msi_irq_groups)
163 goto error_irq_group;
164 msi_irq_groups[0] = msi_irq_group;
165
166 ret = sysfs_create_groups(&dev->kobj, msi_irq_groups);
167 if (ret)
168 goto error_irq_groups;
169
170 return msi_irq_groups;
171
172 error_irq_groups:
173 kfree(msi_irq_groups);
174 error_irq_group:
175 kfree(msi_irq_group);
176 error_attrs:
177 count = 0;
178 msi_attr = msi_attrs[count];
179 while (msi_attr) {
180 msi_dev_attr = container_of(msi_attr, struct device_attribute, attr);
181 kfree(msi_attr->name);
182 kfree(msi_dev_attr);
183 ++count;
184 msi_attr = msi_attrs[count];
185 }
186 kfree(msi_attrs);
187 return ERR_PTR(ret);
188 }
189
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (35226 bytes)
Powered by blists - more mailing lists