public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Xavier Roumegue <xavier.roumegue@oss.nxp.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org, Hans Verkuil <hverkuil@xs4all.nl>,
	Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: [hverkuil-media-tree:for-v5.21b 12/13] drivers/media/platform/nxp/dw100/dw100.c:382:18: warning: variable 'dh' set but not used
Date: Wed, 3 Aug 2022 09:16:16 +0800	[thread overview]
Message-ID: <202208030910.mKccvhw6-lkp@intel.com> (raw)

tree:   git://linuxtv.org/hverkuil/media_tree.git for-v5.21b
head:   ac27e33a9e4dd1487bde072493d9303358af0507
commit: b92bfb7b8350160895d0ea34a98831ed4f01af1d [12/13] media: dw100: Add i.MX8MP dw100 dewarper driver
config: arm-randconfig-c002-20220802 (https://download.01.org/0day-ci/archive/20220803/202208030910.mKccvhw6-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 52cd00cabf479aa7eb6dbb063b7ba41ea57bce9e)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        git remote add hverkuil-media-tree git://linuxtv.org/hverkuil/media_tree.git
        git fetch --no-tags hverkuil-media-tree for-v5.21b
        git checkout b92bfb7b8350160895d0ea34a98831ed4f01af1d
        # 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=arm SHELL=/bin/bash drivers/media/platform/nxp/dw100/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/media/platform/nxp/dw100/dw100.c:382:18: warning: variable 'dh' set but not used [-Wunused-but-set-variable]
           u32 sw, sh, dw, dh, mw, mh, idx;
                           ^
>> drivers/media/platform/nxp/dw100/dw100.c:382:14: warning: variable 'dw' set but not used [-Wunused-but-set-variable]
           u32 sw, sh, dw, dh, mw, mh, idx;
                       ^
   In file included from drivers/media/platform/nxp/dw100/dw100.c:20:
   In file included from include/media/v4l2-ctrls.h:13:
   In file included from include/linux/videodev2.h:61:
   include/uapi/linux/videodev2.h:1776:2: warning: field  within 'struct v4l2_ext_control' is less aligned than 'union v4l2_ext_control::(anonymous at include/uapi/linux/videodev2.h:1776:2)' and is usually due to 'struct v4l2_ext_control' being packed, which can lead to unaligned accesses [-Wunaligned-access]
           union {
           ^
   3 warnings generated.


vim +/dh +382 drivers/media/platform/nxp/dw100/dw100.c

   363	
   364	/*
   365	 * Initialize the dewarping map with an identity mapping.
   366	 *
   367	 * A 16 pixels cell size grid is mapped on the destination image.
   368	 * The last cells width/height might be lesser than 16 if the destination image
   369	 * width/height is not divisible by 16. This dewarping grid map specifies the
   370	 * source image pixel location (x, y) on each grid intersection point.
   371	 * Bilinear interpolation is used to compute inner cell points locations.
   372	 *
   373	 * The coordinates are saved in UQ12.4 fixed point format.
   374	 */
   375	static void dw100_ctrl_dewarping_map_init(const struct v4l2_ctrl *ctrl,
   376						  u32 from_idx, u32 elems,
   377						  union v4l2_ctrl_ptr ptr)
   378	{
   379		struct dw100_ctx *ctx =
   380			container_of(ctrl->handler, struct dw100_ctx, hdl);
   381	
 > 382		u32 sw, sh, dw, dh, mw, mh, idx;
   383		u16 qx, qy, qdx, qdy, qsh, qsw;
   384		u32 *map = ctrl->p_cur.p_u32;
   385	
   386		sw = ctx->q_data[DW100_QUEUE_SRC].pix_fmt.width;
   387		dw = ctx->q_data[DW100_QUEUE_DST].pix_fmt.width;
   388		sh = ctx->q_data[DW100_QUEUE_SRC].pix_fmt.height;
   389		dh = ctx->q_data[DW100_QUEUE_DST].pix_fmt.height;
   390	
   391		mw = ctrl->dims[0];
   392		mh = ctrl->dims[1];
   393	
   394		qsw = dw100_map_convert_to_uq12_4(sw);
   395		qsh = dw100_map_convert_to_uq12_4(sh);
   396		qdx = qsw / (mw - 1);
   397		qdy = qsh / (mh - 1);
   398	
   399		ctx->map_width = mw;
   400		ctx->map_height = mh;
   401		ctx->map_size = mh * mw * sizeof(u32);
   402	
   403		for (idx = from_idx; idx < elems; idx++) {
   404			qy = min_t(u32, (idx / mw) * qdy, qsh);
   405			qx = min_t(u32, (idx % mw) * qdx, qsw);
   406			map[idx] = dw100_map_format_coordinates(qx, qy);
   407		}
   408	
   409		ctx->user_map_is_set = false;
   410	}
   411	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-08-03  1:16 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=202208030910.mKccvhw6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=hverkuil@xs4all.nl \
    --cc=kbuild-all@lists.01.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=xavier.roumegue@oss.nxp.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