]> git.baikalelectronics.ru Git - kernel.git/commit
i40iw: Reorganize acquire/release of locks in i40iw_manage_apbvt
authorShiraz Saleem <shiraz.saleem@intel.com>
Fri, 1 Jun 2018 17:18:36 +0000 (12:18 -0500)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 18 Jun 2018 17:09:05 +0000 (11:09 -0600)
commitbb8cd20a88201d8e3c15c5610be116ab3af7a7df
treed19d688c6cf8aa98ce21abaa0ae18d700ee8cfee
parentbeacea473434721b0bf0fb30836a3bf7ffef0fc2
i40iw: Reorganize acquire/release of locks in i40iw_manage_apbvt

Commit 1e082b9c0077 ("i40iw: Extend port reuse support for listeners")
introduces a sparse warning:

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

Fix this by reorganizing the acquire/release of locks in
i40iw_manage_apbvt and add a new function i40iw_cqp_manage_abvpt_cmd
to perform the CQP command. Also, use __clear_bit and __test_and_set_bit
as we do not need atomic versions.

Fixes: 1e082b9c0077 ("i40iw: Extend port reuse support for listeners")
Suggested-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/i40iw/i40iw_hw.c