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, Julia Lawall <julia.lawall@inria.fr>
Subject: arch/s390/pci/pci_event.c:301:0-1: preceding lock on line 270
Date: Fri, 18 Oct 2024 08:29:02 +0800	[thread overview]
Message-ID: <202410180804.d4Yn6AWs-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Gerd Bayer <gbayer@linux.ibm.com>
CC: Heiko Carstens <hca@linux.ibm.com>
CC: Niklas Schnelle <schnelle@linux.ibm.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6efbea77b390604a7be7364583e19cd2d6a1291b
commit: bcb5d6c769039c8358a2359e7c3ea5d97ce93108 s390/pci: introduce lock to synchronize state of zpci_dev's
date:   8 months ago
:::::: branch date: 8 hours ago
:::::: commit date: 8 months ago
config: s390-randconfig-r064-20241018 (https://download.01.org/0day-ci/archive/20241018/202410180804.d4Yn6AWs-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project bfe84f7085d82d06d61c632a7bad1e692fd159e4)

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: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202410180804.d4Yn6AWs-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> arch/s390/pci/pci_event.c:301:0-1: preceding lock on line 270

vim +301 arch/s390/pci/pci_event.c

4cdf2f4e24ff0d Niklas Schnelle 2021-07-07  257  
aa3b7c296732b4 Sebastian Ott   2013-12-12  258  static void __zpci_event_error(struct zpci_ccdf_err *ccdf)
d795ddad36cbc8 Sebastian Ott   2013-11-15  259  {
d795ddad36cbc8 Sebastian Ott   2013-11-15  260  	struct zpci_dev *zdev = get_zdev_by_fid(ccdf->fid);
9a99649f2a89fd Sebastian Ott   2016-01-29  261  	struct pci_dev *pdev = NULL;
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07  262  	pci_ers_result_t ers_res;
d795ddad36cbc8 Sebastian Ott   2013-11-15  263  
6526a597a2e856 Niklas Schnelle 2021-09-15  264  	zpci_dbg(3, "err fid:%x, fh:%x, pec:%x\n",
6526a597a2e856 Niklas Schnelle 2021-09-15  265  		 ccdf->fid, ccdf->fh, ccdf->pec);
d795ddad36cbc8 Sebastian Ott   2013-11-15  266  	zpci_err("error CCDF:\n");
d795ddad36cbc8 Sebastian Ott   2013-11-15  267  	zpci_err_hex(ccdf, sizeof(*ccdf));
d795ddad36cbc8 Sebastian Ott   2013-11-15  268  
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07  269  	if (zdev) {
bcb5d6c769039c Gerd Bayer      2023-11-10 @270  		mutex_lock(&zdev->state_lock);
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07  271  		zpci_update_fh(zdev, ccdf->fh);
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07  272  		if (zdev->zbus->bus)
44510d6fa0c00a Pierre Morel    2020-04-22  273  			pdev = pci_get_slot(zdev->zbus->bus, zdev->devfn);
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07  274  	}
9a99649f2a89fd Sebastian Ott   2016-01-29  275  
d795ddad36cbc8 Sebastian Ott   2013-11-15  276  	pr_err("%s: Event 0x%x reports an error for PCI function 0x%x\n",
515f022e8b59ce Sebastian Ott   2015-07-28  277  	       pdev ? pci_name(pdev) : "n/a", ccdf->pec, ccdf->fid);
8ead7efb637935 Sebastian Ott   2016-01-22  278  
8ead7efb637935 Sebastian Ott   2016-01-22  279  	if (!pdev)
c122383d221dfa Niklas Schnelle 2021-09-20  280  		goto no_pdev;
8ead7efb637935 Sebastian Ott   2016-01-22  281  
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07  282  	switch (ccdf->pec) {
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07  283  	case 0x003a: /* Service Action or Error Recovery Successful */
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07  284  		ers_res = zpci_event_attempt_error_recovery(pdev);
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07  285  		if (ers_res != PCI_ERS_RESULT_RECOVERED)
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07  286  			zpci_event_io_failure(pdev, pci_channel_io_perm_failure);
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07  287  		break;
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07  288  	default:
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07  289  		/*
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07  290  		 * Mark as frozen not permanently failed because the device
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07  291  		 * could be subsequently recovered by the platform.
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07  292  		 */
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07  293  		zpci_event_io_failure(pdev, pci_channel_io_frozen);
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07  294  		break;
4cdf2f4e24ff0d Niklas Schnelle 2021-07-07  295  	}
9a99649f2a89fd Sebastian Ott   2016-01-29  296  	pci_dev_put(pdev);
c122383d221dfa Niklas Schnelle 2021-09-20  297  no_pdev:
bcb5d6c769039c Gerd Bayer      2023-11-10  298  	if (zdev)
bcb5d6c769039c Gerd Bayer      2023-11-10  299  		mutex_unlock(&zdev->state_lock);
c122383d221dfa Niklas Schnelle 2021-09-20  300  	zpci_zdev_put(zdev);
d795ddad36cbc8 Sebastian Ott   2013-11-15 @301  }
d795ddad36cbc8 Sebastian Ott   2013-11-15  302  

:::::: The code at line 301 was first introduced by commit
:::::: d795ddad36cbc828176c898a5084549030539162 s390/pci: implement hotplug notifications

:::::: TO: Sebastian Ott <sebott@linux.vnet.ibm.com>
:::::: CC: Martin Schwidefsky <schwidefsky@de.ibm.com>

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

                 reply	other threads:[~2024-10-18  0:29 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=202410180804.d4Yn6AWs-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=julia.lawall@inria.fr \
    --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.