All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: kbuild-all@01.org, linux-media@vger.kernel.org,
	Steve Longerbeam <slongerbeam@gmail.com>,
	kernel@pengutronix.de
Subject: Re: [PATCH 3/3] media: imx: fix media bus format enumeration
Date: Sat, 14 Sep 2019 11:49:33 +0800	[thread overview]
Message-ID: <201909141122.D3HDZBJ4%lkp@intel.com> (raw)
In-Reply-To: <20190912160122.5545-3-p.zabel@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 4113 bytes --]

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@intel.com>

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

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) ||
                                           ^~
>> drivers/staging/media/imx/imx-media-utils.c:257:18: warning: 'j' may be used uninitialized in this function [-Wmaybe-uninitialized]
     unsigned int i, j, k = 0;
                     ^

vim +/j +257 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	
   251	static int enum_format(u32 *fourcc, u32 *code, u32 index,
   252			       enum codespace_sel cs_sel,
   253			       bool allow_non_mbus,
   254			       bool allow_bayer)
   255	{
   256		const struct imx_media_pixfmt *fmt;
 > 257		unsigned int i, j, k = 0;
   258	
   259		for (i = 0; i < ARRAY_SIZE(pixel_formats); i++) {
   260			fmt = &pixel_formats[i];
   261	
   262			if ((cs_sel != CS_SEL_ANY && fmt->cs != cs_sel) ||
   263			    (!allow_non_mbus && !fmt->codes[0]) ||
   264			    (!allow_bayer && fmt->bayer))
   265				continue;
   266	
   267			if (fourcc && index == k)
   268				break;
   269	
   270			if (!code) {
   271				k++;
   272				continue;
   273			}
   274	
   275			for (j = 0; j < ARRAY_SIZE(fmt->codes) && fmt->codes[j]; j++) {
   276				if (index == k)
   277					goto out;
   278	
   279				k++;
   280			}
   281		}
   282		if (i == ARRAY_SIZE(pixel_formats))
   283			return -EINVAL;
   284	
   285	out:
   286		if (fourcc)
   287			*fourcc = fmt->fourcc;
   288		if (code)
   289			*code = fmt->codes[j];
   290	
   291		return 0;
   292	}
   293	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 54564 bytes --]

  reply	other threads:[~2019-09-14  3:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-12 16:01 [PATCH 1/3] media: imx: enable V4L2_PIX_FMT_XBGR32, _BGRX32, and _RGBX32 Philipp Zabel
2019-09-12 16:01 ` [PATCH 2/3] media: imx: fix and simplify pixel format enumeration Philipp Zabel
2019-09-14  3:36   ` kbuild test robot
2019-09-27  8:03   ` Hans Verkuil
2019-10-25 21:43   ` Steve Longerbeam
2019-09-12 16:01 ` [PATCH 3/3] media: imx: fix media bus " Philipp Zabel
2019-09-14  3:49   ` kbuild test robot [this message]
2019-09-27  7:33   ` Hans Verkuil
2019-10-25 21:48     ` Steve Longerbeam
2019-10-25 22:59       ` Steve Longerbeam

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=201909141122.D3HDZBJ4%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@01.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-media@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=slongerbeam@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.