Re: [PATCH 2/3] media: imx: fix and simplify pixel format enumeration

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

 



Hi Philipp,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linuxtv-media/master]
[cannot apply to v5.3-rc8 next-20190904]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Philipp-Zabel/media-imx-enable-V4L2_PIX_FMT_XBGR32-_BGRX32-and-_RGBX32/20190914-085415
base:   git://linuxtv.org/media_tree.git master
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   drivers/staging/media/imx/imx-media-utils.c: In function 'find_format':
>> drivers/staging/media/imx/imx-media-utils.c:232:40: warning: comparison between 'const enum ipu_color_space' and 'enum codespace_sel' [-Wenum-compare]
      if ((cs_sel != CS_SEL_ANY && fmt->cs != cs_sel) ||
                                           ^~
   drivers/staging/media/imx/imx-media-utils.c: In function 'enum_format':
   drivers/staging/media/imx/imx-media-utils.c:262:40: warning: comparison between 'const enum ipu_color_space' and 'enum codespace_sel' [-Wenum-compare]
      if ((cs_sel != CS_SEL_ANY && fmt->cs != cs_sel) ||
                                           ^~

vim +232 drivers/staging/media/imx/imx-media-utils.c

   218	
   219	static const
   220	struct imx_media_pixfmt *find_format(u32 fourcc,
   221					     u32 code,
   222					     enum codespace_sel cs_sel,
   223					     bool allow_non_mbus,
   224					     bool allow_bayer)
   225	{
   226		const struct imx_media_pixfmt *fmt;
   227		int i, j;
   228	
   229		for (i = 0; i < ARRAY_SIZE(pixel_formats); i++) {
   230			fmt = &pixel_formats[i];
   231	
 > 232			if ((cs_sel != CS_SEL_ANY && fmt->cs != cs_sel) ||
   233			    (!allow_non_mbus && !fmt->codes[0]) ||
   234			    (!allow_bayer && fmt->bayer))
   235				continue;
   236	
   237			if (fourcc && fmt->fourcc == fourcc)
   238				return fmt;
   239	
   240			if (!code)
   241				continue;
   242	
   243			for (j = 0; j < ARRAY_SIZE(fmt->codes) && fmt->codes[j]; j++) {
   244				if (code == fmt->codes[j])
   245					return fmt;
   246			}
   247		}
   248		return NULL;
   249	}
   250	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux