Linux Media Controller development
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Helen Koike <helen.koike@collabora.com>
Cc: kbuild-all@lists.01.org, linux-media@vger.kernel.org
Subject: Re: [PATCH v2 1/3] media: v4l2-common: add helper functions to call s_stream() callbacks
Date: Sun, 5 Apr 2020 07:01:50 +0800	[thread overview]
Message-ID: <202004050609.4GY8rmPe%lkp@intel.com> (raw)
In-Reply-To: <20200403213312.1863876-2-helen.koike@collabora.com>

[-- Attachment #1: Type: text/plain, Size: 9817 bytes --]

Hi Helen,

I love your patch! Yet something to improve:

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v5.6 next-20200404]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Helen-Koike/media-add-v4l2_pipeline_stream_-enable-disable-helpers/20200405-050004
base:   git://linuxtv.org/media_tree.git master
config: s390-randconfig-a001-20200405 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=9.3.0 make.cross ARCH=s390 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   drivers/media/v4l2-core/v4l2-common.c: In function 'v4l2_pipeline_subdevs_get':
>> drivers/media/v4l2-core/v4l2-common.c:463:37: error: 'struct video_device' has no member named 'entity'
     463 |  struct media_entity *entity = &vdev->entity;
         |                                     ^~
   In file included from include/linux/kernel.h:11,
                    from include/linux/list.h:9,
                    from include/linux/module.h:12,
                    from drivers/media/v4l2-core/v4l2-common.c:37:
>> include/linux/kernel.h:987:51: error: 'struct v4l2_subdev' has no member named 'entity'
     987 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |                                                   ^~
   include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert'
     330 |   if (!(condition))     \
         |         ^~~~~~~~~
   include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
     350 |  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:987:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     987 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |  ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:987:20: note: in expansion of macro '__same_type'
     987 |  BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
         |                    ^~~~~~~~~~~
>> include/media/v4l2-subdev.h:888:3: note: in expansion of macro 'container_of'
     888 |   container_of(__me_sd_ent, struct v4l2_subdev, entity) : \
         |   ^~~~~~~~~~~~
>> drivers/media/v4l2-core/v4l2-common.c:491:20: note: in expansion of macro 'media_entity_to_v4l2_subdev'
     491 |   subdevs[idx++] = media_entity_to_v4l2_subdev(entity);
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from <command-line>:
>> include/linux/compiler_types.h:129:35: error: 'struct v4l2_subdev' has no member named 'entity'
     129 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
         |                                   ^~~~~~~~~~~~~~~~~~
   include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
      17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
         |                                ^~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:990:21: note: in expansion of macro 'offsetof'
     990 |  ((type *)(__mptr - offsetof(type, member))); })
         |                     ^~~~~~~~
>> include/media/v4l2-subdev.h:888:3: note: in expansion of macro 'container_of'
     888 |   container_of(__me_sd_ent, struct v4l2_subdev, entity) : \
         |   ^~~~~~~~~~~~
>> drivers/media/v4l2-core/v4l2-common.c:491:20: note: in expansion of macro 'media_entity_to_v4l2_subdev'
     491 |   subdevs[idx++] = media_entity_to_v4l2_subdev(entity);
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/v4l2-core/v4l2-common.c: In function 'v4l2_pipeline_stream_enable':
   drivers/media/v4l2-core/v4l2-common.c:499:34: error: 'struct video_device' has no member named 'entity'
     499 |  struct media_device *mdev = vdev->entity.graph_obj.mdev;
         |                                  ^~
   In file included from include/linux/device.h:15,
                    from include/media/v4l2-dev.h:15,
                    from include/media/v4l2-common.h:18,
                    from drivers/media/v4l2-core/v4l2-common.c:47:
>> drivers/media/v4l2-core/v4l2-common.c:514:36: error: 'struct v4l2_subdev' has no member named 'entity'
     514 |    "enabling stream for '%s'\n", sd->entity.name);
         |                                    ^~
   include/linux/dev_printk.h:122:47: note: in definition of macro 'dev_dbg'
     122 |   dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
         |                                               ^~~~~~~~~~~
   drivers/media/v4l2-core/v4l2-common.c:529:37: error: 'struct v4l2_subdev' has no member named 'entity'
     529 |    "disabling stream for '%s'\n", sd->entity.name);
         |                                     ^~
   include/linux/dev_printk.h:122:47: note: in definition of macro 'dev_dbg'
     122 |   dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
         |                                               ^~~~~~~~~~~
   drivers/media/v4l2-core/v4l2-common.c: In function 'v4l2_pipeline_stream_disable':
   drivers/media/v4l2-core/v4l2-common.c:540:34: error: 'struct video_device' has no member named 'entity'
     540 |  struct media_device *mdev = vdev->entity.graph_obj.mdev;
         |                                  ^~
   In file included from include/linux/device.h:15,
                    from include/media/v4l2-dev.h:15,
                    from include/media/v4l2-common.h:18,
                    from drivers/media/v4l2-core/v4l2-common.c:47:
   drivers/media/v4l2-core/v4l2-common.c:554:37: error: 'struct v4l2_subdev' has no member named 'entity'
     554 |    "disabling stream for '%s'\n", sd->entity.name);
         |                                     ^~
   include/linux/dev_printk.h:122:47: note: in definition of macro 'dev_dbg'
     122 |   dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
         |                                               ^~~~~~~~~~~

vim +463 drivers/media/v4l2-core/v4l2-common.c

   444	
   445	/*
   446	 * v4l2_pipeline_subdevs_get - Assemble a list of subdevices in a pipeline
   447	 * @subdevs: the array to be filled
   448	 * @size: the array size
   449	 *
   450	 * Walk from a video node, following link from sink to source and fill the
   451	 * array with subdevices in the path.
   452	 *
   453	 * Note: this function follows the first enabled link in a sink pad found in a
   454	 * given entity. Thus it won't work if there are entities with multiple enabled
   455	 * links to its sink pads in the topology.
   456	 *
   457	 * Return the number of subdevices filled in the array.
   458	 */
   459	static unsigned int v4l2_pipeline_subdevs_get(struct video_device *vdev,
   460						      struct v4l2_subdev **subdevs,
   461						      unsigned int size)
   462	{
 > 463		struct media_entity *entity = &vdev->entity;
   464		unsigned int idx = 0;
   465	
   466		while (1) {
   467			struct media_pad *src_pad = NULL;
   468			unsigned int i;
   469	
   470			/* Find remote source pad */
   471			for (i = 0; i < entity->num_pads; i++) {
   472				struct media_pad *sink_pad = &entity->pads[i];
   473	
   474				if (!(sink_pad->flags & MEDIA_PAD_FL_SINK))
   475					continue;
   476	
   477				src_pad = media_entity_remote_pad(sink_pad);
   478				if (src_pad &&
   479				    is_media_entity_v4l2_subdev(src_pad->entity))
   480					break;
   481			}
   482			if (i == entity->num_pads)
   483				break;
   484	
   485			if (idx >= size) {
   486				WARN_ON(1);
   487				return 0;
   488			}
   489	
   490			entity = src_pad->entity;
 > 491			subdevs[idx++] = media_entity_to_v4l2_subdev(entity);
   492		}
   493	
   494		return idx;
   495	}
   496	
   497	__must_check int v4l2_pipeline_stream_enable(struct video_device *vdev)
   498	{
 > 499		struct media_device *mdev = vdev->entity.graph_obj.mdev;
   500		struct v4l2_subdev *subdevs[MEDIA_ENTITY_ENUM_MAX_DEPTH];
   501		struct v4l2_subdev *sd;
   502		unsigned int i, size;
   503		int ret;
   504	
   505		mutex_lock(&mdev->graph_mutex);
   506	
   507		size = v4l2_pipeline_subdevs_get(vdev, subdevs, ARRAY_SIZE(subdevs));
   508	
   509		for (i = 0; i < size; i++) {
   510			sd = subdevs[i];
   511			if (sd->stream_count++)
   512				continue;
   513			dev_dbg(mdev->dev,
 > 514				"enabling stream for '%s'\n", sd->entity.name);
   515			ret = v4l2_subdev_call(sd, video, s_stream, true);
   516			if (ret && ret != -ENOIOCTLCMD)
   517				goto err_stream_disable;
   518		}
   519	
   520		mutex_unlock(&mdev->graph_mutex);
   521		return 0;
   522	
   523	err_stream_disable:
   524		do {
   525			sd = subdevs[i];
   526			if (--sd->stream_count)
   527				continue;
   528			dev_dbg(mdev->dev,
   529				"disabling stream for '%s'\n", sd->entity.name);
   530			v4l2_subdev_call(sd, video, s_stream, false);
   531		} while (i--);
   532	
   533		mutex_unlock(&mdev->graph_mutex);
   534		return ret;
   535	}
   536	EXPORT_SYMBOL_GPL(v4l2_pipeline_stream_enable);
   537	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33388 bytes --]

  reply	other threads:[~2020-04-04 23:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-03 21:33 [PATCH v2 0/3] media: add v4l2_pipeline_stream_{enable,disable} helpers Helen Koike
2020-04-03 21:33 ` [PATCH v2 1/3] media: v4l2-common: add helper functions to call s_stream() callbacks Helen Koike
2020-04-04 23:01   ` kbuild test robot [this message]
2020-04-05  0:23   ` kbuild test robot
2020-04-07 19:24   ` Niklas Söderlund
2020-04-07 20:49     ` Helen Koike
2020-04-03 21:33 ` [PATCH v2 2/3] media: staging: rkisp1: use v4l2_pipeline_stream_{enable,disable} helpers Helen Koike
2020-04-04 23:54   ` kbuild test robot
2020-04-07 19:34   ` Niklas Söderlund
2020-04-07 20:51     ` Helen Koike
2020-04-03 21:33 ` [PATCH v2 3/3] media: vimc: " Helen Koike
2020-04-07 19:36 ` [PATCH v2 0/3] media: add " Niklas Söderlund
2020-04-08  0:05   ` Helen Koike
2020-04-08  0:15     ` Niklas Söderlund

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=202004050609.4GY8rmPe%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=helen.koike@collabora.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-media@vger.kernel.org \
    /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