public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [sailus-media-tree:metadata-pre 14/14] drivers/staging/media/ipu7/ipu7-isys-subdev.c:101:5: error: conflicting types for 'ipu7_isys_subdev_set_fmt'
@ 2026-02-11 14:47 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-02-11 14:47 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: llvm, oe-kbuild-all, linux-media

tree:   git://linuxtv.org/sailus/media_tree.git metadata-pre
head:   11ab80de774b0527a7365d6f03ea5dcd0ace3e85
commit: 11ab80de774b0527a7365d6f03ea5dcd0ace3e85 [14/14] media: v4l2-subdev: Add struct v4l2_subdev_client_info argument to pad ops
config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20260211/202602112253.JRfzluk0-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/20260211/202602112253.JRfzluk0-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/202602112253.JRfzluk0-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/staging/media/ipu7/ipu7-isys-subdev.c:101:5: error: conflicting types for 'ipu7_isys_subdev_set_fmt'
     101 | int ipu7_isys_subdev_set_fmt(struct v4l2_subdev *sd,
         |     ^
   drivers/staging/media/ipu7/ipu7-isys-subdev.h:33:5: note: previous declaration is here
      33 | int ipu7_isys_subdev_set_fmt(struct v4l2_subdev *sd,
         |     ^
   1 error generated.


vim +/ipu7_isys_subdev_set_fmt +101 drivers/staging/media/ipu7/ipu7-isys-subdev.c

a516d36bdc3d83 Bingbu Cao   2025-05-29  100  
a516d36bdc3d83 Bingbu Cao   2025-05-29 @101  int ipu7_isys_subdev_set_fmt(struct v4l2_subdev *sd,
11ab80de774b05 Sakari Ailus 2026-01-30  102  			     const struct v4l2_subdev_client_info *ci,
a516d36bdc3d83 Bingbu Cao   2025-05-29  103  			     struct v4l2_subdev_state *state,
a516d36bdc3d83 Bingbu Cao   2025-05-29  104  			     struct v4l2_subdev_format *format)
a516d36bdc3d83 Bingbu Cao   2025-05-29  105  {
a516d36bdc3d83 Bingbu Cao   2025-05-29  106  	struct ipu7_isys_subdev *asd = to_ipu7_isys_subdev(sd);
a516d36bdc3d83 Bingbu Cao   2025-05-29  107  	u32 code = asd->supported_codes[0];
a516d36bdc3d83 Bingbu Cao   2025-05-29  108  	struct v4l2_mbus_framefmt *fmt;
a516d36bdc3d83 Bingbu Cao   2025-05-29  109  	u32 other_pad, other_stream;
a516d36bdc3d83 Bingbu Cao   2025-05-29  110  	struct v4l2_rect *crop;
a516d36bdc3d83 Bingbu Cao   2025-05-29  111  	unsigned int i;
a516d36bdc3d83 Bingbu Cao   2025-05-29  112  	int ret;
a516d36bdc3d83 Bingbu Cao   2025-05-29  113  
a516d36bdc3d83 Bingbu Cao   2025-05-29  114  	/* No transcoding, source and sink formats must match. */
a516d36bdc3d83 Bingbu Cao   2025-05-29  115  	if ((sd->entity.pads[format->pad].flags & MEDIA_PAD_FL_SOURCE) &&
a516d36bdc3d83 Bingbu Cao   2025-05-29  116  	    sd->entity.num_pads > 1)
11ab80de774b05 Sakari Ailus 2026-01-30  117  		return v4l2_subdev_get_fmt(sd, NULL, state, format);
a516d36bdc3d83 Bingbu Cao   2025-05-29  118  
a516d36bdc3d83 Bingbu Cao   2025-05-29  119  	format->format.width = clamp(format->format.width, IPU_ISYS_MIN_WIDTH,
a516d36bdc3d83 Bingbu Cao   2025-05-29  120  				     IPU_ISYS_MAX_WIDTH);
a516d36bdc3d83 Bingbu Cao   2025-05-29  121  	format->format.height = clamp(format->format.height,
a516d36bdc3d83 Bingbu Cao   2025-05-29  122  				      IPU_ISYS_MIN_HEIGHT,
a516d36bdc3d83 Bingbu Cao   2025-05-29  123  				      IPU_ISYS_MAX_HEIGHT);
a516d36bdc3d83 Bingbu Cao   2025-05-29  124  
a516d36bdc3d83 Bingbu Cao   2025-05-29  125  	for (i = 0; asd->supported_codes[i]; i++) {
a516d36bdc3d83 Bingbu Cao   2025-05-29  126  		if (asd->supported_codes[i] == format->format.code) {
a516d36bdc3d83 Bingbu Cao   2025-05-29  127  			code = asd->supported_codes[i];
a516d36bdc3d83 Bingbu Cao   2025-05-29  128  			break;
a516d36bdc3d83 Bingbu Cao   2025-05-29  129  		}
a516d36bdc3d83 Bingbu Cao   2025-05-29  130  	}
a516d36bdc3d83 Bingbu Cao   2025-05-29  131  	format->format.code = code;
a516d36bdc3d83 Bingbu Cao   2025-05-29  132  	format->format.field = V4L2_FIELD_NONE;
a516d36bdc3d83 Bingbu Cao   2025-05-29  133  
a516d36bdc3d83 Bingbu Cao   2025-05-29  134  	/* Store the format and propagate it to the source pad. */
a516d36bdc3d83 Bingbu Cao   2025-05-29  135  	fmt = v4l2_subdev_state_get_format(state, format->pad, format->stream);
a516d36bdc3d83 Bingbu Cao   2025-05-29  136  	if (!fmt)
a516d36bdc3d83 Bingbu Cao   2025-05-29  137  		return -EINVAL;
a516d36bdc3d83 Bingbu Cao   2025-05-29  138  
a516d36bdc3d83 Bingbu Cao   2025-05-29  139  	*fmt = format->format;
a516d36bdc3d83 Bingbu Cao   2025-05-29  140  
a516d36bdc3d83 Bingbu Cao   2025-05-29  141  	if (!(sd->entity.pads[format->pad].flags & MEDIA_PAD_FL_SINK))
a516d36bdc3d83 Bingbu Cao   2025-05-29  142  		return 0;
a516d36bdc3d83 Bingbu Cao   2025-05-29  143  
a516d36bdc3d83 Bingbu Cao   2025-05-29  144  	/* propagate format to following source pad */
a516d36bdc3d83 Bingbu Cao   2025-05-29  145  	fmt = v4l2_subdev_state_get_opposite_stream_format(state, format->pad,
a516d36bdc3d83 Bingbu Cao   2025-05-29  146  							   format->stream);
a516d36bdc3d83 Bingbu Cao   2025-05-29  147  	if (!fmt)
a516d36bdc3d83 Bingbu Cao   2025-05-29  148  		return -EINVAL;
a516d36bdc3d83 Bingbu Cao   2025-05-29  149  
a516d36bdc3d83 Bingbu Cao   2025-05-29  150  	*fmt = format->format;
a516d36bdc3d83 Bingbu Cao   2025-05-29  151  
a516d36bdc3d83 Bingbu Cao   2025-05-29  152  	ret = v4l2_subdev_routing_find_opposite_end(&state->routing,
a516d36bdc3d83 Bingbu Cao   2025-05-29  153  						    format->pad,
a516d36bdc3d83 Bingbu Cao   2025-05-29  154  						    format->stream,
a516d36bdc3d83 Bingbu Cao   2025-05-29  155  						    &other_pad,
a516d36bdc3d83 Bingbu Cao   2025-05-29  156  						    &other_stream);
a516d36bdc3d83 Bingbu Cao   2025-05-29  157  	if (ret)
a516d36bdc3d83 Bingbu Cao   2025-05-29  158  		return -EINVAL;
a516d36bdc3d83 Bingbu Cao   2025-05-29  159  
a516d36bdc3d83 Bingbu Cao   2025-05-29  160  	crop = v4l2_subdev_state_get_crop(state, other_pad, other_stream);
a516d36bdc3d83 Bingbu Cao   2025-05-29  161  	/* reset crop */
a516d36bdc3d83 Bingbu Cao   2025-05-29  162  	crop->left = 0;
a516d36bdc3d83 Bingbu Cao   2025-05-29  163  	crop->top = 0;
a516d36bdc3d83 Bingbu Cao   2025-05-29  164  	crop->width = fmt->width;
a516d36bdc3d83 Bingbu Cao   2025-05-29  165  	crop->height = fmt->height;
a516d36bdc3d83 Bingbu Cao   2025-05-29  166  
a516d36bdc3d83 Bingbu Cao   2025-05-29  167  	return 0;
a516d36bdc3d83 Bingbu Cao   2025-05-29  168  }
a516d36bdc3d83 Bingbu Cao   2025-05-29  169  

:::::: The code at line 101 was first introduced by commit
:::::: a516d36bdc3d8373f904af57c95e76d6f921cf1c media: staging/ipu7: add IPU7 input system device driver

:::::: TO: Bingbu Cao <bingbu.cao@intel.com>
:::::: CC: Hans Verkuil <hverkuil@xs4all.nl>

-- 
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:[~2026-02-11 14:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-11 14:47 [sailus-media-tree:metadata-pre 14/14] drivers/staging/media/ipu7/ipu7-isys-subdev.c:101:5: error: conflicting types for 'ipu7_isys_subdev_set_fmt' 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