public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ramesh Errabolu <Ramesh.Errabolu@amd.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org,
	Alex Deucher <alexander.deucher@amd.com>,
	Felix Kuehling <Felix.Kuehling@amd.com>
Subject: [agd5f:drm-next 156/174] drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1542:11: warning: variable 'i' set but not used
Date: Fri, 10 Jun 2022 08:11:56 +0800	[thread overview]
Message-ID: <202206100824.0OO7jTU5-lkp@intel.com> (raw)

tree:   https://gitlab.freedesktop.org/agd5f/linux.git drm-next
head:   64f6516e60b0bbe6abfc9f1d9f1999012e0f11a6
commit: 0f28cca87e9afc22280c44d378d2a6e249933977 [156/174] drm/amdkfd: Extend KFD device topology to surface peer-to-peer links
config: arm64-randconfig-r023-20220609 (https://download.01.org/0day-ci/archive/20220610/202206100824.0OO7jTU5-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 971e13d69e3e7b687213fef22952be6a328c426c)
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
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        git remote add agd5f https://gitlab.freedesktop.org/agd5f/linux.git
        git fetch --no-tags agd5f drm-next
        git checkout 0f28cca87e9afc22280c44d378d2a6e249933977
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/gpu/

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

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1542:11: warning: variable 'i' set but not used [-Wunused-but-set-variable]
           uint32_t i, k;
                    ^
   1 warning generated.


vim +/i +1542 drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c

  1537	
  1538	static int kfd_dev_create_p2p_links(void)
  1539	{
  1540		struct kfd_topology_device *dev;
  1541		struct kfd_topology_device *new_dev;
> 1542		uint32_t i, k;
  1543		int ret = 0;
  1544	
  1545		k = 0;
  1546		list_for_each_entry(dev, &topology_device_list, list)
  1547			k++;
  1548		if (k < 2)
  1549			return 0;
  1550	
  1551		new_dev = list_last_entry(&topology_device_list, struct kfd_topology_device, list);
  1552		if (WARN_ON(!new_dev->gpu))
  1553			return 0;
  1554	
  1555		k--;
  1556		i = 0;
  1557	
  1558		/* create in-direct links */
  1559		ret = kfd_create_indirect_link_prop(new_dev, k);
  1560		if (ret < 0)
  1561			goto out;
  1562	
  1563		/* create p2p links */
  1564	#if defined(CONFIG_HSA_AMD_P2P)
  1565		list_for_each_entry(dev, &topology_device_list, list) {
  1566			if (dev == new_dev)
  1567				break;
  1568			if (!dev->gpu || !dev->gpu->adev ||
  1569			    (dev->gpu->hive_id &&
  1570			     dev->gpu->hive_id == new_dev->gpu->hive_id))
  1571				goto next;
  1572	
  1573			/* check if node(s) is/are peer accessible in one direction or bi-direction */
  1574			ret = kfd_add_peer_prop(new_dev, dev, i, k);
  1575			if (ret < 0)
  1576				goto out;
  1577	
  1578			ret = kfd_add_peer_prop(dev, new_dev, k, i);
  1579			if (ret < 0)
  1580				goto out;
  1581	next:
  1582			i++;
  1583		}
  1584	#endif
  1585	
  1586	out:
  1587		return ret;
  1588	}
  1589	

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

                 reply	other threads:[~2022-06-10  0:13 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=202206100824.0OO7jTU5-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=Ramesh.Errabolu@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@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