[linux-next:master 3099/6864] drivers/media/i2c/imx283.c:443:30: error: initializer element is not constant

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   0c52056d9f77508cb6d4d68d3fc91c6c08ec71af
commit: ccb4eb4496fa94a9131c63ad0c412ebfe7f9ac35 [3099/6864] media: i2c: Add imx283 camera sensor driver
config: i386-buildonly-randconfig-006-20240619 (https://download.01.org/0day-ci/archive/20240619/202406190227.5wktkZE2-lkp@xxxxxxxxx/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240619/202406190227.5wktkZE2-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406190227.5wktkZE2-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/media/i2c/imx283.c:443:30: error: initializer element is not constant
      .crop = CENTERED_RECTANGLE(imx283_active_area, 5472, 3648),
                                 ^
   drivers/media/i2c/imx283.c:412:11: note: in definition of macro 'CENTERED_RECTANGLE'
      .left = rect.left + ((rect.width - (_width)) / 2), \
              ^~~~
   drivers/media/i2c/imx283.c:443:30: note: (near initialization for 'supported_modes_12bit[0].crop.left')
      .crop = CENTERED_RECTANGLE(imx283_active_area, 5472, 3648),
                                 ^
   drivers/media/i2c/imx283.c:412:11: note: in definition of macro 'CENTERED_RECTANGLE'
      .left = rect.left + ((rect.width - (_width)) / 2), \
              ^~~~
>> drivers/media/i2c/imx283.c:443:30: error: initializer element is not constant
      .crop = CENTERED_RECTANGLE(imx283_active_area, 5472, 3648),
                                 ^
   drivers/media/i2c/imx283.c:413:10: note: in definition of macro 'CENTERED_RECTANGLE'
      .top = rect.top + ((rect.height - (_height)) / 2), \
             ^~~~
   drivers/media/i2c/imx283.c:443:30: note: (near initialization for 'supported_modes_12bit[0].crop.top')
      .crop = CENTERED_RECTANGLE(imx283_active_area, 5472, 3648),
                                 ^
   drivers/media/i2c/imx283.c:413:10: note: in definition of macro 'CENTERED_RECTANGLE'
      .top = rect.top + ((rect.height - (_height)) / 2), \
             ^~~~
   drivers/media/i2c/imx283.c:471:30: error: initializer element is not constant
      .crop = CENTERED_RECTANGLE(imx283_active_area, 5472, 3648),
                                 ^
   drivers/media/i2c/imx283.c:412:11: note: in definition of macro 'CENTERED_RECTANGLE'
      .left = rect.left + ((rect.width - (_width)) / 2), \
              ^~~~
   drivers/media/i2c/imx283.c:471:30: note: (near initialization for 'supported_modes_12bit[1].crop.left')
      .crop = CENTERED_RECTANGLE(imx283_active_area, 5472, 3648),
                                 ^
   drivers/media/i2c/imx283.c:412:11: note: in definition of macro 'CENTERED_RECTANGLE'
      .left = rect.left + ((rect.width - (_width)) / 2), \
              ^~~~
   drivers/media/i2c/imx283.c:471:30: error: initializer element is not constant
      .crop = CENTERED_RECTANGLE(imx283_active_area, 5472, 3648),
                                 ^
   drivers/media/i2c/imx283.c:413:10: note: in definition of macro 'CENTERED_RECTANGLE'
      .top = rect.top + ((rect.height - (_height)) / 2), \
             ^~~~
   drivers/media/i2c/imx283.c:471:30: note: (near initialization for 'supported_modes_12bit[1].crop.top')
      .crop = CENTERED_RECTANGLE(imx283_active_area, 5472, 3648),
                                 ^
   drivers/media/i2c/imx283.c:413:10: note: in definition of macro 'CENTERED_RECTANGLE'
      .top = rect.top + ((rect.height - (_height)) / 2), \
             ^~~~
   drivers/media/i2c/imx283.c:492:30: error: initializer element is not constant
      .crop = CENTERED_RECTANGLE(imx283_active_area, 5472, 3648),
                                 ^
   drivers/media/i2c/imx283.c:412:11: note: in definition of macro 'CENTERED_RECTANGLE'
      .left = rect.left + ((rect.width - (_width)) / 2), \
              ^~~~
   drivers/media/i2c/imx283.c:492:30: note: (near initialization for 'supported_modes_10bit[0].crop.left')
      .crop = CENTERED_RECTANGLE(imx283_active_area, 5472, 3648),
                                 ^
   drivers/media/i2c/imx283.c:412:11: note: in definition of macro 'CENTERED_RECTANGLE'
      .left = rect.left + ((rect.width - (_width)) / 2), \
              ^~~~
   drivers/media/i2c/imx283.c:492:30: error: initializer element is not constant
      .crop = CENTERED_RECTANGLE(imx283_active_area, 5472, 3648),
                                 ^
   drivers/media/i2c/imx283.c:413:10: note: in definition of macro 'CENTERED_RECTANGLE'
      .top = rect.top + ((rect.height - (_height)) / 2), \
             ^~~~
   drivers/media/i2c/imx283.c:492:30: note: (near initialization for 'supported_modes_10bit[0].crop.top')
      .crop = CENTERED_RECTANGLE(imx283_active_area, 5472, 3648),
                                 ^
   drivers/media/i2c/imx283.c:413:10: note: in definition of macro 'CENTERED_RECTANGLE'
      .top = rect.top + ((rect.height - (_height)) / 2), \
             ^~~~


vim +443 drivers/media/i2c/imx283.c

   409	
   410	#define CENTERED_RECTANGLE(rect, _width, _height)			\
   411		{								\
   412			.left = rect.left + ((rect.width - (_width)) / 2),	\
   413			.top = rect.top + ((rect.height - (_height)) / 2),	\
   414			.width = (_width),					\
   415			.height = (_height),					\
   416		}
   417	
   418	/* Mode configs */
   419	static const struct imx283_mode supported_modes_12bit[] = {
   420		{
   421			/* 20MPix 21.40 fps readout mode 0 */
   422			.mode = IMX283_MODE_0,
   423			.bpp = 12,
   424			.width = 5472,
   425			.height = 3648,
   426			.min_hmax = 5914, /* 887 @ 480MHz/72MHz */
   427			.min_vmax = 3793, /* Lines */
   428	
   429			.veff = 3694,
   430			.vst = 0,
   431			.vct = 0,
   432	
   433			.hbin_ratio = 1,
   434			.vbin_ratio = 1,
   435	
   436			/* 20.00 FPS */
   437			.default_hmax = 6000, /* 900 @ 480MHz/72MHz */
   438			.default_vmax = 4000,
   439	
   440			.min_shr = 11,
   441			.horizontal_ob = 96,
   442			.vertical_ob = 16,
 > 443			.crop = CENTERED_RECTANGLE(imx283_active_area, 5472, 3648),
   444		},
   445		{
   446			/*
   447			 * Readout mode 2 : 2/2 binned mode (2736x1824)
   448			 */
   449			.mode = IMX283_MODE_2,
   450			.bpp = 12,
   451			.width = 2736,
   452			.height = 1824,
   453			.min_hmax = 2414, /* Pixels (362 * 480MHz/72MHz + padding) */
   454			.min_vmax = 3840, /* Lines */
   455	
   456			/* 50.00 FPS */
   457			.default_hmax = 2500, /* 375 @ 480MHz/72Mhz */
   458			.default_vmax = 3840,
   459	
   460			.veff = 1824,
   461			.vst = 0,
   462			.vct = 0,
   463	
   464			.hbin_ratio = 2,
   465			.vbin_ratio = 2,
   466	
   467			.min_shr = 12,
   468			.horizontal_ob = 48,
   469			.vertical_ob = 4,
   470	
   471			.crop = CENTERED_RECTANGLE(imx283_active_area, 5472, 3648),
   472		},
   473	};
   474	

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux