Linux-Media Archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: llvm@lists.linux.dev, 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:9: error: implicit declaration of function 'v4l2_subdev_call_op' is invalid in C99
Date: Mon, 29 Apr 2024 22:38:08 +0800	[thread overview]
Message-ID: <202404292239.nNxjfKs4-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: arm-defconfig (https://download.01.org/0day-ci/archive/20240429/202404292239.nNxjfKs4-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240429/202404292239.nNxjfKs4-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/202404292239.nNxjfKs4-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/media/v4l2-core/v4l2-common.c:512:9: error: implicit declaration of function 'v4l2_subdev_call_op' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   ret = v4l2_subdev_call_op(sd, pad, get_mbus_config,
                         ^
   drivers/media/v4l2-core/v4l2-common.c:512:9: note: did you mean 'v4l2_subdev_cleanup'?
   include/media/v4l2-subdev.h:1320:6: note: 'v4l2_subdev_cleanup' declared here
   void v4l2_subdev_cleanup(struct v4l2_subdev *sd);
        ^
   drivers/media/v4l2-core/v4l2-common.c:512:33: error: use of undeclared identifier 'pad'
                   ret = v4l2_subdev_call_op(sd, pad, get_mbus_config,
                                                 ^
   drivers/media/v4l2-core/v4l2-common.c:512:38: error: use of undeclared identifier 'get_mbus_config'
                   ret = v4l2_subdev_call_op(sd, pad, get_mbus_config,
                                                      ^
   drivers/media/v4l2-core/v4l2-common.c:522:19: error: use of undeclared identifier 'v4l2_get_link_freq'; did you mean '__v4l2_get_link_freq'?
   EXPORT_SYMBOL_GPL(v4l2_get_link_freq);
                     ^~~~~~~~~~~~~~~~~~
                     __v4l2_get_link_freq
   include/linux/export.h:69:48: note: expanded from macro 'EXPORT_SYMBOL_GPL'
   #define EXPORT_SYMBOL_GPL(sym)          _EXPORT_SYMBOL(sym, "GPL")
                                                          ^
   include/linux/export.h:65:54: note: expanded from macro '_EXPORT_SYMBOL'
   #define _EXPORT_SYMBOL(sym, license)    __EXPORT_SYMBOL(sym, license, "")
                                                           ^
   include/linux/export.h:56:16: note: expanded from macro '__EXPORT_SYMBOL'
           extern typeof(sym) sym;                                 \
                         ^
   drivers/media/v4l2-core/v4l2-common.c:467:5: note: '__v4l2_get_link_freq' declared here
   s64 __v4l2_get_link_freq(struct v4l2_subdev *sd,
       ^
   4 errors generated.


vim +/v4l2_subdev_call_op +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-04-29 14:38 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=202404292239.nNxjfKs4-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-media@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --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).