lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202408280735.el4Z7sYK-lkp@intel.com>
Date: Wed, 28 Aug 2024 08:26:00 +0800
From: kernel test robot <lkp@...el.com>
To: Dikshita Agarwal via B4 Relay <devnull+quic_dikshita.quicinc.com@...nel.org>,
	Vikash Garodia <quic_vgarodia@...cinc.com>,
	Abhinav Kumar <quic_abhinavk@...cinc.com>,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Philipp Zabel <p.zabel@...gutronix.de>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	linux-media@...r.kernel.org, linux-arm-msm@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	Dikshita Agarwal <quic_dikshita@...cinc.com>
Subject: Re: [PATCH v3 18/29] media: iris: implement vb2 streaming ops

Hi Dikshita,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 31aaa7d95e09892c81df0d7c49ae85640fa4e202]

url:    https://github.com/intel-lab-lkp/linux/commits/Dikshita-Agarwal-via-B4-Relay/dt-bindings-media-Add-sm8550-dt-schema/20240827-181059
base:   31aaa7d95e09892c81df0d7c49ae85640fa4e202
patch link:    https://lore.kernel.org/r/20240827-iris_v3-v3-18-c5fdbbe65e70%40quicinc.com
patch subject: [PATCH v3 18/29] media: iris: implement vb2 streaming ops
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240828/202408280735.el4Z7sYK-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240828/202408280735.el4Z7sYK-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/202408280735.el4Z7sYK-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c:167:12: warning: variable 'flush_type' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
     167 |                 else if (V4L2_TYPE_IS_CAPTURE(plane))
         |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/linux/videodev2.h:174:36: note: expanded from macro 'V4L2_TYPE_IS_CAPTURE'
     174 | #define V4L2_TYPE_IS_CAPTURE(type) (!V4L2_TYPE_IS_OUTPUT(type))
         |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c:175:26: note: uninitialized use occurs here
     175 |                 flush_pkt.flush_type = flush_type;
         |                                        ^~~~~~~~~~
   drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c:167:8: note: remove the 'if' if its condition is always true
     167 |                 else if (V4L2_TYPE_IS_CAPTURE(plane))
         |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     168 |                         flush_type = HFI_FLUSH_OUTPUT;
   drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c:145:16: note: initialize the variable 'flush_type' to silence this warning
     145 |         u32 flush_type;
         |                       ^
         |                        = 0
   1 warning generated.


vim +167 drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c

   139	
   140	static int iris_hfi_gen1_session_stop(struct iris_inst *inst, u32 plane)
   141	{
   142		struct iris_core *core = inst->core;
   143		struct hfi_session_flush_pkt flush_pkt;
   144		struct hfi_session_pkt pkt;
   145		u32 flush_type;
   146		int ret = 0;
   147	
   148		if ((V4L2_TYPE_IS_OUTPUT(plane) &&
   149		     inst->state == IRIS_INST_INPUT_STREAMING) ||
   150		    (V4L2_TYPE_IS_CAPTURE(plane) &&
   151		     inst->state == IRIS_INST_OUTPUT_STREAMING) ||
   152		    inst->state == IRIS_INST_ERROR) {
   153			reinit_completion(&inst->completion);
   154			iris_hfi_gen1_packet_session_cmd(inst, &pkt, HFI_CMD_SESSION_STOP);
   155			ret = iris_hfi_queue_cmd_write(core, &pkt, pkt.shdr.hdr.size);
   156			if (!ret)
   157				ret = iris_wait_for_session_response(inst, false);
   158	
   159			reinit_completion(&inst->completion);
   160			iris_hfi_gen1_packet_session_cmd(inst, &pkt, HFI_CMD_SESSION_RELEASE_RESOURCES);
   161			ret = iris_hfi_queue_cmd_write(core, &pkt, pkt.shdr.hdr.size);
   162			if (!ret)
   163				ret = iris_wait_for_session_response(inst, false);
   164		} else if (inst->state == IRIS_INST_STREAMING) {
   165			if (V4L2_TYPE_IS_OUTPUT(plane))
   166				flush_type = HFI_FLUSH_ALL;
 > 167			else if (V4L2_TYPE_IS_CAPTURE(plane))
   168				flush_type = HFI_FLUSH_OUTPUT;
   169	
   170			reinit_completion(&inst->flush_completion);
   171	
   172			flush_pkt.shdr.hdr.size = sizeof(struct hfi_session_flush_pkt);
   173			flush_pkt.shdr.hdr.pkt_type = HFI_CMD_SESSION_FLUSH;
   174			flush_pkt.shdr.session_id = inst->session_id;
   175			flush_pkt.flush_type = flush_type;
   176	
   177			ret = iris_hfi_queue_cmd_write(core, &flush_pkt, flush_pkt.shdr.hdr.size);
   178			if (!ret)
   179				ret = iris_wait_for_session_response(inst, true);
   180		}
   181	
   182		return ret;
   183	}
   184	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ