public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-media@vger.kernel.org
Subject: [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
Date: Sun, 22 Jun 2025 18:25:11 +0800	[thread overview]
Message-ID: <202506221817.CDFFIVk9-lkp@intel.com> (raw)

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

                 reply	other threads:[~2025-06-22 10:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202506221817.CDFFIVk9-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-media@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sakari.ailus@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox