All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dpcd.c:195 core_link_read_dpcd() error: uninitialized symbol 'status'.
Date: Thu, 10 Mar 2022 04:25:42 +0800	[thread overview]
Message-ID: <202203100456.e9vEEEQa-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5895 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Wesley Chalmers <Wesley.Chalmers@amd.com>
CC: Alex Deucher <alexander.deucher@amd.com>
CC: Jun Lei <Jun.Lei@amd.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   330f4c53d3c2d8b11d86ec03a964b86dc81452f5
commit: 9cf9498f668d4c78616ebd2fe2e5f3850b189c5b drm/amd/display: Partition DPCD address space and break up transactions
date:   9 months ago
:::::: branch date: 23 hours ago
:::::: commit date: 9 months ago
config: powerpc-randconfig-m031-20220301 (https://download.01.org/0day-ci/archive/20220310/202203100456.e9vEEEQa-lkp(a)intel.com/config)
compiler: powerpc-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dpcd.c:195 core_link_read_dpcd() error: uninitialized symbol 'status'.
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dpcd.c:217 core_link_write_dpcd() error: uninitialized symbol 'status'.

vim +/status +195 drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dpcd.c

30adeee52d1eba Wesley Chalmers 2021-04-01  164  
30adeee52d1eba Wesley Chalmers 2021-04-01  165  enum dc_status core_link_read_dpcd(
30adeee52d1eba Wesley Chalmers 2021-04-01  166  	struct dc_link *link,
30adeee52d1eba Wesley Chalmers 2021-04-01  167  	uint32_t address,
30adeee52d1eba Wesley Chalmers 2021-04-01  168  	uint8_t *data,
30adeee52d1eba Wesley Chalmers 2021-04-01  169  	uint32_t size)
30adeee52d1eba Wesley Chalmers 2021-04-01  170  {
30adeee52d1eba Wesley Chalmers 2021-04-01  171  	uint32_t extended_address;
9cf9498f668d4c Wesley Chalmers 2021-04-08  172  	uint32_t partitioned_address;
30adeee52d1eba Wesley Chalmers 2021-04-01  173  	uint8_t *extended_data;
30adeee52d1eba Wesley Chalmers 2021-04-01  174  	uint32_t extended_size;
9cf9498f668d4c Wesley Chalmers 2021-04-08  175  	/* size of the remaining partitioned address space */
9cf9498f668d4c Wesley Chalmers 2021-04-08  176  	uint32_t size_left_to_read;
30adeee52d1eba Wesley Chalmers 2021-04-01  177  	enum dc_status status;
9cf9498f668d4c Wesley Chalmers 2021-04-08  178  	/* size of the next partition to be read from */
9cf9498f668d4c Wesley Chalmers 2021-04-08  179  	uint32_t partition_size;
9cf9498f668d4c Wesley Chalmers 2021-04-08  180  	uint32_t data_index = 0;
30adeee52d1eba Wesley Chalmers 2021-04-01  181  
30adeee52d1eba Wesley Chalmers 2021-04-01  182  	dpcd_extend_address_range(address, data, size, &extended_address, &extended_data, &extended_size);
9cf9498f668d4c Wesley Chalmers 2021-04-08  183  	partitioned_address = extended_address;
9cf9498f668d4c Wesley Chalmers 2021-04-08  184  	size_left_to_read = extended_size;
9cf9498f668d4c Wesley Chalmers 2021-04-08  185  	while (size_left_to_read) {
9cf9498f668d4c Wesley Chalmers 2021-04-08  186  		partition_size = dpcd_get_next_partition_size(partitioned_address, size_left_to_read);
9cf9498f668d4c Wesley Chalmers 2021-04-08  187  		status = internal_link_read_dpcd(link, partitioned_address, &extended_data[data_index], partition_size);
9cf9498f668d4c Wesley Chalmers 2021-04-08  188  		if (status != DC_OK)
9cf9498f668d4c Wesley Chalmers 2021-04-08  189  			break;
9cf9498f668d4c Wesley Chalmers 2021-04-08  190  		partitioned_address += partition_size;
9cf9498f668d4c Wesley Chalmers 2021-04-08  191  		data_index += partition_size;
9cf9498f668d4c Wesley Chalmers 2021-04-08  192  		size_left_to_read -= partition_size;
9cf9498f668d4c Wesley Chalmers 2021-04-08  193  	}
30adeee52d1eba Wesley Chalmers 2021-04-01  194  	dpcd_reduce_address_range(extended_address, extended_data, extended_size, address, data, size);
30adeee52d1eba Wesley Chalmers 2021-04-01 @195  	return status;
30adeee52d1eba Wesley Chalmers 2021-04-01  196  }
30adeee52d1eba Wesley Chalmers 2021-04-01  197  
30adeee52d1eba Wesley Chalmers 2021-04-01  198  enum dc_status core_link_write_dpcd(
30adeee52d1eba Wesley Chalmers 2021-04-01  199  	struct dc_link *link,
30adeee52d1eba Wesley Chalmers 2021-04-01  200  	uint32_t address,
30adeee52d1eba Wesley Chalmers 2021-04-01  201  	const uint8_t *data,
30adeee52d1eba Wesley Chalmers 2021-04-01  202  	uint32_t size)
30adeee52d1eba Wesley Chalmers 2021-04-01  203  {
9cf9498f668d4c Wesley Chalmers 2021-04-08  204  	uint32_t partition_size;
9cf9498f668d4c Wesley Chalmers 2021-04-08  205  	uint32_t data_index = 0;
9cf9498f668d4c Wesley Chalmers 2021-04-08  206  	enum dc_status status;
9cf9498f668d4c Wesley Chalmers 2021-04-08  207  
9cf9498f668d4c Wesley Chalmers 2021-04-08  208  	while (size) {
9cf9498f668d4c Wesley Chalmers 2021-04-08  209  		partition_size = dpcd_get_next_partition_size(address, size);
9cf9498f668d4c Wesley Chalmers 2021-04-08  210  		status = internal_link_write_dpcd(link, address, &data[data_index], partition_size);
9cf9498f668d4c Wesley Chalmers 2021-04-08  211  		if (status != DC_OK)
9cf9498f668d4c Wesley Chalmers 2021-04-08  212  			break;
9cf9498f668d4c Wesley Chalmers 2021-04-08  213  		address += partition_size;
9cf9498f668d4c Wesley Chalmers 2021-04-08  214  		data_index += partition_size;
9cf9498f668d4c Wesley Chalmers 2021-04-08  215  		size -= partition_size;
9cf9498f668d4c Wesley Chalmers 2021-04-08  216  	}
9cf9498f668d4c Wesley Chalmers 2021-04-08 @217  	return status;

:::::: The code at line 195 was first introduced by commit
:::::: 30adeee52d1ebadd8e4e594a54c7cf77250b91db drm/amd/display: Enforce DPCD Address ranges

:::::: TO: Wesley Chalmers <Wesley.Chalmers@amd.com>
:::::: CC: Alex Deucher <alexander.deucher@amd.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

             reply	other threads:[~2022-03-09 20:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-09 20:25 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-03-04  2:47 drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dpcd.c:195 core_link_read_dpcd() error: uninitialized symbol 'status' kernel test robot
2022-03-02  2:51 kernel test robot
2021-12-19 16:53 kernel test robot

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=202203100456.e9vEEEQa-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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 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.