[PATCH 04/13] media: i2c: ov5647: Fix v4l2-compliance failure subscribing to events

Jai Luthra posted 13 patches 3 months, 2 weeks ago
There is a newer version of this series
[PATCH 04/13] media: i2c: ov5647: Fix v4l2-compliance failure subscribing to events
Posted by Jai Luthra 3 months, 2 weeks ago
From: David Plowman <david.plowman@raspberrypi.com>

Fixes the following v4l2-compliance failure:

fail: v4l2-test-controls.cpp(871): subscribe event for control 'User
Controls' failed test

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
---
 drivers/media/i2c/ov5647.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c
index dfe36116e6d3936aa0568f172c79ad4dad21f8c2..8f11b5cbdc1658019e1340e641c7e6f398bff503 100644
--- a/drivers/media/i2c/ov5647.c
+++ b/drivers/media/i2c/ov5647.c
@@ -873,6 +873,8 @@ static const struct v4l2_subdev_core_ops ov5647_subdev_core_ops = {
 	.g_register		= ov5647_sensor_get_register,
 	.s_register		= ov5647_sensor_set_register,
 #endif
+	.subscribe_event = v4l2_ctrl_subdev_subscribe_event,
+	.unsubscribe_event = v4l2_event_subdev_unsubscribe,
 };
 
 static const struct v4l2_rect *

-- 
2.51.0
Re: [PATCH 04/13] media: i2c: ov5647: Fix v4l2-compliance failure subscribing to events
Posted by kernel test robot 3 months, 2 weeks ago
Hi Jai,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 3a8660878839faadb4f1a6dd72c3179c1df56787]

url:    https://github.com/intel-lab-lkp/linux/commits/Jai-Luthra/media-i2c-ov5647-Parse-and-register-properties/20251028-153619
base:   3a8660878839faadb4f1a6dd72c3179c1df56787
patch link:    https://lore.kernel.org/r/20251028-b4-rpi-ov5647-v1-4-098413454f5e%40ideasonboard.com
patch subject: [PATCH 04/13] media: i2c: ov5647: Fix v4l2-compliance failure subscribing to events
config: sparc64-randconfig-r134-20251029 (https://download.01.org/0day-ci/archive/20251029/202510290816.8EQhDjD8-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project d1c086e82af239b245fe8d7832f2753436634990)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251029/202510290816.8EQhDjD8-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/202510290816.8EQhDjD8-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/media/i2c/ov5647.c:870:10: sparse: sparse: Initializer entry defined twice
   drivers/media/i2c/ov5647.c:876:10: sparse:   also defined here

vim +870 drivers/media/i2c/ov5647.c

3c2472a3c54895 Ramiro Oliveira 2017-03-22  867  
c9a05cece64c60 Jacopo Mondi    2020-11-19  868  /* Subdev core operations registration */
3c2472a3c54895 Ramiro Oliveira 2017-03-22  869  static const struct v4l2_subdev_core_ops ov5647_subdev_core_ops = {
dc3373081396f5 Jacopo Mondi    2020-11-19 @870  	.subscribe_event	= v4l2_ctrl_subdev_subscribe_event,
dc3373081396f5 Jacopo Mondi    2020-11-19  871  	.unsubscribe_event	= v4l2_event_subdev_unsubscribe,
3c2472a3c54895 Ramiro Oliveira 2017-03-22  872  #ifdef CONFIG_VIDEO_ADV_DEBUG
3c2472a3c54895 Ramiro Oliveira 2017-03-22  873  	.g_register		= ov5647_sensor_get_register,
3c2472a3c54895 Ramiro Oliveira 2017-03-22  874  	.s_register		= ov5647_sensor_set_register,
3c2472a3c54895 Ramiro Oliveira 2017-03-22  875  #endif
d812c6225cf5be David Plowman   2025-10-28  876  	.subscribe_event = v4l2_ctrl_subdev_subscribe_event,
d812c6225cf5be David Plowman   2025-10-28  877  	.unsubscribe_event = v4l2_event_subdev_unsubscribe,
3c2472a3c54895 Ramiro Oliveira 2017-03-22  878  };
3c2472a3c54895 Ramiro Oliveira 2017-03-22  879  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Re: [PATCH 04/13] media: i2c: ov5647: Fix v4l2-compliance failure subscribing to events
Posted by Jai Luthra 3 months, 1 week ago
Quoting kernel test robot (2025-10-29 06:27:53)
> Hi Jai,
> 
> kernel test robot noticed the following build warnings:
> 
> [auto build test WARNING on 3a8660878839faadb4f1a6dd72c3179c1df56787]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Jai-Luthra/media-i2c-ov5647-Parse-and-register-properties/20251028-153619
> base:   3a8660878839faadb4f1a6dd72c3179c1df56787
> patch link:    https://lore.kernel.org/r/20251028-b4-rpi-ov5647-v1-4-098413454f5e%40ideasonboard.com
> patch subject: [PATCH 04/13] media: i2c: ov5647: Fix v4l2-compliance failure subscribing to events
> config: sparc64-randconfig-r134-20251029 (https://download.01.org/0day-ci/archive/20251029/202510290816.8EQhDjD8-lkp@intel.com/config)
> compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project d1c086e82af239b245fe8d7832f2753436634990)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251029/202510290816.8EQhDjD8-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/202510290816.8EQhDjD8-lkp@intel.com/
> 
> sparse warnings: (new ones prefixed by >>)
> >> drivers/media/i2c/ov5647.c:870:10: sparse: sparse: Initializer entry defined twice
>    drivers/media/i2c/ov5647.c:876:10: sparse:   also defined here

My bad, this patch is already mainlined. I will drop it in next iteration.

> 
> vim +870 drivers/media/i2c/ov5647.c
> 
> 3c2472a3c54895 Ramiro Oliveira 2017-03-22  867  
> c9a05cece64c60 Jacopo Mondi    2020-11-19  868  /* Subdev core operations registration */
> 3c2472a3c54895 Ramiro Oliveira 2017-03-22  869  static const struct v4l2_subdev_core_ops ov5647_subdev_core_ops = {
> dc3373081396f5 Jacopo Mondi    2020-11-19 @870          .subscribe_event        = v4l2_ctrl_subdev_subscribe_event,
> dc3373081396f5 Jacopo Mondi    2020-11-19  871          .unsubscribe_event      = v4l2_event_subdev_unsubscribe,
> 3c2472a3c54895 Ramiro Oliveira 2017-03-22  872  #ifdef CONFIG_VIDEO_ADV_DEBUG
> 3c2472a3c54895 Ramiro Oliveira 2017-03-22  873          .g_register             = ov5647_sensor_get_register,
> 3c2472a3c54895 Ramiro Oliveira 2017-03-22  874          .s_register             = ov5647_sensor_set_register,
> 3c2472a3c54895 Ramiro Oliveira 2017-03-22  875  #endif
> d812c6225cf5be David Plowman   2025-10-28  876          .subscribe_event = v4l2_ctrl_subdev_subscribe_event,
> d812c6225cf5be David Plowman   2025-10-28  877          .unsubscribe_event = v4l2_event_subdev_unsubscribe,
> 3c2472a3c54895 Ramiro Oliveira 2017-03-22  878  };
> 3c2472a3c54895 Ramiro Oliveira 2017-03-22  879  
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki

Thanks,
    Jai