linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alex Deucher <alexander.deucher@amd.com>
Cc: kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 7388/7959] drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:1348:5: warning: no previous prototype for 'amdgpu_discovery_get_mall_info'
Date: Fri, 29 Apr 2022 19:24:50 +0800	[thread overview]
Message-ID: <202204291924.vTGZmerI-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   5469f0c06732a077c70a759a81f2a1f00b277694
commit: e24d0e91b336762d8756d08b13c2a4e33dceac77 [7388/7959] drm/amdgpu/discovery: move all table parsing into amdgpu_discovery.c
config: alpha-buildonly-randconfig-r003-20220428 (https://download.01.org/0day-ci/archive/20220429/202204291924.vTGZmerI-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.3.0
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=e24d0e91b336762d8756d08b13c2a4e33dceac77
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout e24d0e91b336762d8756d08b13c2a4e33dceac77
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash drivers/gpu/drm/amd/amdgpu/

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

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:1348:5: warning: no previous prototype for 'amdgpu_discovery_get_mall_info' [-Wmissing-prototypes]
    1348 | int amdgpu_discovery_get_mall_info(struct amdgpu_device *adev)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/amdgpu_discovery_get_mall_info +1348 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

24681cb50bcbe0 Alex Deucher 2022-03-29  1347  
24681cb50bcbe0 Alex Deucher 2022-03-29 @1348  int amdgpu_discovery_get_mall_info(struct amdgpu_device *adev)
24681cb50bcbe0 Alex Deucher 2022-03-29  1349  {
24681cb50bcbe0 Alex Deucher 2022-03-29  1350  	struct binary_header *bhdr;
24681cb50bcbe0 Alex Deucher 2022-03-29  1351  	union mall_info *mall_info;
24681cb50bcbe0 Alex Deucher 2022-03-29  1352  	u32 u, mall_size_per_umc, m_s_present, half_use;
24681cb50bcbe0 Alex Deucher 2022-03-29  1353  	u64 mall_size;
f716113aacea12 Alex Deucher 2022-03-30  1354  	u16 offset;
24681cb50bcbe0 Alex Deucher 2022-03-29  1355  
24681cb50bcbe0 Alex Deucher 2022-03-29  1356  	if (!adev->mman.discovery_bin) {
24681cb50bcbe0 Alex Deucher 2022-03-29  1357  		DRM_ERROR("ip discovery uninitialized\n");
24681cb50bcbe0 Alex Deucher 2022-03-29  1358  		return -EINVAL;
24681cb50bcbe0 Alex Deucher 2022-03-29  1359  	}
24681cb50bcbe0 Alex Deucher 2022-03-29  1360  
24681cb50bcbe0 Alex Deucher 2022-03-29  1361  	bhdr = (struct binary_header *)adev->mman.discovery_bin;
f716113aacea12 Alex Deucher 2022-03-30  1362  	offset = le16_to_cpu(bhdr->table_list[MALL_INFO].offset);
f716113aacea12 Alex Deucher 2022-03-30  1363  
e24d0e91b33676 Alex Deucher 2022-03-30  1364  	if (!offset)
e24d0e91b33676 Alex Deucher 2022-03-30  1365  		return 0;
f716113aacea12 Alex Deucher 2022-03-30  1366  
f716113aacea12 Alex Deucher 2022-03-30  1367  	mall_info = (union mall_info *)(adev->mman.discovery_bin + offset);
24681cb50bcbe0 Alex Deucher 2022-03-29  1368  
24681cb50bcbe0 Alex Deucher 2022-03-29  1369  	switch (le16_to_cpu(mall_info->v1.header.version_major)) {
24681cb50bcbe0 Alex Deucher 2022-03-29  1370  	case 1:
24681cb50bcbe0 Alex Deucher 2022-03-29  1371  		mall_size = 0;
24681cb50bcbe0 Alex Deucher 2022-03-29  1372  		mall_size_per_umc = le32_to_cpu(mall_info->v1.mall_size_per_m);
24681cb50bcbe0 Alex Deucher 2022-03-29  1373  		m_s_present = le32_to_cpu(mall_info->v1.m_s_present);
24681cb50bcbe0 Alex Deucher 2022-03-29  1374  		half_use = le32_to_cpu(mall_info->v1.m_half_use);
24681cb50bcbe0 Alex Deucher 2022-03-29  1375  		for (u = 0; u < adev->gmc.num_umc; u++) {
24681cb50bcbe0 Alex Deucher 2022-03-29  1376  			if (m_s_present & (1 << u))
24681cb50bcbe0 Alex Deucher 2022-03-29  1377  				mall_size += mall_size_per_umc * 2;
24681cb50bcbe0 Alex Deucher 2022-03-29  1378  			else if (half_use & (1 << u))
24681cb50bcbe0 Alex Deucher 2022-03-29  1379  				mall_size += mall_size_per_umc / 2;
24681cb50bcbe0 Alex Deucher 2022-03-29  1380  			else
24681cb50bcbe0 Alex Deucher 2022-03-29  1381  				mall_size += mall_size_per_umc;
24681cb50bcbe0 Alex Deucher 2022-03-29  1382  		}
24681cb50bcbe0 Alex Deucher 2022-03-29  1383  		adev->gmc.mall_size = mall_size;
24681cb50bcbe0 Alex Deucher 2022-03-29  1384  		break;
24681cb50bcbe0 Alex Deucher 2022-03-29  1385  	default:
24681cb50bcbe0 Alex Deucher 2022-03-29  1386  		dev_err(adev->dev,
24681cb50bcbe0 Alex Deucher 2022-03-29  1387  			"Unhandled MALL info table %d.%d\n",
24681cb50bcbe0 Alex Deucher 2022-03-29  1388  			le16_to_cpu(mall_info->v1.header.version_major),
24681cb50bcbe0 Alex Deucher 2022-03-29  1389  			le16_to_cpu(mall_info->v1.header.version_minor));
24681cb50bcbe0 Alex Deucher 2022-03-29  1390  		return -EINVAL;
24681cb50bcbe0 Alex Deucher 2022-03-29  1391  	}
24681cb50bcbe0 Alex Deucher 2022-03-29  1392  	return 0;
622469c87fc3e6 Alex Deucher 2022-03-30  1393  }
622469c87fc3e6 Alex Deucher 2022-03-30  1394  

:::::: The code at line 1348 was first introduced by commit
:::::: 24681cb50bcbe09a4f8f609d35c350c7d246fe5e drm/amdgpu/discovery: add a function to get the mall_size

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

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


                 reply	other threads:[~2022-04-29 11:25 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=202204291924.vTGZmerI-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alexander.deucher@amd.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).