Re: [PATCH v2 4/6] media: v4l: subdev: Make stream argument optional in state access functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sakari,

kernel test robot noticed the following build errors:

[auto build test ERROR on media-tree/master]
[also build test ERROR on rockchip/for-next linus/master v6.6-rc7 next-20231023]
[cannot apply to sailus-media-tree/streams]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Sakari-Ailus/media-v4l-subdev-Also-return-pads-array-information-on-stream-functions/20231023-203626
base:   git://linuxtv.org/media_tree.git master
patch link:    https://lore.kernel.org/r/20231023123308.782592-5-sakari.ailus%40linux.intel.com
patch subject: [PATCH v2 4/6] media: v4l: subdev: Make stream argument optional in state access functions
config: i386-buildonly-randconfig-001-20231024 (https://download.01.org/0day-ci/archive/20231024/202310240911.7Doj3ImH-lkp@xxxxxxxxx/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231024/202310240911.7Doj3ImH-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310240911.7Doj3ImH-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   In file included from include/media/v4l2-device.h:13:0,
                    from drivers/media/v4l2-core/v4l2-subdev.c:24:
   drivers/media/v4l2-core/v4l2-subdev.c: In function 'check_state':
>> include/media/v4l2-subdev.h:1555:9: error: implicit declaration of function '__v4l2_subdev_state_get_format___VA_OPT__'; did you mean '__v4l2_subdev_state_get_format_'? [-Werror=implicit-function-declaration]
            __v4l2_subdev_state_get_format_ ## __VA_OPT__(stream) \
            ^
   drivers/media/v4l2-core/v4l2-subdev.c:180:8: note: in expansion of macro 'v4l2_subdev_state_get_format'
      if (!v4l2_subdev_state_get_format(state, pad, stream))
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/media/v4l2-subdev.h:1556:21: error: expected ')' before '__VA_OPT__'
            (state, pad __VA_OPT__(,) __VA_ARGS__)
                        ^
   drivers/media/v4l2-core/v4l2-subdev.c:180:8: note: in expansion of macro 'v4l2_subdev_state_get_format'
      if (!v4l2_subdev_state_get_format(state, pad, stream))
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/media/v4l2-subdev.h:1555:9: error: called object is not a function or function pointer
            __v4l2_subdev_state_get_format_ ## __VA_OPT__(stream) \
            ^
   drivers/media/v4l2-core/v4l2-subdev.c:180:8: note: in expansion of macro 'v4l2_subdev_state_get_format'
      if (!v4l2_subdev_state_get_format(state, pad, stream))
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/v4l2-core/v4l2-subdev.c: In function 'v4l2_subdev_get_fmt':
>> include/media/v4l2-subdev.h:1555:55: error: 'stream' undeclared (first use in this function); did you mean 'strim'?
            __v4l2_subdev_state_get_format_ ## __VA_OPT__(stream) \
                                                          ^
   drivers/media/v4l2-core/v4l2-subdev.c:1581:8: note: in expansion of macro 'v4l2_subdev_state_get_format'
     fmt = v4l2_subdev_state_get_format(state, format->pad, format->stream);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/media/v4l2-subdev.h:1555:55: note: each undeclared identifier is reported only once for each function it appears in
            __v4l2_subdev_state_get_format_ ## __VA_OPT__(stream) \
                                                          ^
   drivers/media/v4l2-core/v4l2-subdev.c:1581:8: note: in expansion of macro 'v4l2_subdev_state_get_format'
     fmt = v4l2_subdev_state_get_format(state, format->pad, format->stream);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/media/v4l2-subdev.h:1556:21: error: expected ')' before '__VA_OPT__'
            (state, pad __VA_OPT__(,) __VA_ARGS__)
                        ^
   drivers/media/v4l2-core/v4l2-subdev.c:1581:8: note: in expansion of macro 'v4l2_subdev_state_get_format'
     fmt = v4l2_subdev_state_get_format(state, format->pad, format->stream);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from arch/x86/include/asm/bug.h:87:0,
                    from include/linux/bug.h:5,
                    from include/linux/jump_label.h:256,
                    from include/linux/static_key.h:1,
                    from arch/x86/include/asm/nospec-branch.h:6,
                    from arch/x86/include/asm/irqflags.h:9,
                    from include/linux/irqflags.h:17,
                    from include/linux/rcupdate.h:26,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/leds.h:12,
                    from drivers/media/v4l2-core/v4l2-subdev.c:13:
   drivers/media/v4l2-core/v4l2-subdev.c: In function '__v4l2_subdev_state_get_format':
   drivers/media/v4l2-core/v4l2-subdev.c:1685:27: error: 'struct v4l2_subdev_state' has no member named 'sd'
      if (WARN_ON(pad >= state->sd->entity.num_pads))
                              ^
   include/asm-generic/bug.h:168:25: note: in definition of macro 'WARN_ON'
     int __ret_warn_on = !!(condition);    \
                            ^~~~~~~~~
   drivers/media/v4l2-core/v4l2-subdev.c: In function '__v4l2_subdev_state_get_crop':
   drivers/media/v4l2-core/v4l2-subdev.c:1719:27: error: 'struct v4l2_subdev_state' has no member named 'sd'
      if (WARN_ON(pad >= state->sd->entity.num_pads))
                              ^
   include/asm-generic/bug.h:168:25: note: in definition of macro 'WARN_ON'
     int __ret_warn_on = !!(condition);    \
                            ^~~~~~~~~
   drivers/media/v4l2-core/v4l2-subdev.c: In function '__v4l2_subdev_state_get_compose':
   drivers/media/v4l2-core/v4l2-subdev.c:1753:27: error: 'struct v4l2_subdev_state' has no member named 'sd'
      if (WARN_ON(pad >= state->sd->entity.num_pads))
                              ^
   include/asm-generic/bug.h:168:25: note: in definition of macro 'WARN_ON'
     int __ret_warn_on = !!(condition);    \
                            ^~~~~~~~~
   In file included from include/media/v4l2-device.h:13:0,
                    from drivers/media/v4l2-core/v4l2-subdev.c:24:
   drivers/media/v4l2-core/v4l2-subdev.c: In function 'v4l2_subdev_state_get_opposite_stream_format':
>> include/media/v4l2-subdev.h:1556:21: error: expected ')' before '__VA_OPT__'
            (state, pad __VA_OPT__(,) __VA_ARGS__)
                        ^
   drivers/media/v4l2-core/v4l2-subdev.c:1817:9: note: in expansion of macro 'v4l2_subdev_state_get_format'
     return v4l2_subdev_state_get_format(state, other_pad, other_stream);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/media/v4l2-subdev.h:1555:9: error: called object is not a function or function pointer
            __v4l2_subdev_state_get_format_ ## __VA_OPT__(stream) \
            ^
   drivers/media/v4l2-core/v4l2-subdev.c:1817:9: note: in expansion of macro 'v4l2_subdev_state_get_format'
     return v4l2_subdev_state_get_format(state, other_pad, other_stream);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/v4l2-core/v4l2-subdev.c:1818:1: error: control reaches end of non-void function [-Werror=return-type]
    }
    ^
   cc1: some warnings being treated as errors


vim +1555 include/media/v4l2-subdev.h

  1479	
  1480	/**
  1481	 * v4l2_subdev_get_fmt() - Fill format based on state
  1482	 * @sd: subdevice
  1483	 * @state: subdevice state
  1484	 * @format: pointer to &struct v4l2_subdev_format
  1485	 *
  1486	 * Fill @format->format field based on the information in the @format struct.
  1487	 *
  1488	 * This function can be used by the subdev drivers which support active state to
  1489	 * implement v4l2_subdev_pad_ops.get_fmt if the subdev driver does not need to
  1490	 * do anything special in their get_fmt op.
  1491	 *
  1492	 * Returns 0 on success, error value otherwise.
  1493	 */
  1494	int v4l2_subdev_get_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_state *state,
  1495				struct v4l2_subdev_format *format);
  1496	
  1497	/**
  1498	 * v4l2_subdev_set_routing() - Set given routing to subdev state
  1499	 * @sd: The subdevice
  1500	 * @state: The subdevice state
  1501	 * @routing: Routing that will be copied to subdev state
  1502	 *
  1503	 * This will release old routing table (if any) from the state, allocate
  1504	 * enough space for the given routing, and copy the routing.
  1505	 *
  1506	 * This can be used from the subdev driver's set_routing op, after validating
  1507	 * the routing.
  1508	 */
  1509	int v4l2_subdev_set_routing(struct v4l2_subdev *sd,
  1510				    struct v4l2_subdev_state *state,
  1511				    const struct v4l2_subdev_krouting *routing);
  1512	
  1513	struct v4l2_subdev_route *
  1514	__v4l2_subdev_next_active_route(const struct v4l2_subdev_krouting *routing,
  1515					struct v4l2_subdev_route *route);
  1516	
  1517	/**
  1518	 * for_each_active_route - iterate on all active routes of a routing table
  1519	 * @routing: The routing table
  1520	 * @route: The route iterator
  1521	 */
  1522	#define for_each_active_route(routing, route) \
  1523		for ((route) = NULL;                  \
  1524		     ((route) = __v4l2_subdev_next_active_route((routing), (route)));)
  1525	
  1526	/**
  1527	 * v4l2_subdev_set_routing_with_fmt() - Set given routing and format to subdev
  1528	 *					state
  1529	 * @sd: The subdevice
  1530	 * @state: The subdevice state
  1531	 * @routing: Routing that will be copied to subdev state
  1532	 * @fmt: Format used to initialize all the streams
  1533	 *
  1534	 * This is the same as v4l2_subdev_set_routing, but additionally initializes
  1535	 * all the streams using the given format.
  1536	 */
  1537	int v4l2_subdev_set_routing_with_fmt(struct v4l2_subdev *sd,
  1538					     struct v4l2_subdev_state *state,
  1539					     const struct v4l2_subdev_krouting *routing,
  1540					     const struct v4l2_mbus_framefmt *fmt);
  1541	
  1542	/**
  1543	 * v4l2_subdev_state_get_format() - Get pointer to a stream format
  1544	 * @state: subdevice state
  1545	 * @pad: pad id
  1546	 * @stream: stream id (optional argument)
  1547	 *
  1548	 * This returns a pointer to &struct v4l2_mbus_framefmt for the given pad +
  1549	 * stream in the subdev state.
  1550	 *
  1551	 * For stream-unaware drivers the format for the corresponding pad is returned.
  1552	 * If the pad does not exist, NULL is returned.
  1553	 */
  1554	#define v4l2_subdev_state_get_format(state, pad, ...)         \
> 1555	        __v4l2_subdev_state_get_format_ ## __VA_OPT__(stream) \
> 1556	        (state, pad __VA_OPT__(,) __VA_ARGS__)
  1557	#define __v4l2_subdev_state_get_format_(state, pad)     \
  1558	        __v4l2_subdev_state_get_format(state, pad, 0)
  1559	#define __v4l2_subdev_state_get_format_stream(state, pad, stream)	\
  1560	        __v4l2_subdev_state_get_format(state, pad, stream)
  1561	struct v4l2_mbus_framefmt *
  1562	__v4l2_subdev_state_get_format(struct v4l2_subdev_state *state,
  1563				       unsigned int pad, u32 stream);
  1564	

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



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux