Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [PATCH RFC] media: i2c: ds90ub960: Enable second i2c interface
       [not found] <20250305121705.2143540-1-y-abhilashchandra@ti.com>
@ 2025-03-06  9:35 ` kernel test robot
  2025-03-06 14:58 ` kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2025-03-06  9:35 UTC (permalink / raw)
  To: Yemike Abhilash Chandra; +Cc: llvm, oe-kbuild-all

Hi Yemike,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:

[auto build test WARNING on linuxtv-media-pending/master]
[also build test WARNING on linus/master v6.14-rc5 next-20250305]
[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/Yemike-Abhilash-Chandra/media-i2c-ds90ub960-Enable-second-i2c-interface/20250305-201858
base:   https://git.linuxtv.org/media-ci/media-pending.git master
patch link:    https://lore.kernel.org/r/20250305121705.2143540-1-y-abhilashchandra%40ti.com
patch subject: [PATCH RFC] media: i2c: ds90ub960: Enable second i2c interface
config: arm-randconfig-004-20250306 (https://download.01.org/0day-ci/archive/20250306/202503061704.adraY1Jm-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250306/202503061704.adraY1Jm-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/202503061704.adraY1Jm-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/media/i2c/ds90ub960.c:2577:4: warning: variable 'fwd_ctl' is uninitialized when used here [-Wuninitialized]
    2577 |                         fwd_ctl |= BIT(nport); /* forward to TX1 */
         |                         ^~~~~~~
   drivers/media/i2c/ds90ub960.c:2458:12: note: initialize the variable 'fwd_ctl' to silence this warning
    2458 |         u8 fwd_ctl;
         |                   ^
         |                    = '\0'
   1 warning generated.


vim +/fwd_ctl +2577 drivers/media/i2c/ds90ub960.c

afe267f2d368f5 Tomi Valkeinen          2023-06-19  2454  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2455  static int ub960_configure_ports_for_streaming(struct ub960_data *priv,
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2456  					       struct v4l2_subdev_state *state)
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2457  {
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2458  	u8 fwd_ctl;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2459  	struct {
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2460  		u32 num_streams;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2461  		u8 pixel_dt;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2462  		u8 meta_dt;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2463  		u32 meta_lines;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2464  		u32 tx_port;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2465  	} rx_data[UB960_MAX_RX_NPORTS] = {};
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2466  	u8 vc_map[UB960_MAX_RX_NPORTS] = {};
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2467  	struct v4l2_subdev_route *route;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2468  	int ret;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2469  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2470  	ret = ub960_validate_stream_vcs(priv);
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2471  	if (ret)
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2472  		return ret;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2473  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2474  	ub960_get_vc_maps(priv, state, vc_map);
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2475  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2476  	for_each_active_route(&state->routing, route) {
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2477  		struct ub960_rxport *rxport;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2478  		struct ub960_txport *txport;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2479  		struct v4l2_mbus_framefmt *fmt;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2480  		const struct ub960_format_info *ub960_fmt;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2481  		unsigned int nport;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2482  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2483  		nport = ub960_pad_to_port(priv, route->sink_pad);
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2484  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2485  		rxport = priv->rxports[nport];
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2486  		if (!rxport)
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2487  			return -EINVAL;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2488  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2489  		txport = priv->txports[ub960_pad_to_port(priv, route->source_pad)];
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2490  		if (!txport)
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2491  			return -EINVAL;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2492  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2493  		rx_data[nport].tx_port = ub960_pad_to_port(priv, route->source_pad);
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2494  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2495  		rx_data[nport].num_streams++;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2496  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2497  		/* For the rest, we are only interested in parallel busses */
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2498  		if (rxport->rx_mode == RXPORT_MODE_CSI2_SYNC ||
093d69ad556df2 Tomi Valkeinen          2023-07-31  2499  		    rxport->rx_mode == RXPORT_MODE_CSI2_NONSYNC)
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2500  			continue;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2501  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2502  		if (rx_data[nport].num_streams > 2)
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2503  			return -EPIPE;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2504  
d0fde6aae2bacd Sakari Ailus            2023-10-13  2505  		fmt = v4l2_subdev_state_get_format(state, route->sink_pad,
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2506  						   route->sink_stream);
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2507  		if (!fmt)
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2508  			return -EPIPE;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2509  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2510  		ub960_fmt = ub960_find_format(fmt->code);
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2511  		if (!ub960_fmt)
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2512  			return -EPIPE;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2513  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2514  		if (ub960_fmt->meta) {
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2515  			if (fmt->height > 3) {
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2516  				dev_err(&priv->client->dev,
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2517  					"rx%u: unsupported metadata height %u\n",
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2518  					nport, fmt->height);
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2519  				return -EPIPE;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2520  			}
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2521  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2522  			rx_data[nport].meta_dt = ub960_fmt->datatype;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2523  			rx_data[nport].meta_lines = fmt->height;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2524  		} else {
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2525  			rx_data[nport].pixel_dt = ub960_fmt->datatype;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2526  		}
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2527  	}
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2528  
cff7e9e5aee4ba Tomi Valkeinen          2024-12-06  2529  	for (unsigned int nport = 0; nport < priv->hw_data->num_rxports;
cff7e9e5aee4ba Tomi Valkeinen          2024-12-06  2530  	     nport++) {
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2531  		struct ub960_rxport *rxport = priv->rxports[nport];
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2532  		u8 vc = vc_map[nport];
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2533  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2534  		if (rx_data[nport].num_streams == 0)
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2535  			continue;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2536  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2537  		switch (rxport->rx_mode) {
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2538  		case RXPORT_MODE_RAW10:
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2539  			ub960_rxport_write(priv, nport, UB960_RR_RAW10_ID,
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2540  				rx_data[nport].pixel_dt | (vc << UB960_RR_RAW10_ID_VC_SHIFT));
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2541  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2542  			ub960_rxport_write(priv, rxport->nport,
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2543  				UB960_RR_RAW_EMBED_DTYPE,
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2544  				(rx_data[nport].meta_lines << UB960_RR_RAW_EMBED_DTYPE_LINES_SHIFT) |
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2545  					rx_data[nport].meta_dt);
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2546  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2547  			break;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2548  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2549  		case RXPORT_MODE_RAW12_HF:
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2550  		case RXPORT_MODE_RAW12_LF:
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2551  			/* Not implemented */
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2552  			break;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2553  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2554  		case RXPORT_MODE_CSI2_SYNC:
093d69ad556df2 Tomi Valkeinen          2023-07-31  2555  		case RXPORT_MODE_CSI2_NONSYNC:
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2556  			if (!priv->hw_data->is_ub9702) {
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2557  				/* Map all VCs from this port to the same VC */
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2558  				ub960_rxport_write(priv, nport, UB960_RR_CSI_VC_MAP,
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2559  						   (vc << UB960_RR_CSI_VC_MAP_SHIFT(3)) |
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2560  						   (vc << UB960_RR_CSI_VC_MAP_SHIFT(2)) |
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2561  						   (vc << UB960_RR_CSI_VC_MAP_SHIFT(1)) |
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2562  						   (vc << UB960_RR_CSI_VC_MAP_SHIFT(0)));
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2563  			} else {
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2564  				unsigned int i;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2565  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2566  				/* Map all VCs from this port to VC(nport) */
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2567  				for (i = 0; i < 8; i++)
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2568  					ub960_rxport_write(priv, nport,
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2569  							   UB960_RR_VC_ID_MAP(i),
5dbbd0609b83f6 Tomi Valkeinen          2024-12-06  2570  							   (nport << 4) | nport);
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2571  			}
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2572  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2573  			break;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2574  		}
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2575  
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2576  		if (rx_data[nport].tx_port == 1)
afe267f2d368f5 Tomi Valkeinen          2023-06-19 @2577  			fwd_ctl |= BIT(nport); /* forward to TX1 */
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2578  		else
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2579  			fwd_ctl &= ~BIT(nport); /* forward to TX0 */
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2580  	}
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2581  
03fb91f512dd2e Yemike Abhilash Chandra 2025-03-05  2582  	ret = ub960_update_bits(priv, UB960_SR_FWD_CTL1, priv->rx_mask, fwd_ctl);
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2583  
03fb91f512dd2e Yemike Abhilash Chandra 2025-03-05  2584  	return ret;
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2585  }
afe267f2d368f5 Tomi Valkeinen          2023-06-19  2586  

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH RFC] media: i2c: ds90ub960: Enable second i2c interface
       [not found] <20250305121705.2143540-1-y-abhilashchandra@ti.com>
  2025-03-06  9:35 ` [PATCH RFC] media: i2c: ds90ub960: Enable second i2c interface kernel test robot
@ 2025-03-06 14:58 ` kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2025-03-06 14:58 UTC (permalink / raw)
  To: Yemike Abhilash Chandra; +Cc: llvm, oe-kbuild-all

Hi Yemike,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build errors:

[auto build test ERROR on linuxtv-media-pending/master]
[also build test ERROR on linus/master v6.14-rc5 next-20250305]
[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/Yemike-Abhilash-Chandra/media-i2c-ds90ub960-Enable-second-i2c-interface/20250305-201858
base:   https://git.linuxtv.org/media-ci/media-pending.git master
patch link:    https://lore.kernel.org/r/20250305121705.2143540-1-y-abhilashchandra%40ti.com
patch subject: [PATCH RFC] media: i2c: ds90ub960: Enable second i2c interface
config: i386-buildonly-randconfig-001-20250306 (https://download.01.org/0day-ci/archive/20250306/202503062235.DNAQREOf-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250306/202503062235.DNAQREOf-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/202503062235.DNAQREOf-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/media/i2c/ds90ub960.c:2182:25: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    2182 |         enabled_rxports_mask = FIELD_PREP(UB960_SR_RX_PORT_CTL_BCC_MAP, priv->rx_mask);
         |                                ^
   1 error generated.


vim +/FIELD_PREP +2182 drivers/media/i2c/ds90ub960.c

  2173	
  2174	static int ub960_init_rx_ports(struct ub960_data *priv)
  2175	{
  2176		unsigned int nport;
  2177		u8 enabled_rxports_mask;
  2178		u8 enabled_rxports;
  2179		int ret;
  2180	
  2181		/* Configure i2c interface for RX ports */
> 2182		enabled_rxports_mask = FIELD_PREP(UB960_SR_RX_PORT_CTL_BCC_MAP, priv->rx_mask);
  2183		enabled_rxports = (priv->tx_mask & UB960_CSI_TX0)  ? 0x00 : enabled_rxports_mask;
  2184	
  2185		ret = ub960_update_bits(priv, UB960_SR_RX_PORT_CTL, enabled_rxports_mask, enabled_rxports);
  2186		if (ret)
  2187			return ret;
  2188	
  2189		for (nport = 0; nport < priv->hw_data->num_rxports; nport++) {
  2190			struct ub960_rxport *rxport = priv->rxports[nport];
  2191	
  2192			if (!rxport)
  2193				continue;
  2194	
  2195			if (priv->hw_data->is_ub9702)
  2196				ub960_init_rx_port_ub9702(priv, rxport);
  2197			else
  2198				ub960_init_rx_port_ub960(priv, rxport);
  2199		}
  2200	
  2201		return 0;
  2202	}
  2203	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-06 14:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250305121705.2143540-1-y-abhilashchandra@ti.com>
2025-03-06  9:35 ` [PATCH RFC] media: i2c: ds90ub960: Enable second i2c interface kernel test robot
2025-03-06 14:58 ` 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