public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [sailus-media-tree:metadata 74/78] drivers/media/i2c/imx219.c:898:3: error: a label can only be part of a statement and a declaration is not a statement
@ 2025-06-22 10:25 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-06-22 10:25 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: oe-kbuild-all, linux-media

tree:   git://linuxtv.org/sailus/media_tree.git metadata
head:   2eb7b0a1567fd0da91e70f762d8cf94af1ffd7f9
commit: 65722cd911646712bb021c04b233c1f79f788067 [74/78] media: imx219: Add support for generic raw formats
config: sparc64-randconfig-001-20250622 (https://download.01.org/0day-ci/archive/20250622/202506221817.CDFFIVk9-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250622/202506221817.CDFFIVk9-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/202506221817.CDFFIVk9-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/media/i2c/imx219.c: In function 'imx219_enum_mbus_code':
>> drivers/media/i2c/imx219.c:898:3: error: a label can only be part of a statement and a declaration is not a statement
      const u32 img_codes[] = {
      ^~~~~


vim +898 drivers/media/i2c/imx219.c

   889	
   890	static int imx219_enum_mbus_code(struct v4l2_subdev *sd,
   891					 struct v4l2_subdev_state *state,
   892					 struct v4l2_subdev_mbus_code_enum *code)
   893	{
   894		struct imx219 *imx219 = to_imx219(sd);
   895	
   896		switch (code->pad) {
   897		case IMX219_PAD_IMAGE:
 > 898			const u32 img_codes[] = {
   899				IMX219_NATIVE_FORMAT,
   900				MEDIA_BUS_FMT_RAW_10,
   901			};
   902	
   903			/* The internal image pad is hardwired to the native format. */
   904			if (code->index > ARRAY_SIZE(img_codes))
   905				return -EINVAL;
   906	
   907			code->code = img_codes[code->index];
   908			return 0;
   909	
   910		case IMX219_PAD_EDATA:
   911			if (code->index > 0)
   912				return -EINVAL;
   913	
   914			code->code = MEDIA_BUS_FMT_META_8;
   915			return 0;
   916	
   917		case IMX219_PAD_SOURCE:
   918		default:
   919			break;
   920		}
   921	
   922		/*
   923		 * On the source pad, the sensor supports multiple image raw formats
   924		 * with different bit depths. The embedded data format bit depth
   925		 * follows the image stream.
   926		 */
   927		if (code->stream == IMX219_STREAM_IMAGE) {
   928			u32 format;
   929	
   930			if (code->index >= ARRAY_SIZE(imx219_mbus_formats) / 4) {
   931				u32 idx = code->index - ARRAY_SIZE(imx219_mbus_formats);
   932				if (idx >= ARRAY_SIZE(imx219_mbus_formats_raw))
   933					return -EINVAL;
   934	
   935				format = imx219_mbus_formats_raw[idx];
   936			} else {
   937				format = imx219_mbus_formats[code->index * 4];
   938			}
   939			code->code = imx219_get_format_code(imx219, format);
   940		} else {
   941			struct v4l2_mbus_framefmt *fmt;
   942	
   943			if (code->index > 0)
   944				return -EINVAL;
   945	
   946			fmt = v4l2_subdev_state_get_format(state, IMX219_PAD_SOURCE,
   947							   IMX219_STREAM_EDATA);
   948			code->code = fmt->code;
   949		}
   950	
   951		return 0;
   952	}
   953	

-- 
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:[~2025-06-22 10:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-22 10:25 [sailus-media-tree:metadata 74/78] drivers/media/i2c/imx219.c:898:3: error: a label can only be part of a statement and a declaration is not a statement 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