* [linux-next:master 2159/4141] drivers/scsi/lpfc/lpfc_sli.c:20815:1: sparse: sparse: context imbalance in '_lpfc_move_xri_pbl_to_pvt' - wrong count at exit
@ 2021-03-14 18:11 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-03-14 18:11 UTC (permalink / raw)
To: Luc Van Oostenryck
Cc: kbuild-all, Linux Memory Management List, Andrew Morton
[-- Attachment #1: Type: text/plain, Size: 17465 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: d98f554b318f57ded14684c04b3337a1975cf490
commit: 960984d964a9341cf50bf2b4ffdf0beb14467517 [2159/4141] include/linux/compiler-gcc.h: sparse can do constant folding of __builtin_bswap*()
config: arm-randconfig-s032-20210314 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-262-g5e674421-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=960984d964a9341cf50bf2b4ffdf0beb14467517
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 960984d964a9341cf50bf2b4ffdf0beb14467517
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
"sparse warnings: (new ones prefixed by >>)"
drivers/scsi/lpfc/lpfc_sli.c:8655:33: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:8701:41: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:9589:38: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:9597:37: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:9598:38: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sge_len @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:9598:38: sparse: expected unsigned int [usertype] sge_len
drivers/scsi/lpfc/lpfc_sli.c:9598:38: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:9615:36: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] word2 @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:9615:36: sparse: expected unsigned int [usertype] word2
drivers/scsi/lpfc/lpfc_sli.c:9615:36: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:9624:38: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] addr_hi @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:9624:38: sparse: expected unsigned int [usertype] addr_hi
drivers/scsi/lpfc/lpfc_sli.c:9624:38: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:9626:38: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] addr_lo @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:9626:38: sparse: expected unsigned int [usertype] addr_lo
drivers/scsi/lpfc/lpfc_sli.c:9626:38: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:9628:38: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:9630:36: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] word2 @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:9630:36: sparse: expected unsigned int [usertype] word2
drivers/scsi/lpfc/lpfc_sli.c:9630:36: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:9631:38: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sge_len @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:9631:38: sparse: expected unsigned int [usertype] sge_len
drivers/scsi/lpfc/lpfc_sli.c:9631:38: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:9701:46: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:9702:45: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:9706:43: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:9710:38: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:10022:37: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:11354:25: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:11382:25: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:13369:37: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:13381:45: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:14050:16: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:17154:57: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sgl_pg0_addr_lo @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:17154:57: sparse: expected unsigned int [usertype] sgl_pg0_addr_lo
drivers/scsi/lpfc/lpfc_sli.c:17154:57: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:17156:57: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sgl_pg0_addr_hi @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:17156:57: sparse: expected unsigned int [usertype] sgl_pg0_addr_hi
drivers/scsi/lpfc/lpfc_sli.c:17156:57: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:17159:57: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sgl_pg1_addr_lo @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:17159:57: sparse: expected unsigned int [usertype] sgl_pg1_addr_lo
drivers/scsi/lpfc/lpfc_sli.c:17159:57: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:17161:57: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sgl_pg1_addr_hi @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:17161:57: sparse: expected unsigned int [usertype] sgl_pg1_addr_hi
drivers/scsi/lpfc/lpfc_sli.c:17161:57: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:17450:47: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sgl_pg0_addr_lo @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:17450:47: sparse: expected unsigned int [usertype] sgl_pg0_addr_lo
drivers/scsi/lpfc/lpfc_sli.c:17450:47: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:17452:47: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sgl_pg0_addr_hi @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:17452:47: sparse: expected unsigned int [usertype] sgl_pg0_addr_hi
drivers/scsi/lpfc/lpfc_sli.c:17452:47: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:17459:47: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sgl_pg1_addr_lo @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:17459:47: sparse: expected unsigned int [usertype] sgl_pg1_addr_lo
drivers/scsi/lpfc/lpfc_sli.c:17459:47: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:17461:47: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sgl_pg1_addr_hi @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:17461:47: sparse: expected unsigned int [usertype] sgl_pg1_addr_hi
drivers/scsi/lpfc/lpfc_sli.c:17461:47: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:17472:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] word0 @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:17472:20: sparse: expected unsigned int [usertype] word0
drivers/scsi/lpfc/lpfc_sli.c:17472:20: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:17694:9: sparse: sparse: cast to restricted __be32
drivers/scsi/lpfc/lpfc_sli.c:18311:16: sparse: sparse: restricted __be16 degrades to integer
drivers/scsi/lpfc/lpfc_sli.c:20004:45: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:20004:45: sparse: expected unsigned int
drivers/scsi/lpfc/lpfc_sli.c:20004:45: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:20370:38: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:20378:37: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:20379:38: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sge_len @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:20379:38: sparse: expected unsigned int [usertype] sge_len
drivers/scsi/lpfc/lpfc_sli.c:20379:38: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:20413:36: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] word2 @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:20413:36: sparse: expected unsigned int [usertype] word2
drivers/scsi/lpfc/lpfc_sli.c:20413:36: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:20422:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] addr_hi @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:20422:30: sparse: expected unsigned int [usertype] addr_hi
drivers/scsi/lpfc/lpfc_sli.c:20422:30: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:20423:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] addr_lo @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:20423:30: sparse: expected unsigned int [usertype] addr_lo
drivers/scsi/lpfc/lpfc_sli.c:20423:30: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:20424:30: sparse: sparse: cast to restricted __le32
drivers/scsi/lpfc/lpfc_sli.c:20426:28: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] word2 @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:20426:28: sparse: expected unsigned int [usertype] word2
drivers/scsi/lpfc/lpfc_sli.c:20426:28: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:20427:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sge_len @@ got restricted __le32 [usertype] @@
drivers/scsi/lpfc/lpfc_sli.c:20427:30: sparse: expected unsigned int [usertype] sge_len
drivers/scsi/lpfc/lpfc_sli.c:20427:30: sparse: got restricted __le32 [usertype]
drivers/scsi/lpfc/lpfc_sli.c:12078:36: sparse: sparse: context imbalance in 'lpfc_sli_abort_taskmgmt' - different lock contexts for basic block
>> drivers/scsi/lpfc/lpfc_sli.c:20815:1: sparse: sparse: context imbalance in '_lpfc_move_xri_pbl_to_pvt' - wrong count at exit
vim +/_lpfc_move_xri_pbl_to_pvt +20815 drivers/scsi/lpfc/lpfc_sli.c
c490850a094794 James Smart 2019-01-28 20796
c490850a094794 James Smart 2019-01-28 20797 /**
c490850a094794 James Smart 2019-01-28 20798 * _lpfc_move_xri_pbl_to_pvt - Move some XRIs from public to private pool
c490850a094794 James Smart 2019-01-28 20799 * @phba: pointer to lpfc hba data structure
7af29d455362ea Lee Jones 2020-07-21 20800 * @qp: pointer to HDW queue
c490850a094794 James Smart 2019-01-28 20801 * @pbl_pool: specified public free XRI pool
c490850a094794 James Smart 2019-01-28 20802 * @pvt_pool: specified private free XRI pool
c490850a094794 James Smart 2019-01-28 20803 * @count: number of XRIs to move
c490850a094794 James Smart 2019-01-28 20804 *
c490850a094794 James Smart 2019-01-28 20805 * This routine tries to move some free common bufs from the specified pbl_pool
c490850a094794 James Smart 2019-01-28 20806 * to the specified pvt_pool. It might move less than count XRIs if there's not
c490850a094794 James Smart 2019-01-28 20807 * enough in public pool.
c490850a094794 James Smart 2019-01-28 20808 *
c490850a094794 James Smart 2019-01-28 20809 * Return:
c490850a094794 James Smart 2019-01-28 20810 * true - if XRIs are successfully moved from the specified pbl_pool to the
c490850a094794 James Smart 2019-01-28 20811 * specified pvt_pool
c490850a094794 James Smart 2019-01-28 20812 * false - if the specified pbl_pool is empty or locked by someone else
c490850a094794 James Smart 2019-01-28 20813 **/
c490850a094794 James Smart 2019-01-28 20814 static bool
6a828b0f6192b4 James Smart 2019-01-28 @20815 _lpfc_move_xri_pbl_to_pvt(struct lpfc_hba *phba, struct lpfc_sli4_hdw_queue *qp,
6a828b0f6192b4 James Smart 2019-01-28 20816 struct lpfc_pbl_pool *pbl_pool,
c490850a094794 James Smart 2019-01-28 20817 struct lpfc_pvt_pool *pvt_pool, u32 count)
c490850a094794 James Smart 2019-01-28 20818 {
c490850a094794 James Smart 2019-01-28 20819 struct lpfc_io_buf *lpfc_ncmd;
c490850a094794 James Smart 2019-01-28 20820 struct lpfc_io_buf *lpfc_ncmd_next;
c490850a094794 James Smart 2019-01-28 20821 unsigned long iflag;
c490850a094794 James Smart 2019-01-28 20822 int ret;
c490850a094794 James Smart 2019-01-28 20823
c490850a094794 James Smart 2019-01-28 20824 ret = spin_trylock_irqsave(&pbl_pool->lock, iflag);
c490850a094794 James Smart 2019-01-28 20825 if (ret) {
c490850a094794 James Smart 2019-01-28 20826 if (pbl_pool->count) {
c490850a094794 James Smart 2019-01-28 20827 /* Move a batch of XRIs from public to private pool */
6a828b0f6192b4 James Smart 2019-01-28 20828 lpfc_qp_spin_lock(&pvt_pool->lock, qp, mv_to_pvt_pool);
c490850a094794 James Smart 2019-01-28 20829 list_for_each_entry_safe(lpfc_ncmd,
c490850a094794 James Smart 2019-01-28 20830 lpfc_ncmd_next,
c490850a094794 James Smart 2019-01-28 20831 &pbl_pool->list,
c490850a094794 James Smart 2019-01-28 20832 list) {
c490850a094794 James Smart 2019-01-28 20833 list_move_tail(&lpfc_ncmd->list,
c490850a094794 James Smart 2019-01-28 20834 &pvt_pool->list);
c490850a094794 James Smart 2019-01-28 20835 pvt_pool->count++;
c490850a094794 James Smart 2019-01-28 20836 pbl_pool->count--;
c490850a094794 James Smart 2019-01-28 20837 count--;
c490850a094794 James Smart 2019-01-28 20838 if (count == 0)
c490850a094794 James Smart 2019-01-28 20839 break;
c490850a094794 James Smart 2019-01-28 20840 }
c490850a094794 James Smart 2019-01-28 20841
c490850a094794 James Smart 2019-01-28 20842 spin_unlock(&pvt_pool->lock);
c490850a094794 James Smart 2019-01-28 20843 spin_unlock_irqrestore(&pbl_pool->lock, iflag);
c490850a094794 James Smart 2019-01-28 20844 return true;
c490850a094794 James Smart 2019-01-28 20845 }
c490850a094794 James Smart 2019-01-28 20846 spin_unlock_irqrestore(&pbl_pool->lock, iflag);
c490850a094794 James Smart 2019-01-28 20847 }
c490850a094794 James Smart 2019-01-28 20848
c490850a094794 James Smart 2019-01-28 20849 return false;
c490850a094794 James Smart 2019-01-28 20850 }
c490850a094794 James Smart 2019-01-28 20851
:::::: The code at line 20815 was first introduced by commit
:::::: 6a828b0f6192b4930894925d1c1d0dc1f1d99e6e scsi: lpfc: Support non-uniform allocation of MSIX vectors to hardware queues
:::::: TO: James Smart <jsmart2021@gmail.com>
:::::: CC: Martin K. Petersen <martin.petersen@oracle.com>
---
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: 39426 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-14 18:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-14 18:11 [linux-next:master 2159/4141] drivers/scsi/lpfc/lpfc_sli.c:20815:1: sparse: sparse: context imbalance in '_lpfc_move_xri_pbl_to_pvt' - wrong count at exit kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox