llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 06/26] media: v4l2-ioctl: Introduce VIDIOC_BIND_CONTEXT
       [not found] <20250717-multicontext-mainline-2025-v1-6-81ac18979c03@ideasonboard.com>
@ 2025-07-18  8:29 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-07-18  8:29 UTC (permalink / raw)
  To: Jacopo Mondi; +Cc: llvm, oe-kbuild-all

Hi Jacopo,

kernel test robot noticed the following build errors:

[auto build test ERROR on d968e50b5c26642754492dea23cbd3592bde62d8]

url:    https://github.com/intel-lab-lkp/linux/commits/Jacopo-Mondi/media-mc-Add-per-file-handle-data-support/20250717-190546
base:   d968e50b5c26642754492dea23cbd3592bde62d8
patch link:    https://lore.kernel.org/r/20250717-multicontext-mainline-2025-v1-6-81ac18979c03%40ideasonboard.com
patch subject: [PATCH 06/26] media: v4l2-ioctl: Introduce VIDIOC_BIND_CONTEXT
config: x86_64-buildonly-randconfig-004-20250718 (https://download.01.org/0day-ci/archive/20250718/202507181611.gGP3jkaq-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250718/202507181611.gGP3jkaq-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/202507181611.gGP3jkaq-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/media/v4l2-core/v4l2-ioctl.c:2180:13: error: no member named 'entity' in 'struct video_device'
    2180 |         if (!vdev->entity.ops || !vdev->entity.ops->alloc_context ||
         |              ~~~~  ^
   drivers/media/v4l2-core/v4l2-ioctl.c:2180:34: error: no member named 'entity' in 'struct video_device'
    2180 |         if (!vdev->entity.ops || !vdev->entity.ops->alloc_context ||
         |                                   ~~~~  ^
   drivers/media/v4l2-core/v4l2-ioctl.c:2181:13: error: no member named 'entity' in 'struct video_device'
    2181 |             !vdev->entity.ops->destroy_context)
         |              ~~~~  ^
>> drivers/media/v4l2-core/v4l2-ioctl.c:2184:17: error: call to undeclared function 'media_device_context_get_from_fd'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    2184 |         mdev_context = media_device_context_get_from_fd(c->context_fd);
         |                        ^
>> drivers/media/v4l2-core/v4l2-ioctl.c:2184:15: error: incompatible integer to pointer conversion assigning to 'struct media_device_context *' from 'int' [-Wint-conversion]
    2184 |         mdev_context = media_device_context_get_from_fd(c->context_fd);
         |                      ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/v4l2-core/v4l2-ioctl.c:2189:14: error: no member named 'entity' in 'struct video_device'
    2189 |         ret = vdev->entity.ops->alloc_context(&vdev->entity,
         |               ~~~~  ^
   drivers/media/v4l2-core/v4l2-ioctl.c:2189:47: error: no member named 'entity' in 'struct video_device'
    2189 |         ret = vdev->entity.ops->alloc_context(&vdev->entity,
         |                                                ~~~~  ^
>> drivers/media/v4l2-core/v4l2-ioctl.c:2199:8: error: call to undeclared function 'media_device_bind_context'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    2199 |         ret = media_device_bind_context(mdev_context,
         |               ^
   drivers/media/v4l2-core/v4l2-ioctl.c:2199:8: note: did you mean 'media_entity_init_context'?
   include/media/media-entity.h:1540:6: note: 'media_entity_init_context' declared here
    1540 | void media_entity_init_context(struct media_entity *entity,
         |      ^
>> drivers/media/v4l2-core/v4l2-ioctl.c:2205:2: error: call to undeclared function 'media_device_context_put'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    2205 |         media_device_context_put(mdev_context);
         |         ^
   drivers/media/v4l2-core/v4l2-ioctl.c:2205:2: note: did you mean 'media_entity_context_put'?
   include/media/media-entity.h:1528:6: note: 'media_entity_context_put' declared here
    1528 | void media_entity_context_put(struct media_entity_context *ctx);
         |      ^
>> drivers/media/v4l2-core/v4l2-ioctl.c:2210:2: error: call to undeclared function 'video_device_context_put'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    2210 |         video_device_context_put(vfh->context);
         |         ^
   10 errors generated.
--
>> drivers/media/v4l2-core/v4l2-fh.c:96:3: error: call to undeclared function 'video_device_context_put'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      96 |                 video_device_context_put(fh->context);
         |                 ^
   1 error generated.


vim +2180 drivers/media/v4l2-core/v4l2-ioctl.c

  2161	
  2162	static int v4l_bind_context(const struct v4l2_ioctl_ops *ops,
  2163				    struct file *file, void *fh, void *arg)
  2164	{
  2165		struct video_device *vdev = video_devdata(file);
  2166		struct media_device_context *mdev_context;
  2167		struct v4l2_fh *vfh =
  2168			test_bit(V4L2_FL_USES_V4L2_FH, &vdev->flags) ? fh : NULL;
  2169		struct v4l2_context *c = arg;
  2170		int ret;
  2171	
  2172		/*
  2173		 * TODO: do not __set_bit(_IOC_NR(VIDIOC_BIND_CONTEXT), valid_ioctls)
  2174		 * if V4L2_FL_USES_V4L2_FH isn't set or the driver does not implement
  2175		 * alloc_context and destroy_context.
  2176		 */
  2177		if (!vfh)
  2178			return -ENOTTY;
  2179	
> 2180		if (!vdev->entity.ops || !vdev->entity.ops->alloc_context ||
  2181		    !vdev->entity.ops->destroy_context)
  2182			return -ENOTTY;
  2183	
> 2184		mdev_context = media_device_context_get_from_fd(c->context_fd);
  2185		if (!mdev_context)
  2186			return -EINVAL;
  2187	
  2188		/* Let the driver allocate the per-file handle context. */
  2189		ret = vdev->entity.ops->alloc_context(&vdev->entity,
  2190						      (struct media_entity_context **)
  2191						      &vfh->context);
  2192		if (ret)
  2193			goto err_put_mdev_context;
  2194	
  2195		/*
  2196		 * Bind the newly created video device context to the media device
  2197		 * context identified by the file descriptor.
  2198		 */
> 2199		ret = media_device_bind_context(mdev_context,
  2200						(struct media_entity_context *)
  2201						vfh->context);
  2202		if (ret)
  2203			goto err_put_context;
  2204	
> 2205		media_device_context_put(mdev_context);
  2206	
  2207		return 0;
  2208	
  2209	err_put_context:
> 2210		video_device_context_put(vfh->context);
  2211	err_put_mdev_context:
  2212		media_device_context_put(mdev_context);
  2213	
  2214		return ret;
  2215	}
  2216	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-07-18  8:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250717-multicontext-mainline-2025-v1-6-81ac18979c03@ideasonboard.com>
2025-07-18  8:29 ` [PATCH 06/26] media: v4l2-ioctl: Introduce VIDIOC_BIND_CONTEXT kernel test robot

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).