From: kernel test robot <lkp@intel.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-media@vger.kernel.org
Subject: [sailus-media-tree:ipu6 40/50] drivers/media/v4l2-core/v4l2-common.c:512:23: error: implicit declaration of function 'v4l2_subdev_call_op'; did you mean 'v4l2_subdev_has_op'?
Date: Wed, 1 May 2024 14:32:55 +0800 [thread overview]
Message-ID: <202405011421.mkr5FHdn-lkp@intel.com> (raw)
tree: git://linuxtv.org/sailus/media_tree.git ipu6
head: 308898eb3af1c6530b122a01a5c4b38931717e70
commit: 68213f72d8c806ff6968fb30c4bf61fd1257c4a3 [40/50] media: v4l: Support obtaining link frequency via get_mbus_config
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20240501/202405011421.mkr5FHdn-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240501/202405011421.mkr5FHdn-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/202405011421.mkr5FHdn-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/media/v4l2-core/v4l2-common.c: In function '__v4l2_get_link_freq':
>> drivers/media/v4l2-core/v4l2-common.c:512:23: error: implicit declaration of function 'v4l2_subdev_call_op'; did you mean 'v4l2_subdev_has_op'? [-Werror=implicit-function-declaration]
512 | ret = v4l2_subdev_call_op(sd, pad, get_mbus_config,
| ^~~~~~~~~~~~~~~~~~~
| v4l2_subdev_has_op
>> drivers/media/v4l2-core/v4l2-common.c:512:47: error: 'pad' undeclared (first use in this function); did you mean 'pid'?
512 | ret = v4l2_subdev_call_op(sd, pad, get_mbus_config,
| ^~~
| pid
drivers/media/v4l2-core/v4l2-common.c:512:47: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/media/v4l2-core/v4l2-common.c:512:52: error: 'get_mbus_config' undeclared (first use in this function); did you mean 'mbus_config'?
512 | ret = v4l2_subdev_call_op(sd, pad, get_mbus_config,
| ^~~~~~~~~~~~~~~
| mbus_config
In file included from include/linux/linkage.h:7,
from include/linux/preempt.h:10,
from include/linux/spinlock.h:56,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:17,
from drivers/media/v4l2-core/v4l2-common.c:37:
drivers/media/v4l2-core/v4l2-common.c: At top level:
drivers/media/v4l2-core/v4l2-common.c:522:19: error: 'v4l2_get_link_freq' undeclared here (not in a function)
522 | EXPORT_SYMBOL_GPL(v4l2_get_link_freq);
| ^~~~~~~~~~~~~~~~~~
include/linux/export.h:56:23: note: in definition of macro '__EXPORT_SYMBOL'
56 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:69:41: note: in expansion of macro '_EXPORT_SYMBOL'
69 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "GPL")
| ^~~~~~~~~~~~~~
drivers/media/v4l2-core/v4l2-common.c:522:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
522 | EXPORT_SYMBOL_GPL(v4l2_get_link_freq);
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +512 drivers/media/v4l2-core/v4l2-common.c
466
467 s64 __v4l2_get_link_freq(struct v4l2_subdev *sd,
468 struct v4l2_ctrl_handler *handler, unsigned int mul,
469 unsigned int div)
470 {
471 struct v4l2_ctrl *ctrl;
472 s64 freq;
473
474 if (!handler && sd)
475 handler = sd->ctrl_handler;
476
477 ctrl = v4l2_ctrl_find(handler, V4L2_CID_LINK_FREQ);
478 if (ctrl) {
479 struct v4l2_querymenu qm = { .id = V4L2_CID_LINK_FREQ };
480 int ret;
481
482 if (ctrl->type == V4L2_CTRL_TYPE_INTEGER64)
483 return v4l2_ctrl_g_ctrl_int64(ctrl);
484
485 qm.index = v4l2_ctrl_g_ctrl(ctrl);
486
487 ret = v4l2_querymenu(handler, &qm);
488 if (ret)
489 return -ENOENT;
490
491 freq = qm.value;
492 } else {
493 if (!mul || !div)
494 return -ENOENT;
495
496 ctrl = v4l2_ctrl_find(handler, V4L2_CID_PIXEL_RATE);
497 if (!ctrl)
498 return -ENOENT;
499
500 freq = div_u64(v4l2_ctrl_g_ctrl_int64(ctrl) * mul, div);
501
502 pr_warn("%s: Link frequency estimated using pixel rate: result might be inaccurate\n",
503 __func__);
504 pr_warn("%s: Consider implementing support for V4L2_CID_LINK_FREQ in the transmitter driver\n",
505 __func__);
506 }
507
508 if (freq <= 0 && sd) {
509 struct v4l2_mbus_config mbus_config = {};
510 int ret;
511
> 512 ret = v4l2_subdev_call_op(sd, pad, get_mbus_config,
513 &mbus_config);
514 if (ret < 0)
515 return ret;
516
517 return mbus_config.link_freq;
518 }
519
520 return freq > 0 ? freq : -EINVAL;
521 }
522 EXPORT_SYMBOL_GPL(v4l2_get_link_freq);
523
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-05-01 6:33 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=202405011421.mkr5FHdn-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-media@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=sakari.ailus@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).