All of lore.kernel.org
 help / color / mirror / Atom feed
* [chrome-os:chromeos-5.15 25/64] drivers/media/test-drivers/visl/visl-video.c:380:34: warning: taking address of packed member 'width' of class or structure 'v4l2_pix_format_mplane' may result in an unaligned pointer value
@ 2023-03-28  8:33 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-03-28  8:33 UTC (permalink / raw)
  Cc: oe-kbuild-all, llvm

TO: cros-kernel-buildreports@googlegroups.com
TO: Guenter Roeck <groeck@google.com>

tree:   https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.15
head:   c7060e95007c2b896f4729104c381e0f0727c228
commit: e2fbae08263ef80e2972124ca04cdef1e51d3ac1 [25/64] BACKPORT: media: visl: add virtual stateless decoder driver
config: mips-randconfig-r014-20230326 (https://download.01.org/0day-ci/archive/20230328/202303281617.np7VyX09-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 67409911353323ca5edf2049ef0df54132fa1ca7)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips64el-linux-gnuabi64
        git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
        git fetch --no-tags chrome-os chromeos-5.15
        git checkout e2fbae08263ef80e2972124ca04cdef1e51d3ac1
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/media/test-drivers/visl/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303281617.np7VyX09-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/media/test-drivers/visl/visl-video.c:380:34: warning: taking address of packed member 'width' of class or structure 'v4l2_pix_format_mplane' may result in an unaligned pointer value [-Waddress-of-packed-member]
           v4l2_apply_frmsize_constraints(&pix_mp->width,
                                           ^~~~~~~~~~~~~
>> drivers/media/test-drivers/visl/visl-video.c:381:13: warning: taking address of packed member 'height' of class or structure 'v4l2_pix_format_mplane' may result in an unaligned pointer value [-Waddress-of-packed-member]
                                          &pix_mp->height,
                                           ^~~~~~~~~~~~~~
   drivers/media/test-drivers/visl/visl-video.c:404:34: warning: taking address of packed member 'width' of class or structure 'v4l2_pix_format_mplane' may result in an unaligned pointer value [-Waddress-of-packed-member]
           v4l2_apply_frmsize_constraints(&pix_mp->width,
                                           ^~~~~~~~~~~~~
   drivers/media/test-drivers/visl/visl-video.c:405:13: warning: taking address of packed member 'height' of class or structure 'v4l2_pix_format_mplane' may result in an unaligned pointer value [-Waddress-of-packed-member]
                                          &pix_mp->height,
                                           ^~~~~~~~~~~~~~
   4 warnings generated.


vim +380 drivers/media/test-drivers/visl/visl-video.c

   361	
   362	static int visl_try_fmt_vid_cap(struct file *file, void *priv,
   363					struct v4l2_format *f)
   364	{
   365		struct v4l2_pix_format_mplane *pix_mp = &f->fmt.pix_mp;
   366		struct visl_ctx *ctx = visl_file_to_ctx(file);
   367		const struct visl_coded_format_desc *coded_desc;
   368		unsigned int i;
   369	
   370		coded_desc = ctx->coded_format_desc;
   371	
   372		for (i = 0; i < coded_desc->num_decoded_fmts; i++) {
   373			if (coded_desc->decoded_fmts[i] == pix_mp->pixelformat)
   374				break;
   375		}
   376	
   377		if (i == coded_desc->num_decoded_fmts)
   378			pix_mp->pixelformat = coded_desc->decoded_fmts[0];
   379	
 > 380		v4l2_apply_frmsize_constraints(&pix_mp->width,
 > 381					       &pix_mp->height,
   382					       &coded_desc->frmsize);
   383	
   384		v4l2_fill_pixfmt_mp(pix_mp, pix_mp->pixelformat,
   385				    pix_mp->width, pix_mp->height);
   386	
   387		pix_mp->field = V4L2_FIELD_NONE;
   388	
   389		return 0;
   390	}
   391	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-28  8:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-28  8:33 [chrome-os:chromeos-5.15 25/64] drivers/media/test-drivers/visl/visl-video.c:380:34: warning: taking address of packed member 'width' of class or structure 'v4l2_pix_format_mplane' may result in an unaligned pointer value kernel test robot

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.