[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202511031813.c8c7mkXF-lkp@intel.com>
Date: Mon, 3 Nov 2025 18:54:29 +0800
From: kernel test robot <lkp@...el.com>
To: Wangao Wang <wangao.wang@....qualcomm.com>,
	Vikash Garodia <vikash.garodia@....qualcomm.com>,
	Dikshita Agarwal <dikshita.agarwal@....qualcomm.com>,
	Abhinav Kumar <abhinav.kumar@...ux.dev>,
	Bryan O'Donoghue <bod@...nel.org>,
	Mauro Carvalho Chehab <mchehab@...nel.org>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	linux-media@...r.kernel.org, linux-arm-msm@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Wangao Wang <wangao.wang@....qualcomm.com>, quic_qiweil@...cinc.com,
	quic_renjiang@...cinc.com
Subject: Re: [PATCH v2 1/5] media: qcom: iris: Improve format alignment for
 encoder
Hi Wangao,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 13863a59e410cab46d26751941980dc8f088b9b3]
url:    https://github.com/intel-lab-lkp/linux/commits/Wangao-Wang/media-qcom-iris-Improve-format-alignment-for-encoder/20251031-175803
base:   13863a59e410cab46d26751941980dc8f088b9b3
patch link:    https://lore.kernel.org/r/20251031-iris_encoder_enhancements-v2-1-319cd75cbb45%40oss.qualcomm.com
patch subject: [PATCH v2 1/5] media: qcom: iris: Improve format alignment for encoder
config: riscv-allmodconfig (https://download.01.org/0day-ci/archive/20251103/202511031813.c8c7mkXF-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project d2625a438020ad35330cda29c3def102c1687b1b)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251103/202511031813.c8c7mkXF-lkp@intel.com/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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511031813.c8c7mkXF-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c:236:7: warning: variable 'left_offset' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
     236 |                 if (V4L2_TYPE_IS_CAPTURE(plane)) {
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/linux/videodev2.h:182:2: note: expanded from macro 'V4L2_TYPE_IS_CAPTURE'
     182 |         (V4L2_TYPE_IS_VALID(type) && !V4L2_TYPE_IS_OUTPUT(type))
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c:246:43: note: uninitialized use occurs here
     246 |         payload[0] = FIELD_PREP(GENMASK(31, 16), left_offset) | top_offset;
         |                                                  ^~~~~~~~~~~
   drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c:236:3: note: remove the 'if' if its condition is always true
     236 |                 if (V4L2_TYPE_IS_CAPTURE(plane)) {
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c:236:7: warning: variable 'left_offset' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
     236 |                 if (V4L2_TYPE_IS_CAPTURE(plane)) {
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/linux/videodev2.h:182:3: note: expanded from macro 'V4L2_TYPE_IS_CAPTURE'
     182 |         (V4L2_TYPE_IS_VALID(type) && !V4L2_TYPE_IS_OUTPUT(type))
         |          ^~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/linux/videodev2.h:165:2: note: expanded from macro 'V4L2_TYPE_IS_VALID'
     165 |         ((type) >= V4L2_BUF_TYPE_VIDEO_CAPTURE &&\
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     166 |          (type) <= V4L2_BUF_TYPE_META_OUTPUT)
         |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c:246:43: note: uninitialized use occurs here
     246 |         payload[0] = FIELD_PREP(GENMASK(31, 16), left_offset) | top_offset;
         |                                                  ^~~~~~~~~~~
   drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c:236:7: note: remove the '&&' if its condition is always true
     236 |                 if (V4L2_TYPE_IS_CAPTURE(plane)) {
         |                     ^
   include/uapi/linux/videodev2.h:182:3: note: expanded from macro 'V4L2_TYPE_IS_CAPTURE'
     182 |         (V4L2_TYPE_IS_VALID(type) && !V4L2_TYPE_IS_OUTPUT(type))
         |          ^
   include/uapi/linux/videodev2.h:165:2: note: expanded from macro 'V4L2_TYPE_IS_VALID'
     165 |         ((type) >= V4L2_BUF_TYPE_VIDEO_CAPTURE &&\
         |         ^
>> drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c:236:7: warning: variable 'left_offset' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
     236 |                 if (V4L2_TYPE_IS_CAPTURE(plane)) {
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/linux/videodev2.h:182:3: note: expanded from macro 'V4L2_TYPE_IS_CAPTURE'
     182 |         (V4L2_TYPE_IS_VALID(type) && !V4L2_TYPE_IS_OUTPUT(type))
         |          ^~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/linux/videodev2.h:165:3: note: expanded from macro 'V4L2_TYPE_IS_VALID'
     165 |         ((type) >= V4L2_BUF_TYPE_VIDEO_CAPTURE &&\
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c:246:43: note: uninitialized use occurs here
     246 |         payload[0] = FIELD_PREP(GENMASK(31, 16), left_offset) | top_offset;
         |                                                  ^~~~~~~~~~~
   drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c:236:7: note: remove the '&&' if its condition is always true
     236 |                 if (V4L2_TYPE_IS_CAPTURE(plane)) {
         |                     ^
   include/uapi/linux/videodev2.h:182:3: note: expanded from macro 'V4L2_TYPE_IS_CAPTURE'
     182 |         (V4L2_TYPE_IS_VALID(type) && !V4L2_TYPE_IS_OUTPUT(type))
         |          ^
   include/uapi/linux/videodev2.h:165:3: note: expanded from macro 'V4L2_TYPE_IS_VALID'
     165 |         ((type) >= V4L2_BUF_TYPE_VIDEO_CAPTURE &&\
         |          ^
   drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c:217:17: note: initialize the variable 'left_offset' to silence this warning
     217 |         u32 left_offset, top_offset;
         |                        ^
         |                         = 0
   3 warnings generated.
vim +236 drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c
   211	
   212	static int iris_hfi_gen2_set_crop_offsets(struct iris_inst *inst, u32 plane)
   213	{
   214		struct iris_inst_hfi_gen2 *inst_hfi_gen2 = to_iris_inst_hfi_gen2(inst);
   215		u32 port = iris_hfi_gen2_get_port(inst, plane);
   216		u32 bottom_offset, right_offset;
   217		u32 left_offset, top_offset;
   218		u32 codec_align;
   219		u32 payload[2];
   220	
   221		codec_align = inst->codec == V4L2_PIX_FMT_HEVC ? 32 : 16;
   222	
   223		if (inst->domain == DECODER) {
   224			if (V4L2_TYPE_IS_OUTPUT(plane)) {
   225				bottom_offset = (inst->fmt_src->fmt.pix_mp.height - inst->crop.height);
   226				right_offset = (inst->fmt_src->fmt.pix_mp.width - inst->crop.width);
   227				left_offset = inst->crop.left;
   228				top_offset = inst->crop.top;
   229			} else {
   230				bottom_offset = (inst->fmt_dst->fmt.pix_mp.height - inst->compose.height);
   231				right_offset = (inst->fmt_dst->fmt.pix_mp.width - inst->compose.width);
   232				left_offset = inst->compose.left;
   233				top_offset = inst->compose.top;
   234			}
   235		} else {
 > 236			if (V4L2_TYPE_IS_CAPTURE(plane)) {
   237				bottom_offset = (ALIGN(inst->enc_raw_height, codec_align) -
   238						inst->enc_raw_height);
   239				right_offset = (ALIGN(inst->enc_raw_width, codec_align) -
   240						inst->enc_raw_width);
   241				left_offset = inst->crop.left;
   242				top_offset = inst->crop.top;
   243			}
   244		}
   245	
   246		payload[0] = FIELD_PREP(GENMASK(31, 16), left_offset) | top_offset;
   247		payload[1] = FIELD_PREP(GENMASK(31, 16), right_offset) | bottom_offset;
   248		inst_hfi_gen2->src_subcr_params.crop_offsets[0] = payload[0];
   249		inst_hfi_gen2->src_subcr_params.crop_offsets[1] = payload[1];
   250	
   251		return iris_hfi_gen2_session_set_property(inst,
   252							  HFI_PROP_CROP_OFFSETS,
   253							  HFI_HOST_FLAGS_NONE,
   254							  port,
   255							  HFI_PAYLOAD_64_PACKED,
   256							  &payload,
   257							  sizeof(u64));
   258	}
   259	
-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists