From: kernel test robot <lkp@intel.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [vireshk:virtio/msg 6/10] drivers/virtio/virtio_msg_ffa.c:275:29: error: 'struct device' has no member named 'dma_ops'
Date: Sat, 26 Oct 2024 05:48:03 +0800 [thread overview]
Message-ID: <202410260557.DnimnWM9-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/linux.git virtio/msg
head: 1ee7d4424b5fb877c9020b7426879470c2d47125
commit: 9434751ce7a253179363e854b6ed1796f62a338a [6/10] virtio: msg: Add DMA OPs support
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20241026/202410260557.DnimnWM9-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241026/202410260557.DnimnWM9-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410260557.DnimnWM9-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/virtio/virtio_msg_ffa.c: In function 'virtio_msg_ffa_probe':
>> drivers/virtio/virtio_msg_ffa.c:275:29: error: 'struct device' has no member named 'dma_ops'
275 | ffa_dev->dev.dma_ops = &virtio_msg_dma_ops;
| ^
drivers/virtio/virtio_msg_ffa.c: At top level:
drivers/virtio/virtio_msg_ffa.c:86:12: warning: 'vmsg_ffa_bus_error' defined but not used [-Wunused-function]
86 | static int vmsg_ffa_bus_error(struct virtio_msg_ffa_device *vmfdev)
| ^~~~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for GET_FREE_REGION
Depends on [n]: SPARSEMEM [=n]
Selected by [m]:
- RESOURCE_KUNIT_TEST [=m] && RUNTIME_TESTING_MENU [=y] && KUNIT [=m]
vim +275 drivers/virtio/virtio_msg_ffa.c
252
253 static int virtio_msg_ffa_probe(struct ffa_device *ffa_dev)
254 {
255 struct virtio_msg_ffa_device *vmfdev;
256 struct device *dev = &ffa_dev->dev;
257 struct virtio_msg_device *vmdev;
258 u64 features, count;
259 int ret, i;
260
261 vmfdev = devm_kzalloc(dev, sizeof(*vmfdev), GFP_KERNEL);
262 if (!vmfdev)
263 return -ENOMEM;
264
265 ffa_dev->ops->msg_ops->mode_32bit_set(ffa_dev);
266
267 ida_init(&vmfdev->area_id_map);
268
269 vmfdev->ffa_dev = ffa_dev;
270 INIT_LIST_HEAD(&vmfdev->area_list);
271 mutex_init(&vmfdev->lock);
272
273 /* Set DMA OPs for the channel bus device */
274 if (IS_REACHABLE(CONFIG_VIRTIO_MSG_DMA_OPS))
> 275 ffa_dev->dev.dma_ops = &virtio_msg_dma_ops;
276
277 ret = vmsg_ffa_bus_activate(vmfdev, &features, &count);
278 if (ret)
279 goto ida_free;
280
281 /* We only support direct messages for now */
282 if (!(features & VIRTIO_MSG_FFA_FEATURE_DIRECT_MSG_SUPP)) {
283 ret = -ENODEV;
284 goto out;
285 }
286
287 /* FIXME: Don't support indirect messages for now */
288 features &= ~VIRTIO_MSG_FFA_FEATURE_INDIRECT_MSG_SUPP;
289
290 if (!count) {
291 ret = -ENODEV;
292 goto out;
293 }
294
295 ret = vmsg_ffa_bus_configure(vmfdev, features);
296 if (ret)
297 goto out;
298
299 vmfdev->vmdevs = devm_kcalloc(dev, count, sizeof(*vmfdev->vmdevs), GFP_KERNEL);
300 if (!vmfdev->vmdevs) {
301 ret = -ENOMEM;
302 goto out;
303 }
304
305 for (i = 0; i < count; i++) {
306 vmdev = &vmfdev->vmdevs[i];
307 vmdev->dev_id = i;
308 vmdev->ops = &vmf_ops;
309 vmdev->vdev.dev.parent = &ffa_dev->dev;
310 vmdev->priv = vmfdev;
311
312 /*
313 * Register all virtio devices, they will fetch their ids and
314 * register the right device type.
315 */
316 ret = virtio_msg_register(vmdev);
317 if (ret)
318 pr_err("Failed to register virtio msg device with id: %d\n", i);
319 }
320
321 ffa_dev_set_drvdata(ffa_dev, vmfdev);
322 return 0;
323
324 out:
325 vmsg_ffa_bus_deactivate(vmfdev);
326 ida_free:
327 ida_destroy(&vmfdev->area_id_map);
328 return ret;
329
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-10-25 21:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202410260557.DnimnWM9-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=viresh.kumar@linaro.org \
/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.