mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <yujie.liu@intel.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: <llvm@lists.linux.dev>, <kbuild-all@lists.01.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	Lu Baolu <baolu.lu@linux.intel.com>
Subject: [jgunthorpe:iommufd 18/31] drivers/gpu/drm/tegra/drm.c:998:23: warning: Value stored to 'domain' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
Date: Thu, 17 Feb 2022 17:52:49 +0800	[thread overview]
Message-ID: <ddc1fb54-f7c7-8936-1b5a-53e7ce4b91b2@intel.com> (raw)
In-Reply-To: <202202160335.Mb5DqLiM-lkp@intel.com>

tree:   https://github.com/jgunthorpe/linux iommufd
head:   6b5b3f20ed6b64824c2d447b4f4555fcb390bf3b
commit: ae38950aefd81c9648c5416ec4a5003e4ec03e42 [18/31] drm/tegra: Use the iommu dma_owner mechanism
config: arm-randconfig-c002-20220210 (https://download.01.org/0day-ci/archive/20220216/202202160335.Mb5DqLiM-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project e8bff9ae54a55b4dbfeb6ba55f723abbd81bf494)
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 arm cross compiling tool for clang build
         # apt-get install binutils-arm-linux-gnueabi
         # https://github.com/jgunthorpe/linux/commit/ae38950aefd81c9648c5416ec4a5003e4ec03e42
         git remote add jgunthorpe https://github.com/jgunthorpe/linux
         git fetch --no-tags jgunthorpe iommufd
         git checkout ae38950aefd81c9648c5416ec4a5003e4ec03e42
         # save the config file to linux build tree
         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer

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


clang-analyzer warnings: (new ones prefixed by >>)

 >> drivers/gpu/drm/tegra/drm.c:998:23: warning: Value stored to 'domain' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
            struct iommu_domain *domain = iommu_get_domain_for_dev(client->dev);
                                 ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/domain +998 drivers/gpu/drm/tegra/drm.c

0c407de5ed1a329 Thierry Reding  2018-05-04   995
aacdf19849734d1 Thierry Reding  2019-02-08   996  void host1x_client_iommu_detach(struct host1x_client *client)
0c407de5ed1a329 Thierry Reding  2018-05-04   997  {
ae38950aefd81c9 Jason Gunthorpe 2021-11-18  @998  	struct iommu_domain *domain = iommu_get_domain_for_dev(client->dev);
608f43ad27ab267 Thierry Reding  2019-12-02   999  	struct drm_device *drm = dev_get_drvdata(client->host);
0c407de5ed1a329 Thierry Reding  2018-05-04  1000  	struct tegra_drm *tegra = drm->dev_private;
0c407de5ed1a329 Thierry Reding  2018-05-04  1001
aacdf19849734d1 Thierry Reding  2019-02-08  1002  	if (client->group) {
ae38950aefd81c9 Jason Gunthorpe 2021-11-18  1003  		iommu_detach_device_shared(tegra->domain, client->dev);
ae38950aefd81c9 Jason Gunthorpe 2021-11-18  1004  		iommu_device_release_dma_owner(client->dev,
ae38950aefd81c9 Jason Gunthorpe 2021-11-18  1005  					       DMA_OWNER_PRIVATE_DOMAIN);
fa6661b7aa0b520 Thierry Reding  2019-10-28  1006  		client->group = NULL;
ae38950aefd81c9 Jason Gunthorpe 2021-11-18  1007  	} else {
ae38950aefd81c9 Jason Gunthorpe 2021-11-18  1008  		iommu_device_release_dma_owner(client->dev, DMA_OWNER_DMA_API);
0c407de5ed1a329 Thierry Reding  2018-05-04  1009  	}
0c407de5ed1a329 Thierry Reding  2018-05-04  1010  }
0c407de5ed1a329 Thierry Reding  2018-05-04  1011

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

           reply	other threads:[~2022-02-17  9:53 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <202202160335.Mb5DqLiM-lkp@intel.com>]

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=ddc1fb54-f7c7-8936-1b5a-53e7ce4b91b2@intel.com \
    --to=yujie.liu@intel.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=jgg@nvidia.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

all inboxes | Powered by JetHome®