From: kernel test robot <lkp@intel.com>
To: Megha Dey <megha.dey@intel.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org
Subject: [meghadey-crypto:d_msix 1/1] kernel/irq/msi.c:122:18: error: no member named 'msix_vec_cnt' in 'struct device'
Date: Sun, 29 Aug 2021 07:02:36 +0800 [thread overview]
Message-ID: <202108290734.1tX5vZXU-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4676 bytes --]
tree: https://github.com/meghadey/crypto d_msix
head: 79d00034e6be06a69194e0fa4e0ec67d9db5c5de
commit: 79d00034e6be06a69194e0fa4e0ec67d9db5c5de [1/1] PCI/MSI: Dynamic allocation of MSI-X vectors
config: x86_64-randconfig-r004-20210829 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 4e1a164d7bd53653f79decc121afe784d2fde0a7)
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
# https://github.com/meghadey/crypto/commit/79d00034e6be06a69194e0fa4e0ec67d9db5c5de
git remote add meghadey-crypto https://github.com/meghadey/crypto
git fetch --no-tags meghadey-crypto d_msix
git checkout 79d00034e6be06a69194e0fa4e0ec67d9db5c5de
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> kernel/irq/msi.c:122:18: error: no member named 'msix_vec_cnt' in 'struct device'
num_msi = 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 = 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
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36206 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [meghadey-crypto:d_msix 1/1] kernel/irq/msi.c:122:18: error: no member named 'msix_vec_cnt' in 'struct device'
Date: Sun, 29 Aug 2021 07:02:36 +0800 [thread overview]
Message-ID: <202108290734.1tX5vZXU-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4805 bytes --]
tree: https://github.com/meghadey/crypto d_msix
head: 79d00034e6be06a69194e0fa4e0ec67d9db5c5de
commit: 79d00034e6be06a69194e0fa4e0ec67d9db5c5de [1/1] PCI/MSI: Dynamic allocation of MSI-X vectors
config: x86_64-randconfig-r004-20210829 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 4e1a164d7bd53653f79decc121afe784d2fde0a7)
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
# https://github.com/meghadey/crypto/commit/79d00034e6be06a69194e0fa4e0ec67d9db5c5de
git remote add meghadey-crypto https://github.com/meghadey/crypto
git fetch --no-tags meghadey-crypto d_msix
git checkout 79d00034e6be06a69194e0fa4e0ec67d9db5c5de
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> kernel/irq/msi.c:122:18: error: no member named 'msix_vec_cnt' in 'struct device'
num_msi = 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 = 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(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36206 bytes --]
next reply other threads:[~2021-08-28 23:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-28 23:02 kernel test robot [this message]
2021-08-28 23:02 ` [meghadey-crypto:d_msix 1/1] kernel/irq/msi.c:122:18: error: no member named 'msix_vec_cnt' in 'struct device' kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202108290734.1tX5vZXU-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=megha.dey@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.