[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202108291620.n2E6hKGY-lkp@intel.com>
Date: Sun, 29 Aug 2021 16:26:25 +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 1/1] kernel/irq/msi.c:122:30: error: no
member named 'msix_vec_cnt' in 'struct pci_dev'
tree: https://github.com/meghadey/crypto d_msix
head: 2c80823a6d6f4430df957092cbd837b55d52e3ae
commit: 2c80823a6d6f4430df957092cbd837b55d52e3ae [1/1] PCI/MSI: Dynamic allocation of MSI-X vectors
config: arm64-randconfig-r003-20210829 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 510e106fa8635e7f9c51c896180b971de6309b2f)
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/2c80823a6d6f4430df957092cbd837b55d52e3ae
git remote add meghadey-crypto https://github.com/meghadey/crypto
git fetch --no-tags meghadey-crypto d_msix
git checkout 2c80823a6d6f4430df957092cbd837b55d52e3ae
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash kernel/irq/
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:30: error: no member named 'msix_vec_cnt' in 'struct pci_dev'
num_msi = to_pci_dev(dev)->msix_vec_cnt;
~~~~~~~~~~~~~~~ ^
1 error generated.
vim +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 (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 = to_pci_dev(dev)->msix_vec_cnt;
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" (36246 bytes)
Powered by blists - more mailing lists