All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>, linux-media@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	bingbu.cao@linux.intel.com, stanislaw.gruszka@linux.intel.com,
	tian.shu.qiu@intel.com, tomi.valkeinen@ideasonboard.com,
	laurent.pinchart@ideasonboard.com
Subject: Re: [PATCH 12/13] media: v4l2-mc: Introduce v4l2_mc_pipeline_enabled()
Date: Thu, 19 Jun 2025 19:42:27 +0800	[thread overview]
Message-ID: <202506191934.t9FEXlhl-lkp@intel.com> (raw)
In-Reply-To: <20250619081546.1582969-13-sakari.ailus@linux.intel.com>

Hi Sakari,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linuxtv-media-pending/master]
[also build test WARNING on linus/master media-tree/master v6.16-rc2 next-20250618]
[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-ipu6-Use-correct-pads-for-xlate_streams/20250619-161847
base:   https://git.linuxtv.org/media-ci/media-pending.git master
patch link:    https://lore.kernel.org/r/20250619081546.1582969-13-sakari.ailus%40linux.intel.com
patch subject: [PATCH 12/13] media: v4l2-mc: Introduce v4l2_mc_pipeline_enabled()
config: x86_64-buildonly-randconfig-003-20250619 (https://download.01.org/0day-ci/archive/20250619/202506191934.t9FEXlhl-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250619/202506191934.t9FEXlhl-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/202506191934.t9FEXlhl-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/media/v4l2-core/v4l2-mc.c:622:6: warning: variable 'src_streams' set but not used [-Wunused-but-set-variable]
     622 |         u64 src_streams = 0, sink_streams = 0;
         |             ^
>> drivers/media/v4l2-core/v4l2-mc.c:732:44: warning: variable 'source_stream' is uninitialized when used here [-Wuninitialized]
     732 |         return v4l2_mc_downpath_enabled(sink_pad, source_stream, func,
         |                                                   ^~~~~~~~~~~~~
   drivers/media/v4l2-core/v4l2-mc.c:671:19: note: initialize the variable 'source_stream' to silence this warning
     671 |         u32 source_stream;
         |                          ^
         |                           = 0
   2 warnings generated.


vim +/src_streams +622 drivers/media/v4l2-core/v4l2-mc.c

   615	
   616	static int
   617	__v4l2_mc_pipeline_enabled(struct v4l2_subdev_state *state,
   618				   struct media_pad *src_pad, u64 __src_streams,
   619				   struct media_pad **__sink_pad, u64 *__sink_streams)
   620	{
   621		struct v4l2_subdev_route *route;
 > 622		u64 src_streams = 0, sink_streams = 0;
   623		bool has_sink_pad = false;
   624		unsigned int sink_pad;
   625	
   626		dev_dbg(state->sd->dev, "%s: source enabled, pad/streams %u/%#llx\n",
   627			state->sd->entity.name, src_pad->index, __src_streams);
   628		for_each_active_route(&state->routing, route) {
   629			dev_dbg(state->sd->dev, "%s: %u/%u -> %u/%u, flags %x\n",
   630				state->sd->entity.name,
   631				route->sink_pad, route->sink_stream, route->source_pad,
   632				route->source_stream, route->flags);
   633			if (route->source_pad != src_pad->index)
   634				continue;
   635	
   636			if (!(BIT_ULL(route->source_stream) & __src_streams))
   637				continue;
   638	
   639			if (!has_sink_pad) {
   640				has_sink_pad = true;
   641				sink_pad = route->sink_pad;
   642			}
   643	
   644			if (route->sink_pad != sink_pad) {
   645				dev_dbg(state->sd->dev,
   646					"sink pads (%u vs. %u) differ\n",
   647					route->sink_pad, sink_pad);
   648				return -EMLINK;
   649			}
   650	
   651			sink_streams |= BIT_ULL(route->sink_stream);
   652			src_streams |= BIT_ULL(route->source_stream);
   653		}
   654	
   655		*__sink_pad = has_sink_pad ? &state->sd->entity.pads[sink_pad] : NULL;
   656		*__sink_streams = sink_streams;
   657	
   658		return 0;
   659	}
   660	
   661	static int v4l2_mc_downpath_enabled(struct media_pad *sink_pad,
   662					    unsigned int sink_stream,
   663					    bool (*func)(struct video_device *vdev),
   664					    struct media_pad **__sink_pad,
   665					    u64 *__sink_streams)
   666	{
   667		struct v4l2_subdev_state *state;
   668		struct v4l2_subdev_route *route;
   669		struct v4l2_subdev *sd;
   670		struct media_pad *source_pad, *tmp_pad;
   671		u32 source_stream;
   672	
   673		if (!is_media_entity_v4l2_subdev(sink_pad->entity))
   674			return -ENXIO;
   675	
   676		sd = media_entity_to_v4l2_subdev(sink_pad->entity);
   677		dev_dbg(sd->dev, "path_enabled: found sub-device %s\n",
   678			sd->entity.name);
   679	
   680		state = v4l2_subdev_lock_and_get_active_state(sd);
   681		route = v4l2_subdev_find_route(&state->routing, sink_pad->index,
   682					       sink_stream, true, 0);
   683		if (IS_ERR(route)) {
   684			v4l2_subdev_unlock_state(state);
   685			dev_dbg(sd->dev,
   686				"path_enabled: can't find opposite route for %s:%u/%u",
   687				sd->entity.name, sink_pad->index, sink_stream);
   688			return 2;
   689		}
   690	
   691		source_pad = &sd->entity.pads[route->source_pad];
   692		v4l2_subdev_unlock_state(state);
   693	
   694		tmp_pad = sink_pad;
   695		sink_pad = media_pad_remote_pad_unique(source_pad);
   696		if (IS_ERR(sink_pad)) {
   697			dev_dbg(sd->dev,
   698				"path_enabled: can't find remote source for %s:%u\n",
   699				source_pad->entity->name, source_pad->index);
   700			return PTR_ERR(sink_pad);
   701		}
   702	
   703		if (is_media_entity_v4l2_video_device(sink_pad->entity)) {
   704			struct video_device *vdev;
   705	
   706			vdev = media_entity_to_video_device(sink_pad->entity);
   707			if (!vdev)
   708				return -ENXIO;
   709	
   710			dev_dbg(vdev->dev_parent,
   711				"path_enabled: found video device %s\n",
   712				vdev->name);
   713	
   714			if (!*__sink_pad) {
   715				*__sink_pad = tmp_pad;
   716				dev_dbg(sd->dev, "path_enabled: sink %u/%u\n",
   717					tmp_pad->index, sink_stream);
   718			} else if (tmp_pad != *__sink_pad) {
   719				dev_dbg(sd->dev,
   720					"path_enabled: pads %s/%u and %s/%u differ\n",
   721					tmp_pad->entity->name, tmp_pad->index,
   722					(*__sink_pad)->entity->name,
   723					(*__sink_pad)->index);
   724				return -EXDEV;
   725			}
   726	
   727			*__sink_streams |= BIT_ULL(sink_stream);
   728	
   729			return func(vdev);
   730		}
   731	
 > 732		return v4l2_mc_downpath_enabled(sink_pad, source_stream, func,
   733						__sink_pad, __sink_streams);
   734	}
   735	

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

  reply	other threads:[~2025-06-19 11:42 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-19  8:15 [PATCH 00/13] Streaming control for MC with metadata or streams otherwise Sakari Ailus
2025-06-19  8:15 ` [PATCH 01/13] media: ipu6: Use correct pads for xlate_streams() Sakari Ailus
2025-06-19 13:27   ` Laurent Pinchart
2025-06-19 13:55     ` Sakari Ailus
2025-06-19 14:15       ` Laurent Pinchart
2025-06-19 14:28         ` Sakari Ailus
2025-06-19 15:08           ` Laurent Pinchart
2025-06-19  8:15 ` [PATCH 02/13] media: ipu6: Set minimum height to 1 Sakari Ailus
2025-06-19 13:27   ` Laurent Pinchart
2025-06-19  8:15 ` [PATCH 03/13] media: ipu6: Enable and disable each stream at CSI-2 subdev source pad Sakari Ailus
2025-06-19 12:23   ` kernel test robot
2025-06-19 12:48   ` Laurent Pinchart
2025-06-19 13:10     ` Sakari Ailus
2025-06-19 13:19       ` Laurent Pinchart
2025-06-19 13:52         ` Sakari Ailus
2025-06-19  8:15 ` [PATCH 04/13] media: v4l2-subdev: Add a helper to figure out the pad streaming state Sakari Ailus
2025-06-19 13:37   ` Laurent Pinchart
2025-06-19  8:15 ` [PATCH 05/13] media: v4l: Make media_entity_to_video_device() NULL-safe Sakari Ailus
2025-06-19 15:20   ` Laurent Pinchart
2025-06-19 16:14     ` Sakari Ailus
2025-07-08 11:56       ` Laurent Pinchart
2025-07-08 12:02         ` Sakari Ailus
2025-07-08 16:17           ` Laurent Pinchart
2025-07-09 20:03             ` Sakari Ailus
2025-07-09 20:54               ` Laurent Pinchart
2025-07-10  6:57                 ` Sakari Ailus
2025-06-19  8:15 ` [PATCH 06/13] media: v4l2-subdev: Mark both streams of a route enabled Sakari Ailus
2025-06-19 16:56   ` Laurent Pinchart
2025-06-19 18:34     ` Sakari Ailus
2025-06-19 22:18       ` Laurent Pinchart
2025-06-25 16:10         ` Sakari Ailus
2025-06-26 15:22       ` Tomi Valkeinen
2025-06-26 19:13         ` Laurent Pinchart
2025-06-26 15:17   ` Tomi Valkeinen
2025-06-27  6:09     ` Sakari Ailus
2025-06-30  0:47       ` Laurent Pinchart
2025-06-19  8:15 ` [PATCH 07/13] media: ipu6: Set up CSI-2 receiver at correct moment Sakari Ailus
2025-06-19 17:00   ` Laurent Pinchart
2025-06-19 17:20     ` Sakari Ailus
2025-06-19  8:15 ` [PATCH 08/13] media: v4l2-subdev: Print early in v4l2_subdev_{enable,disable}_streams() Sakari Ailus
2025-06-19 17:03   ` Laurent Pinchart
2025-06-25 16:12     ` Sakari Ailus
2025-06-19  8:15 ` [PATCH 09/13] media: v4l2-subdev: Collect streams on source pads only Sakari Ailus
2025-06-19 17:07   ` Laurent Pinchart
2025-06-25 16:14     ` Sakari Ailus
2025-06-19  8:15 ` [PATCH 10/13] media: v4l2-subdev: Add debug prints to v4l2_subdev_collect_streams() Sakari Ailus
2025-06-19 22:23   ` Laurent Pinchart
2025-06-25 16:28     ` Sakari Ailus
2025-06-19  8:15 ` [PATCH 11/13] media: v4l2-subdev: Introduce v4l2_subdev_find_route() Sakari Ailus
2025-06-20  8:14   ` Jacopo Mondi
2025-06-25 16:53     ` Sakari Ailus
2025-06-26 22:20       ` Laurent Pinchart
2025-07-15 14:09         ` Sakari Ailus
2025-06-19  8:15 ` [PATCH 12/13] media: v4l2-mc: Introduce v4l2_mc_pipeline_enabled() Sakari Ailus
2025-06-19 11:42   ` kernel test robot [this message]
2025-06-20  3:58   ` Dan Carpenter
2025-06-20  8:53   ` Jacopo Mondi
2025-06-21  8:10     ` Sakari Ailus
2025-07-15 10:49     ` Sakari Ailus
2025-07-15 11:25       ` Laurent Pinchart
2025-07-15 11:32         ` Sakari Ailus
2025-07-15 18:18           ` Laurent Pinchart
2025-06-23  9:48   ` kernel test robot
2025-06-26 23:07   ` Laurent Pinchart
2025-08-04 11:32     ` Sakari Ailus
2025-08-04 11:46       ` Laurent Pinchart
2025-06-19  8:15 ` [PATCH 13/13] media: ipu6: isys: Rework stream starting and stopping Sakari Ailus
  -- strict thread matches above, loose matches on Subject: below --
2025-06-20  3:32 [PATCH 12/13] media: v4l2-mc: Introduce v4l2_mc_pipeline_enabled() kernel test robot

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=202506191934.t9FEXlhl-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bingbu.cao@linux.intel.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sakari.ailus@linux.intel.com \
    --cc=stanislaw.gruszka@linux.intel.com \
    --cc=tian.shu.qiu@intel.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.