From: kernel test robot <lkp@intel.com>
To: Yu Kuai <yukuai3@huawei.com>,
robdclark@gmail.com, will@kernel.org, joro@8bytes.org
Cc: kbuild-all@lists.01.org, yi.zhang@huawei.com,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
clang-built-linux@googlegroups.com,
iommu@lists.linux-foundation.org, yukuai3@huawei.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] iommu/qcom: add missing put_device() call in qcom_iommu_of_xlate()
Date: Tue, 22 Sep 2020 03:13:53 +0800 [thread overview]
Message-ID: <202009220340.bJfsaeQn%lkp@intel.com> (raw)
In-Reply-To: <20200918011357.909335-1-yukuai3@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 7310 bytes --]
Hi Yu,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on iommu/next]
[also build test WARNING on linus/master v5.9-rc6 next-20200921]
[cannot apply to robclark/msm-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Yu-Kuai/iommu-qcom-add-missing-put_device-call-in-qcom_iommu_of_xlate/20200918-091341
base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: arm64-randconfig-r023-20200920 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 4e8c028158b56d9c2142a62464e8e0686bde3584)
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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
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/iommu/arm/arm-smmu/qcom_iommu.c:601:4: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
return -EINVAL;
^
drivers/iommu/arm/arm-smmu/qcom_iommu.c:599:3: note: previous statement is here
if (WARN_ON(qcom_iommu != dev_iommu_priv_get(dev)))
^
1 warning generated.
# https://github.com/0day-ci/linux/commit/2d982fb40897ad8088dd9dba06aee499f51c73ba
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Yu-Kuai/iommu-qcom-add-missing-put_device-call-in-qcom_iommu_of_xlate/20200918-091341
git checkout 2d982fb40897ad8088dd9dba06aee499f51c73ba
vim +/if +601 drivers/iommu/arm/arm-smmu/qcom_iommu.c
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 562
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 563 static int qcom_iommu_of_xlate(struct device *dev, struct of_phandle_args *args)
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 564 {
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 565 struct qcom_iommu_dev *qcom_iommu;
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 566 struct platform_device *iommu_pdev;
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 567 unsigned asid = args->args[0];
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 568
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 569 if (args->args_count != 1) {
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 570 dev_err(dev, "incorrect number of iommu params found for %s "
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 571 "(found %d, expected 1)\n",
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 572 args->np->full_name, args->args_count);
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 573 return -EINVAL;
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 574 }
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 575
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 576 iommu_pdev = of_find_device_by_node(args->np);
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 577 if (WARN_ON(!iommu_pdev))
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 578 return -EINVAL;
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 579
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 580 qcom_iommu = platform_get_drvdata(iommu_pdev);
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 581
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 582 /* make sure the asid specified in dt is valid, so we don't have
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 583 * to sanity check this elsewhere, since 'asid - 1' is used to
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 584 * index into qcom_iommu->ctxs:
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 585 */
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 586 if (WARN_ON(asid < 1) ||
2d982fb40897ad drivers/iommu/arm/arm-smmu/qcom_iommu.c Yu Kuai 2020-09-18 587 WARN_ON(asid > qcom_iommu->num_ctxs)) {
2d982fb40897ad drivers/iommu/arm/arm-smmu/qcom_iommu.c Yu Kuai 2020-09-18 588 put_device(&iommu_pdev->dev);
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 589 return -EINVAL;
2d982fb40897ad drivers/iommu/arm/arm-smmu/qcom_iommu.c Yu Kuai 2020-09-18 590 }
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 591
09b5dfff9ad68f drivers/iommu/qcom_iommu.c Joerg Roedel 2020-03-26 592 if (!dev_iommu_priv_get(dev)) {
09b5dfff9ad68f drivers/iommu/qcom_iommu.c Joerg Roedel 2020-03-26 593 dev_iommu_priv_set(dev, qcom_iommu);
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 594 } else {
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 595 /* make sure devices iommus dt node isn't referring to
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 596 * multiple different iommu devices. Multiple context
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 597 * banks are ok, but multiple devices are not:
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 598 */
09b5dfff9ad68f drivers/iommu/qcom_iommu.c Joerg Roedel 2020-03-26 599 if (WARN_ON(qcom_iommu != dev_iommu_priv_get(dev)))
2d982fb40897ad drivers/iommu/arm/arm-smmu/qcom_iommu.c Yu Kuai 2020-09-18 600 put_device(&iommu_pdev->dev);
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 @601 return -EINVAL;
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 602 }
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 603
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 604 return iommu_fwspec_add_ids(dev, &asid, 1);
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 605 }
0ae349a0f33fb0 drivers/iommu/qcom_iommu.c Rob Clark 2017-08-09 606
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 46967 bytes --]
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-09-21 19:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-18 1:13 [PATCH] iommu/qcom: add missing put_device() call in qcom_iommu_of_xlate() Yu Kuai
2020-09-21 17:50 ` Will Deacon
2020-09-21 18:27 ` Rob Clark
2020-09-21 18:33 ` Rob Clark
2020-09-21 19:13 ` kernel test robot [this message]
2020-09-21 20:45 ` Will Deacon
2020-09-28 23:08 ` Will Deacon
2020-09-29 1:37 ` yukuai (C)
2020-09-23 4:32 ` 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=202009220340.bJfsaeQn%lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robdclark@gmail.com \
--cc=will@kernel.org \
--cc=yi.zhang@huawei.com \
--cc=yukuai3@huawei.com \
/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