include/linux/spinlock.h:408:9: sparse: sparse: context imbalance in 'qlt_24xx_atio_pkt_all_vps' - unexpected unlock

From: kernel test robot
Date: Sat Aug 01 2020 - 16:57:25 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d52daa8620c65960e1ef882adc1f92061326bd7a
commit: 21038b0900d1b8728ec77d9286d7b0b57ca7b585 scsi: qla2xxx: Fix endianness annotations in header files
date: 2 months ago
config: x86_64-randconfig-s022-20200802 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-115-g5fc204f2-dirty
git checkout 21038b0900d1b8728ec77d9286d7b0b57ca7b585
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)

drivers/scsi/qla2xxx/qla_target.c:1699:52: sparse: sparse: restricted __le16 degrades to integer
drivers/scsi/qla2xxx/qla_target.c:1700:25: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/qla2xxx/qla_target.c:1699:37: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] flags @@ got unsigned int @@
drivers/scsi/qla2xxx/qla_target.c:1699:37: sparse: expected restricted __le16 [usertype] flags
drivers/scsi/qla2xxx/qla_target.c:1699:37: sparse: got unsigned int
drivers/scsi/qla2xxx/qla_target.c:2136:28: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [usertype] tag @@ got restricted __le32 [usertype] exchange_addr_to_abort @@
drivers/scsi/qla2xxx/qla_target.c:2136:28: sparse: expected unsigned int [usertype] tag
drivers/scsi/qla2xxx/qla_target.c:2136:28: sparse: got restricted __le32 [usertype] exchange_addr_to_abort
drivers/scsi/qla2xxx/qla_target.c:381:36: sparse: sparse: restricted __le16 degrades to integer
drivers/scsi/qla2xxx/qla_target.c:1769:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] f_ctl @@ got restricted __le32 [usertype] @@
drivers/scsi/qla2xxx/qla_target.c:1769:15: sparse: expected unsigned int [usertype] f_ctl
drivers/scsi/qla2xxx/qla_target.c:1769:15: sparse: got restricted __le32 [usertype]
drivers/scsi/qla2xxx/qla_target.c:1785:52: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] high_seq_cnt @@ got int @@
drivers/scsi/qla2xxx/qla_target.c:1785:52: sparse: expected restricted __le16 [usertype] high_seq_cnt
drivers/scsi/qla2xxx/qla_target.c:1785:52: sparse: got int
drivers/scsi/qla2xxx/qla_target.c:1841:15: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] f_ctl @@ got restricted __le32 [usertype] @@
drivers/scsi/qla2xxx/qla_target.c:1841:15: sparse: expected unsigned int [usertype] f_ctl
drivers/scsi/qla2xxx/qla_target.c:1841:15: sparse: got restricted __le32 [usertype]
drivers/scsi/qla2xxx/qla_target.c:1860:52: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] high_seq_cnt @@ got int @@
drivers/scsi/qla2xxx/qla_target.c:1860:52: sparse: expected restricted __le16 [usertype] high_seq_cnt
drivers/scsi/qla2xxx/qla_target.c:1860:52: sparse: got int
drivers/scsi/qla2xxx/qla_target.c:2033:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] tag @@ got restricted __le32 [usertype] exchange_addr_to_abort @@
drivers/scsi/qla2xxx/qla_target.c:2033:21: sparse: expected unsigned int [usertype] tag
drivers/scsi/qla2xxx/qla_target.c:2033:21: sparse: got restricted __le32 [usertype] exchange_addr_to_abort
drivers/scsi/qla2xxx/qla_target.c:2113:25: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned long long [usertype] @@ got restricted __le32 [usertype] exchange_addr_to_abort @@
drivers/scsi/qla2xxx/qla_target.c:2113:25: sparse: expected unsigned long long [usertype]
drivers/scsi/qla2xxx/qla_target.c:2113:25: sparse: got restricted __le32 [usertype] exchange_addr_to_abort
drivers/scsi/qla2xxx/qla_target.c:2226:28: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] nport_handle @@ got unsigned short [usertype] loop_id @@
drivers/scsi/qla2xxx/qla_target.c:2226:28: sparse: expected restricted __le16 [usertype] nport_handle
drivers/scsi/qla2xxx/qla_target.c:2226:28: sparse: got unsigned short [usertype] loop_id
drivers/scsi/qla2xxx/qla_target.c:2283:28: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] nport_handle @@ got unsigned short [usertype] loop_id @@
drivers/scsi/qla2xxx/qla_target.c:2283:28: sparse: expected restricted __le16 [usertype] nport_handle
drivers/scsi/qla2xxx/qla_target.c:2283:28: sparse: got unsigned short [usertype] loop_id
drivers/scsi/qla2xxx/qla_target.c:2844:69: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __be32 [usertype] @@
drivers/scsi/qla2xxx/qla_target.c:2844:69: sparse: expected unsigned int [usertype]
drivers/scsi/qla2xxx/qla_target.c:2844:69: sparse: got restricted __be32 [usertype]
drivers/scsi/qla2xxx/qla_target.c:3575:52: sparse: sparse: restricted __le16 degrades to integer
drivers/scsi/qla2xxx/qla_target.c:3576:25: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/qla2xxx/qla_target.c:3575:37: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] flags @@ got unsigned int @@
drivers/scsi/qla2xxx/qla_target.c:3575:37: sparse: expected restricted __le16 [usertype] flags
drivers/scsi/qla2xxx/qla_target.c:3575:37: sparse: got unsigned int
drivers/scsi/qla2xxx/qla_target.c:3650:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] nport_handle @@ got int @@
drivers/scsi/qla2xxx/qla_target.c:3650:30: sparse: expected restricted __le16 [usertype] nport_handle
drivers/scsi/qla2xxx/qla_target.c:3650:30: sparse: got int
drivers/scsi/qla2xxx/qla_target.c:4113:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] tag @@ got restricted __le32 [usertype] exchange_addr @@
drivers/scsi/qla2xxx/qla_target.c:4113:25: sparse: expected unsigned long long [usertype] tag
drivers/scsi/qla2xxx/qla_target.c:4113:25: sparse: got restricted __le32 [usertype] exchange_addr
drivers/scsi/qla2xxx/qla_target.c:5305:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] nport_handle @@ got unsigned short [usertype] loop_id @@
drivers/scsi/qla2xxx/qla_target.c:5305:30: sparse: expected restricted __le16 [usertype] nport_handle
drivers/scsi/qla2xxx/qla_target.c:5305:30: sparse: got unsigned short [usertype] loop_id
drivers/scsi/qla2xxx/qla_target.c:5318:35: sparse: sparse: cast from restricted __be16
drivers/scsi/qla2xxx/qla_target.c:5318:35: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] val @@ got restricted __be16 [usertype] ox_id @@
drivers/scsi/qla2xxx/qla_target.c:5318:35: sparse: expected unsigned short [usertype] val
drivers/scsi/qla2xxx/qla_target.c:5318:35: sparse: got restricted __be16 [usertype] ox_id
drivers/scsi/qla2xxx/qla_target.c:5318:35: sparse: sparse: cast from restricted __be16
drivers/scsi/qla2xxx/qla_target.c:5318:35: sparse: sparse: cast from restricted __be16
drivers/scsi/qla2xxx/qla_target.c:5318:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] ox_id @@ got int @@
drivers/scsi/qla2xxx/qla_target.c:5318:33: sparse: expected restricted __le16 [usertype] ox_id
drivers/scsi/qla2xxx/qla_target.c:5318:33: sparse: got int
drivers/scsi/qla2xxx/qla_target.c:5321:36: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] residual @@ got int @@
drivers/scsi/qla2xxx/qla_target.c:5321:36: sparse: expected restricted __le32 [usertype] residual
drivers/scsi/qla2xxx/qla_target.c:5321:36: sparse: got int
drivers/scsi/qla2xxx/qla_target.c:5324:47: sparse: sparse: invalid assignment: |=
drivers/scsi/qla2xxx/qla_target.c:5324:47: sparse: left side has type restricted __le16
drivers/scsi/qla2xxx/qla_target.c:5324:47: sparse: right side has type int
drivers/scsi/qla2xxx/qla_target.c:5716:27: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/qla2xxx/qla_target.c:5931:21: sparse: sparse: cast to restricted __le16
drivers/scsi/qla2xxx/qla_target.c:5931:46: sparse: sparse: cast to restricted __le16
drivers/scsi/qla2xxx/qla_target.c:5932:21: sparse: sparse: cast to restricted __le16
drivers/scsi/qla2xxx/qla_target.c:5932:46: sparse: sparse: cast to restricted __le16
drivers/scsi/qla2xxx/qla_target.c:5949:21: sparse: sparse: cast to restricted __le16
drivers/scsi/qla2xxx/qla_target.c:5949:46: sparse: sparse: cast to restricted __le16
drivers/scsi/qla2xxx/qla_target.c:5950:21: sparse: sparse: cast to restricted __le16
drivers/scsi/qla2xxx/qla_target.c:5950:46: sparse: sparse: cast to restricted __le16
drivers/scsi/qla2xxx/qla_target.c:5957:21: sparse: sparse: cast to restricted __le16
drivers/scsi/qla2xxx/qla_target.c:5957:46: sparse: sparse: cast to restricted __le16
drivers/scsi/qla2xxx/qla_target.c:5958:21: sparse: sparse: cast to restricted __le16
drivers/scsi/qla2xxx/qla_target.c:5958:46: sparse: sparse: cast to restricted __le16
drivers/scsi/qla2xxx/qla_target.c:5960:21: sparse: sparse: cast to restricted __le16
drivers/scsi/qla2xxx/qla_target.c:5984:21: sparse: sparse: cast to restricted __le16
drivers/scsi/qla2xxx/qla_target.c:5984:46: sparse: sparse: cast to restricted __le16
drivers/scsi/qla2xxx/qla_target.c:5985:21: sparse: sparse: cast to restricted __le16
drivers/scsi/qla2xxx/qla_target.c:5985:46: sparse: sparse: cast to restricted __le16
drivers/scsi/qla2xxx/qla_target.c:5987:30: sparse: sparse: cast to restricted __le16
drivers/scsi/qla2xxx/qla_target.c:6737:38: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] signature @@ got unsigned int @@
drivers/scsi/qla2xxx/qla_target.c:6737:38: sparse: expected restricted __le32 [usertype] signature
drivers/scsi/qla2xxx/qla_target.c:6737:38: sparse: got unsigned int
drivers/scsi/qla2xxx/qla_target.c:6790:46: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] signature @@ got unsigned int @@
drivers/scsi/qla2xxx/qla_target.c:6790:46: sparse: expected restricted __le32 [usertype] signature
drivers/scsi/qla2xxx/qla_target.c:6790:46: sparse: got unsigned int
drivers/scsi/qla2xxx/qla_target.c:6819:57: sparse: sparse: invalid assignment: |=
drivers/scsi/qla2xxx/qla_target.c:6819:57: sparse: left side has type restricted __le32
drivers/scsi/qla2xxx/qla_target.c:6819:57: sparse: right side has type int
drivers/scsi/qla2xxx/qla_target.c:6822:57: sparse: sparse: invalid assignment: &=
drivers/scsi/qla2xxx/qla_target.c:6822:57: sparse: left side has type restricted __le32
drivers/scsi/qla2xxx/qla_target.c:6822:57: sparse: right side has type int
drivers/scsi/qla2xxx/qla_target.c:6832:49: sparse: sparse: invalid assignment: |=
drivers/scsi/qla2xxx/qla_target.c:6832:49: sparse: left side has type restricted __le32
drivers/scsi/qla2xxx/qla_target.c:6832:49: sparse: right side has type int
drivers/scsi/qla2xxx/qla_target.c: note: in included file (through include/linux/seqlock.h, include/linux/time.h, include/linux/stat.h, ...):
>> include/linux/spinlock.h:408:9: sparse: sparse: context imbalance in 'qlt_24xx_atio_pkt_all_vps' - unexpected unlock
drivers/scsi/qla2xxx/qla_target.c:3117:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] dseg_count @@ got unsigned short [usertype] tot_dsds @@
drivers/scsi/qla2xxx/qla_target.c:3117:25: sparse: expected restricted __le16 [usertype] dseg_count
drivers/scsi/qla2xxx/qla_target.c:3117:25: sparse: got unsigned short [usertype] tot_dsds
drivers/scsi/qla2xxx/qla_target.c:3139:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] crc_context_len @@ got unsigned long @@
drivers/scsi/qla2xxx/qla_target.c:3139:30: sparse: expected restricted __le16 [usertype] crc_context_len
drivers/scsi/qla2xxx/qla_target.c:3139:30: sparse: got unsigned long
drivers/scsi/qla2xxx/qla_target.c:3117:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] dseg_count @@ got unsigned short [usertype] tot_dsds @@
drivers/scsi/qla2xxx/qla_target.c:3117:25: sparse: expected restricted __le16 [usertype] dseg_count
drivers/scsi/qla2xxx/qla_target.c:3117:25: sparse: got unsigned short [usertype] tot_dsds
drivers/scsi/qla2xxx/qla_target.c:3139:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] crc_context_len @@ got unsigned long @@
drivers/scsi/qla2xxx/qla_target.c:3139:30: sparse: expected restricted __le16 [usertype] crc_context_len
drivers/scsi/qla2xxx/qla_target.c:3139:30: sparse: got unsigned long
>> include/linux/spinlock.h:408:9: sparse: sparse: context imbalance in 'qlt_send_term_exchange' - unexpected unlock
>> include/linux/spinlock.h:408:9: sparse: sparse: context imbalance in 'qlt_chk_qfull_thresh_hold' - unexpected unlock
>> include/linux/spinlock.h:408:9: sparse: sparse: context imbalance in 'qlt_24xx_atio_pkt' - unexpected unlock

vim +/qlt_24xx_atio_pkt_all_vps +408 include/linux/spinlock.h

c2f21ce2e31286a Thomas Gleixner 2009-12-02 405
3490565b633c705 Denys Vlasenko 2015-07-13 406 static __always_inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
c2f21ce2e31286a Thomas Gleixner 2009-12-02 407 {
c2f21ce2e31286a Thomas Gleixner 2009-12-02 @408 raw_spin_unlock_irqrestore(&lock->rlock, flags);
c2f21ce2e31286a Thomas Gleixner 2009-12-02 409 }
c2f21ce2e31286a Thomas Gleixner 2009-12-02 410

:::::: The code at line 408 was first introduced by commit
:::::: c2f21ce2e31286a0a32f8da0a7856e9ca1122ef3 locking: Implement new raw_spinlock

:::::: TO: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
:::::: CC: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip