From: kernel test robot <lkp@intel.com>
To: Wayne Lin <Wayne.Lin@amd.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
dri-devel@lists.freedesktop.org, Lyude Paul <lyude@redhat.com>
Subject: [drm-misc:drm-misc-next 2/2] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:368:21: warning: variable 'old_payload' is uninitialized when used here
Date: Sat, 9 Sep 2023 15:07:51 +0800 [thread overview]
Message-ID: <202309091509.IBo0CGxg-lkp@intel.com> (raw)
tree: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
head: 5aa1dfcdf0a429e4941e2eef75b006a8c7a8ac49
commit: 5aa1dfcdf0a429e4941e2eef75b006a8c7a8ac49 [2/2] drm/mst: Refactor the flow for payload allocation/removement
config: arm64-randconfig-r034-20230909 (https://download.01.org/0day-ci/archive/20230909/202309091509.IBo0CGxg-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230909/202309091509.IBo0CGxg-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309091509.IBo0CGxg-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:368:21: warning: variable 'old_payload' is uninitialized when used here [-Wuninitialized]
368 | new_payload, old_payload);
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:344:61: note: initialize the variable 'old_payload' to silence this warning
344 | struct drm_dp_mst_atomic_payload *new_payload, *old_payload;
| ^
| = NULL
1 warning generated.
vim +/old_payload +368 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c
335
336 bool dm_helpers_dp_mst_send_payload_allocation(
337 struct dc_context *ctx,
338 const struct dc_stream_state *stream,
339 bool enable)
340 {
341 struct amdgpu_dm_connector *aconnector;
342 struct drm_dp_mst_topology_state *mst_state;
343 struct drm_dp_mst_topology_mgr *mst_mgr;
344 struct drm_dp_mst_atomic_payload *new_payload, *old_payload;
345 enum mst_progress_status set_flag = MST_ALLOCATE_NEW_PAYLOAD;
346 enum mst_progress_status clr_flag = MST_CLEAR_ALLOCATED_PAYLOAD;
347 int ret = 0;
348
349 aconnector = (struct amdgpu_dm_connector *)stream->dm_stream_context;
350
351 if (!aconnector || !aconnector->mst_root)
352 return false;
353
354 mst_mgr = &aconnector->mst_root->mst_mgr;
355 mst_state = to_drm_dp_mst_topology_state(mst_mgr->base.state);
356
357 new_payload = drm_atomic_get_mst_payload_state(mst_state, aconnector->mst_output_port);
358
359 if (!enable) {
360 set_flag = MST_CLEAR_ALLOCATED_PAYLOAD;
361 clr_flag = MST_ALLOCATE_NEW_PAYLOAD;
362 }
363
364 if (enable) {
365 ret = drm_dp_add_payload_part2(mst_mgr, mst_state->base.state, new_payload);
366 } else {
367 dm_helpers_construct_old_payload(stream->link, mst_state->pbn_div,
> 368 new_payload, old_payload);
369 drm_dp_remove_payload_part2(mst_mgr, mst_state, old_payload, new_payload);
370 }
371
372 if (ret) {
373 amdgpu_dm_set_mst_status(&aconnector->mst_status,
374 set_flag, false);
375 } else {
376 amdgpu_dm_set_mst_status(&aconnector->mst_status,
377 set_flag, true);
378 amdgpu_dm_set_mst_status(&aconnector->mst_status,
379 clr_flag, false);
380 }
381
382 return true;
383 }
384
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-09-09 7:08 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=202309091509.IBo0CGxg-lkp@intel.com \
--to=lkp@intel.com \
--cc=Wayne.Lin@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=llvm@lists.linux.dev \
--cc=lyude@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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