llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: [pinchartl-media:streams/v6.0/v11 34/49] drivers/media/v4l2-core/v4l2-subdev.c:931:2: error: call to undeclared function 'for_each_active_route'; ISO C99 and later do not support implicit function declarations
Date: Thu, 8 Sep 2022 06:38:40 +0800	[thread overview]
Message-ID: <202209080614.TwoNgZoW-lkp@intel.com> (raw)

tree:   git://linuxtv.org/pinchartl/media.git streams/v6.0/v11
head:   c8cf58f00bee6d4f43462b3e3f83ef516c594d61
commit: 9fc634e7ac71c145523c64f734836068ee14a4e8 [34/49] media: subdev: use for_each_active_route() in v4l2_subdev_init_stream_configs()
config: arm-randconfig-r002-20220907 (https://download.01.org/0day-ci/archive/20220908/202209080614.TwoNgZoW-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project c55b41d5199d2394dd6cdb8f52180d8b81d809d4)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        git remote add pinchartl-media git://linuxtv.org/pinchartl/media.git
        git fetch --no-tags pinchartl-media streams/v6.0/v11
        git checkout 9fc634e7ac71c145523c64f734836068ee14a4e8
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/media/v4l2-core/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/media/v4l2-core/v4l2-subdev.c:157:8: error: call to undeclared function 'v4l2_subdev_state_get_stream_format'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                   if (!v4l2_subdev_state_get_stream_format(state, pad, stream))
                        ^
>> drivers/media/v4l2-core/v4l2-subdev.c:931:2: error: call to undeclared function 'for_each_active_route'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           for_each_active_route(routing, route) {
           ^
>> drivers/media/v4l2-core/v4l2-subdev.c:931:39: error: expected ';' after expression
           for_each_active_route(routing, route) {
                                                ^
                                                ;
   drivers/media/v4l2-core/v4l2-subdev.c:955:39: error: expected ';' after expression
           for_each_active_route(routing, route) {
                                                ^
                                                ;
   4 errors generated.


vim +/for_each_active_route +931 drivers/media/v4l2-core/v4l2-subdev.c

   917	
   918	static int
   919	v4l2_subdev_init_stream_configs(struct v4l2_subdev_stream_configs *stream_configs,
   920					const struct v4l2_subdev_krouting *routing)
   921	{
   922		struct v4l2_subdev_route *route;
   923		u32 num_configs = 0;
   924		u32 format_idx = 0;
   925	
   926		kvfree(stream_configs->configs);
   927		stream_configs->configs = NULL;
   928		stream_configs->num_configs = 0;
   929	
   930		/* Count number of formats needed */
 > 931		for_each_active_route(routing, route) {
   932			/*
   933			 * Each route needs a format on both ends of the route, except
   934			 * for source streams which only need one format.
   935			 */
   936			num_configs +=
   937				(route->flags & V4L2_SUBDEV_ROUTE_FL_SOURCE) ? 1 : 2;
   938		}
   939	
   940		if (!num_configs)
   941			return 0;
   942	
   943		stream_configs->configs = kvcalloc(num_configs,
   944			sizeof(*stream_configs->configs), GFP_KERNEL);
   945	
   946		if (!stream_configs->configs)
   947			return -ENOMEM;
   948	
   949		stream_configs->num_configs = num_configs;
   950	
   951		/*
   952		 * Fill in the 'pad' and stream' value for each item in the array from
   953		 * the routing table
   954		 */
   955		for_each_active_route(routing, route) {
   956			u32 idx;
   957	
   958			if (!(route->flags & V4L2_SUBDEV_ROUTE_FL_SOURCE)) {
   959				idx = format_idx++;
   960	
   961				stream_configs->configs[idx].pad = route->sink_pad;
   962				stream_configs->configs[idx].stream = route->sink_stream;
   963			}
   964	
   965			idx = format_idx++;
   966	
   967			stream_configs->configs[idx].pad = route->source_pad;
   968			stream_configs->configs[idx].stream = route->source_stream;
   969		}
   970	
   971		return 0;
   972	}
   973	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-09-07 22:39 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=202209080614.TwoNgZoW-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=tomi.valkeinen@ideasonboard.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 NNTP newsgroup(s).