[PATCH v6 3/5] mailbox: add support for clients to request channels by args
kernel test robot
lkp at intel.com
Sat Dec 21 00:27:12 PST 2024
Hi Tudor,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 78d4f34e2115b517bcbfe7ec0d018bbbb6f9b0b8]
url: https://github.com/intel-lab-lkp/linux/commits/Tudor-Ambarus/dt-bindings-mailbox-allow-mbox-cells-0/20241220-215938
base: 78d4f34e2115b517bcbfe7ec0d018bbbb6f9b0b8
patch link: https://lore.kernel.org/r/20241220-acpm-v4-upstream-mbox-v6-3-a6942806e52a%40linaro.org
patch subject: [PATCH v6 3/5] mailbox: add support for clients to request channels by args
config: x86_64-buildonly-randconfig-001-20241221 (https://download.01.org/0day-ci/archive/20241221/202412211604.qPMHGnk0-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241221/202412211604.qPMHGnk0-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412211604.qPMHGnk0-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/mailbox/mailbox.c:486: warning: Function parameter or struct member 'mbox_spec' not described in 'mbox_request_channel_by_args'
>> drivers/mailbox/mailbox.c:486: warning: Excess function parameter 'spec' description in 'mbox_request_channel_by_args'
vim +486 drivers/mailbox/mailbox.c
469
470 /**
471 * mbox_request_channel_by_args - request a mailbox channel using client's
472 * channel identifiers.
473 * @cl: identity of the client requesting the channel.
474 * @index: index of mailbox specifier in 'mboxes' property.
475 * @spec: arguments that describe the channel.
476 *
477 * Used by clients that can discover the channel identifiers at runtime (by
478 * parsing a shared memory for example). The description of
479 * mbox_request_channel() applies here as well.
480 *
481 * Return: Pointer to the channel assigned to the client if successful.
482 * ERR_PTR for request failure.
483 */
484 struct mbox_chan *mbox_request_channel_by_args(struct mbox_client *cl,
485 int index, const struct mbox_xlate_args *mbox_spec)
> 486 {
487 struct of_phandle_args of_args;
488 struct device *dev = cl->dev;
489 struct mbox_controller *mbox;
490 struct mbox_chan *chan;
491 int ret;
492
493 if (!dev || !dev->of_node) {
494 pr_debug("%s: No owner device node\n", __func__);
495 return ERR_PTR(-ENODEV);
496 }
497
498 if (of_parse_phandle_with_args(dev->of_node, "mboxes",
499 "#mbox-cells", index, &of_args)) {
500 dev_dbg(dev, "%s: can't parse \"mboxes\" property\n", __func__);
501 return ERR_PTR(-ENODEV);
502 }
503
504 mutex_lock(&con_mutex);
505
506 chan = ERR_PTR(-EPROBE_DEFER);
507 list_for_each_entry(mbox, &mbox_cons, node)
508 if (mbox->dev->of_node == of_args.np && mbox->xlate) {
509 chan = mbox->xlate(mbox, mbox_spec);
510 if (!IS_ERR(chan))
511 break;
512 }
513
514 of_node_put(of_args.np);
515
516 if (IS_ERR(chan)) {
517 mutex_unlock(&con_mutex);
518 return chan;
519 }
520
521 ret = __mbox_bind_client(chan, cl);
522 if (ret)
523 chan = ERR_PTR(ret);
524
525 mutex_unlock(&con_mutex);
526 return chan;
527 }
528 EXPORT_SYMBOL_GPL(mbox_request_channel_by_args);
529
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the linux-arm-kernel
mailing list