[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 Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx/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@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405011421.mkr5FHdn-lkp@xxxxxxxxx/

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




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux