All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: drivers/misc/uacce/uacce.c:116 uacce_bind_queue() warn: passing positive error code '(-19)' to 'PTR_ERR'
Date: Sat, 15 Mar 2025 20:46:13 +0800	[thread overview]
Message-ID: <202503152044.rlqrVxbF-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Lu Baolu <baolu.lu@linux.intel.com>
CC: Joerg Roedel <jroedel@suse.de>
CC: "Jean-Philippe Brucker" <jean-philippe@linaro.org>
CC: Kevin Tian <kevin.tian@intel.com>
CC: Vasant Hegde <vasant.hegde@amd.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3571e8b091f4270d869dda7a6cc43616c6ad6897
commit: 89e8a2366e3bce584b6c01549d5019c5cda1205e iommu: Return right value in iommu_sva_bind_device()
date:   9 months ago
:::::: branch date: 8 hours ago
:::::: commit date: 9 months ago
config: openrisc-randconfig-r071-20250314 (https://download.01.org/0day-ci/archive/20250315/202503152044.rlqrVxbF-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 14.2.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202503152044.rlqrVxbF-lkp@intel.com/

smatch warnings:
drivers/misc/uacce/uacce.c:116 uacce_bind_queue() warn: passing positive error code '(-19)' to 'PTR_ERR'

vim +116 drivers/misc/uacce/uacce.c

015d239ac0142ad Kenneth Lee           2020-02-11  105  
fb01562e5a8a731 Jean-Philippe Brucker 2020-04-23  106  static int uacce_bind_queue(struct uacce_device *uacce, struct uacce_queue *q)
015d239ac0142ad Kenneth Lee           2020-02-11  107  {
c7b6bac9c72c5fc Fenghua Yu            2020-09-15  108  	u32 pasid;
fb01562e5a8a731 Jean-Philippe Brucker 2020-04-23  109  	struct iommu_sva *handle;
015d239ac0142ad Kenneth Lee           2020-02-11  110  
fb01562e5a8a731 Jean-Philippe Brucker 2020-04-23  111  	if (!(uacce->flags & UACCE_DEV_SVA))
015d239ac0142ad Kenneth Lee           2020-02-11  112  		return 0;
015d239ac0142ad Kenneth Lee           2020-02-11  113  
942fd5435dccb27 Lu Baolu              2022-10-31  114  	handle = iommu_sva_bind_device(uacce->parent, current->mm);
015d239ac0142ad Kenneth Lee           2020-02-11  115  	if (IS_ERR(handle))
fb01562e5a8a731 Jean-Philippe Brucker 2020-04-23 @116  		return PTR_ERR(handle);
015d239ac0142ad Kenneth Lee           2020-02-11  117  
fb01562e5a8a731 Jean-Philippe Brucker 2020-04-23  118  	pasid = iommu_sva_get_pasid(handle);
fb01562e5a8a731 Jean-Philippe Brucker 2020-04-23  119  	if (pasid == IOMMU_PASID_INVALID) {
fb01562e5a8a731 Jean-Philippe Brucker 2020-04-23  120  		iommu_sva_unbind_device(handle);
fb01562e5a8a731 Jean-Philippe Brucker 2020-04-23  121  		return -ENODEV;
015d239ac0142ad Kenneth Lee           2020-02-11  122  	}
015d239ac0142ad Kenneth Lee           2020-02-11  123  
fb01562e5a8a731 Jean-Philippe Brucker 2020-04-23  124  	q->handle = handle;
fb01562e5a8a731 Jean-Philippe Brucker 2020-04-23  125  	q->pasid = pasid;
fb01562e5a8a731 Jean-Philippe Brucker 2020-04-23  126  	return 0;
015d239ac0142ad Kenneth Lee           2020-02-11  127  }
015d239ac0142ad Kenneth Lee           2020-02-11  128  

:::::: The code at line 116 was first introduced by commit
:::::: fb01562e5a8a731bb1807eba0a9fadb355ca2277 uacce: Remove mm_exit() op

:::::: TO: Jean-Philippe Brucker <jean-philippe@linaro.org>
:::::: CC: Joerg Roedel <jroedel@suse.de>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2025-03-15 12:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-15 12:46 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-17 16:01 drivers/misc/uacce/uacce.c:116 uacce_bind_queue() warn: passing positive error code '(-19)' to 'PTR_ERR' 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=202503152044.rlqrVxbF-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@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 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.