drivers/parport/share.c:1029 parport_claim() warn: mixing irq and irqsave

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild
Message-ID <[email protected]>
BCC: [email protected]
CC: [email protected]
CC: [email protected]
TO: Heiko Carstens <[email protected]>
CC: Alexander Gordeev <[email protected]>
CC: Sven Schnelle <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   06cf61899d6498b33e4b7c87d99d5bd471ccc375
commit: 1f57f68c4dd101e5e8ffc9ffa6428f45bcdd776a s390: Remove GENERIC_LOCKBREAK Kconfig option
date:   9 weeks ago
:::::: branch date: 8 hours ago
:::::: commit date: 9 weeks ago
config: s390-randconfig-r071-20260809 (https://download.01.org/0day-ci/archive/20260809/[email protected]/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 12df34b8469b8095359de8c249cb1b2753fadeea)
smatch: v0.5.0-9187-g5189e3fb

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
| Fixes: 1f57f68c4dd1 ("s390: Remove GENERIC_LOCKBREAK Kconfig option")
| Reported-by: kernel test robot <[email protected]>
| Reported-by: Dan Carpenter <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

smatch warnings:
drivers/parport/share.c:1029 parport_claim() warn: mixing irq and irqsave

vim +1029 drivers/parport/share.c

^1da177e4c3f41 Linus Torvalds  2005-04-16  1026  
^1da177e4c3f41 Linus Torvalds  2005-04-16  1027  	/* Restore control registers */
^1da177e4c3f41 Linus Torvalds  2005-04-16  1028  	port->ops->restore_state(port, dev->state);
^1da177e4c3f41 Linus Torvalds  2005-04-16 @1029  	write_unlock_irqrestore(&port->cad_lock, flags);
^1da177e4c3f41 Linus Torvalds  2005-04-16  1030  	dev->time = jiffies;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1031  	return 0;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1032  
^1da177e4c3f41 Linus Torvalds  2005-04-16  1033  blocked:
7b7a0a30c98514 Sudip Mukherjee 2015-10-28  1034  	/*
7b7a0a30c98514 Sudip Mukherjee 2015-10-28  1035  	 * If this is the first time we tried to claim the port, register an
7b7a0a30c98514 Sudip Mukherjee 2015-10-28  1036  	 * interest.  This is only allowed for devices sleeping in
7b7a0a30c98514 Sudip Mukherjee 2015-10-28  1037  	 * parport_claim_or_block(), or those with a wakeup function.
7b7a0a30c98514 Sudip Mukherjee 2015-10-28  1038  	 */
^1da177e4c3f41 Linus Torvalds  2005-04-16  1039  
^1da177e4c3f41 Linus Torvalds  2005-04-16  1040  	/* The cad_lock is still held for writing here */
^1da177e4c3f41 Linus Torvalds  2005-04-16  1041  	if (dev->waiting & 2 || dev->wakeup) {
^1da177e4c3f41 Linus Torvalds  2005-04-16  1042  		spin_lock(&port->waitlist_lock);
^1da177e4c3f41 Linus Torvalds  2005-04-16  1043  		if (test_and_set_bit(0, &dev->waiting) == 0) {
^1da177e4c3f41 Linus Torvalds  2005-04-16  1044  			/* First add ourselves to the end of the wait list. */
^1da177e4c3f41 Linus Torvalds  2005-04-16  1045  			dev->waitnext = NULL;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1046  			dev->waitprev = port->waittail;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1047  			if (port->waittail) {
^1da177e4c3f41 Linus Torvalds  2005-04-16  1048  				port->waittail->waitnext = dev;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1049  				port->waittail = dev;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1050  			} else
^1da177e4c3f41 Linus Torvalds  2005-04-16  1051  				port->waithead = port->waittail = dev;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1052  		}
^1da177e4c3f41 Linus Torvalds  2005-04-16  1053  		spin_unlock(&port->waitlist_lock);
^1da177e4c3f41 Linus Torvalds  2005-04-16  1054  	}
^1da177e4c3f41 Linus Torvalds  2005-04-16  1055  	write_unlock_irqrestore(&port->cad_lock, flags);
^1da177e4c3f41 Linus Torvalds  2005-04-16  1056  	return -EAGAIN;
^1da177e4c3f41 Linus Torvalds  2005-04-16  1057  }
27c6db26555029 Sudip Mukherjee 2015-10-28  1058  EXPORT_SYMBOL(parport_claim);
^1da177e4c3f41 Linus Torvalds  2005-04-16  1059  

:::::: The code at line 1029 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <[email protected]>
:::::: CC: Linus Torvalds <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.