[kbuild] drivers/scsi/libiscsi.c:1457 iscsi_xmit_task() warn: test_bit() takes a bit number

2022-04-21 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Mike Christie 
CC: "Martin K. Petersen" 
CC: Lee Duncan 
CC: Chris Leech 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   b253435746d9a4a701b5f09211b9c14d3370d0da
commit: 5bd856256f8c03e329f8ff36d8c8efcb111fe6df scsi: iscsi: Merge suspend 
fields
date:   9 days ago
:: branch date: 13 hours ago
:: commit date: 9 days ago
config: x86_64-randconfig-m001-20220418 
(https://download.01.org/0day-ci/archive/20220421/202204211604.rw1poqxa-...@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-19) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

New smatch warnings:
drivers/scsi/libiscsi.c:1457 iscsi_xmit_task() warn: test_bit() takes a bit 
number
drivers/scsi/libiscsi.c:1535 iscsi_data_xmit() warn: test_bit() takes a bit 
number
drivers/scsi/libiscsi.c:1749 iscsi_queuecommand() warn: test_bit() takes a bit 
number
drivers/scsi/bnx2i/bnx2i_hwi.c:1980 bnx2i_process_new_cqes() warn: test_bit() 
takes a bit number

Old smatch warnings:
drivers/scsi/libiscsi.c:1395 iscsi_set_conn_failed() warn: test_bit() takes a 
bit number
drivers/scsi/libiscsi.c:1396 iscsi_set_conn_failed() warn: test_bit() takes a 
bit number
drivers/scsi/libiscsi.c:1938 iscsi_suspend_queue() warn: test_bit() takes a bit 
number
drivers/scsi/libiscsi.c:1956 iscsi_suspend_tx() warn: test_bit() takes a bit 
number
drivers/scsi/libiscsi.c:1964 iscsi_start_tx() warn: test_bit() takes a bit 
number
drivers/scsi/libiscsi.c:3332 iscsi_conn_bind() warn: test_bit() takes a bit 
number
drivers/scsi/libiscsi.c: iscsi_conn_bind() warn: test_bit() takes a bit 
number

vim +1457 drivers/scsi/libiscsi.c

77a23c21aaa723f Mike Christie   2007-05-30  1430  
5923d64b7ab63dc Mike Christie   2021-02-06  1431  static int 
iscsi_xmit_task(struct iscsi_conn *conn, struct iscsi_task *task,
5923d64b7ab63dc Mike Christie   2021-02-06  1432   bool 
was_requeue)
77a23c21aaa723f Mike Christie   2007-05-30  1433  {
843c0a8a76078cf Mike Christie   2007-12-13  1434int rc;
77a23c21aaa723f Mike Christie   2007-05-30  1435  
79edd00dc6a9664 Anoob Soman 2019-02-13  1436
spin_lock_bh(>session->back_lock);
5923d64b7ab63dc Mike Christie   2021-02-06  1437  
5923d64b7ab63dc Mike Christie   2021-02-06  1438if (!conn->task) {
5923d64b7ab63dc Mike Christie   2021-02-06  1439/* Take a ref 
so we can access it after xmit_task() */
5923d64b7ab63dc Mike Christie   2021-02-06  1440
__iscsi_get_task(task);
5923d64b7ab63dc Mike Christie   2021-02-06  1441} else {
5923d64b7ab63dc Mike Christie   2021-02-06  1442/* Already have 
a ref from when we failed to send it last call */
5923d64b7ab63dc Mike Christie   2021-02-06  1443conn->task = 
NULL;
5923d64b7ab63dc Mike Christie   2021-02-06  1444}
5923d64b7ab63dc Mike Christie   2021-02-06  1445  
5923d64b7ab63dc Mike Christie   2021-02-06  1446/*
5923d64b7ab63dc Mike Christie   2021-02-06  1447 * If this was a 
requeue for a R2T we have an extra ref on the task in
5923d64b7ab63dc Mike Christie   2021-02-06  1448 * case a bad target 
sends a cmd rsp before we have handled the task.
5923d64b7ab63dc Mike Christie   2021-02-06  1449 */
5923d64b7ab63dc Mike Christie   2021-02-06  1450if (was_requeue)
5923d64b7ab63dc Mike Christie   2021-02-06  1451
__iscsi_put_task(task);
5923d64b7ab63dc Mike Christie   2021-02-06  1452  
5923d64b7ab63dc Mike Christie   2021-02-06  1453/*
5923d64b7ab63dc Mike Christie   2021-02-06  1454 * Do this after 
dropping the extra ref because if this was a requeue
5923d64b7ab63dc Mike Christie   2021-02-06  1455 * it's removed from 
that list and cleanup_queued_task would miss it.
5923d64b7ab63dc Mike Christie   2021-02-06  1456 */
5bd856256f8c03e Mike Christie   2022-04-07 @1457if 
(test_bit(ISCSI_CONN_FLAG_SUSPEND_TX, >flags)) {
5923d64b7ab63dc Mike Christie   2021-02-06  1458/*
5923d64b7ab63dc Mike Christie   2021-02-06  1459 * Save the 
task and ref in case we weren't cleaning up this
5923d64b7ab63dc Mike Christie   2021-02-06  1460 * task and get 
woken up again.
5923d64b7ab63dc Mike Christie   2021-02-06  1461 */
5923d64b7ab63dc Mike Christie   2021-02-06  1462conn->task = 
task;
79edd00dc6a9664 Anoob Soman 2019-02-13  1463
spin_unlock_bh(>session->back_lock);
79edd00dc6a9664 Anoob Soman 2019-02-13  1464return -ENODATA;
79edd00dc6a9664 Anoob Soman 2019-02-13  1465}
79edd00dc6a9664 Anoob Soman 2019-02-13  1466
spin_unlock_bh(>session->back_lock);
5923d64b7ab63dc Mike Christie   2021-02-06  1467  
659743b02c41107 Shlomo Pongratz 2014-02-07  1468 

[kbuild] drivers/scsi/libiscsi.c:1457 iscsi_xmit_task() warn: test_bit() takes a bit number

2022-04-18 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Mike Christie 
CC: "Martin K. Petersen" 
CC: Lee Duncan 
CC: Chris Leech 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   b2d229d4ddb17db541098b83524d901257e93845
commit: 5bd856256f8c03e329f8ff36d8c8efcb111fe6df scsi: iscsi: Merge suspend 
fields
date:   7 days ago
:: branch date: 29 hours ago
:: commit date: 7 days ago
config: x86_64-randconfig-m001-20220418 
(https://download.01.org/0day-ci/archive/20220419/202204191024.rt0kfn40-...@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-19) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

New smatch warnings:
drivers/scsi/libiscsi.c:1457 iscsi_xmit_task() warn: test_bit() takes a bit 
number
drivers/scsi/libiscsi.c:1535 iscsi_data_xmit() warn: test_bit() takes a bit 
number
drivers/scsi/libiscsi.c:1749 iscsi_queuecommand() warn: test_bit() takes a bit 
number
drivers/scsi/bnx2i/bnx2i_hwi.c:1980 bnx2i_process_new_cqes() warn: test_bit() 
takes a bit number

Old smatch warnings:
drivers/scsi/libiscsi.c:1395 iscsi_set_conn_failed() warn: test_bit() takes a 
bit number
drivers/scsi/libiscsi.c:1396 iscsi_set_conn_failed() warn: test_bit() takes a 
bit number
drivers/scsi/libiscsi.c:1938 iscsi_suspend_queue() warn: test_bit() takes a bit 
number
drivers/scsi/libiscsi.c:1956 iscsi_suspend_tx() warn: test_bit() takes a bit 
number
drivers/scsi/libiscsi.c:1964 iscsi_start_tx() warn: test_bit() takes a bit 
number
drivers/scsi/libiscsi.c:3332 iscsi_conn_bind() warn: test_bit() takes a bit 
number
drivers/scsi/libiscsi.c: iscsi_conn_bind() warn: test_bit() takes a bit 
number

vim +1457 drivers/scsi/libiscsi.c

77a23c21aaa723 Mike Christie   2007-05-30  1430  
5923d64b7ab63d Mike Christie   2021-02-06  1431  static int 
iscsi_xmit_task(struct iscsi_conn *conn, struct iscsi_task *task,
5923d64b7ab63d Mike Christie   2021-02-06  1432bool 
was_requeue)
77a23c21aaa723 Mike Christie   2007-05-30  1433  {
843c0a8a76078c Mike Christie   2007-12-13  1434 int rc;
77a23c21aaa723 Mike Christie   2007-05-30  1435  
79edd00dc6a966 Anoob Soman 2019-02-13  1436 
spin_lock_bh(>session->back_lock);
5923d64b7ab63d Mike Christie   2021-02-06  1437  
5923d64b7ab63d Mike Christie   2021-02-06  1438 if (!conn->task) {
5923d64b7ab63d Mike Christie   2021-02-06  1439 /* Take a ref 
so we can access it after xmit_task() */
5923d64b7ab63d Mike Christie   2021-02-06  1440 
__iscsi_get_task(task);
5923d64b7ab63d Mike Christie   2021-02-06  1441 } else {
5923d64b7ab63d Mike Christie   2021-02-06  1442 /* Already have 
a ref from when we failed to send it last call */
5923d64b7ab63d Mike Christie   2021-02-06  1443 conn->task = 
NULL;
5923d64b7ab63d Mike Christie   2021-02-06  1444 }
5923d64b7ab63d Mike Christie   2021-02-06  1445  
5923d64b7ab63d Mike Christie   2021-02-06  1446 /*
5923d64b7ab63d Mike Christie   2021-02-06  1447  * If this was a 
requeue for a R2T we have an extra ref on the task in
5923d64b7ab63d Mike Christie   2021-02-06  1448  * case a bad target 
sends a cmd rsp before we have handled the task.
5923d64b7ab63d Mike Christie   2021-02-06  1449  */
5923d64b7ab63d Mike Christie   2021-02-06  1450 if (was_requeue)
5923d64b7ab63d Mike Christie   2021-02-06  1451 
__iscsi_put_task(task);
5923d64b7ab63d Mike Christie   2021-02-06  1452  
5923d64b7ab63d Mike Christie   2021-02-06  1453 /*
5923d64b7ab63d Mike Christie   2021-02-06  1454  * Do this after 
dropping the extra ref because if this was a requeue
5923d64b7ab63d Mike Christie   2021-02-06  1455  * it's removed from 
that list and cleanup_queued_task would miss it.
5923d64b7ab63d Mike Christie   2021-02-06  1456  */
5bd856256f8c03 Mike Christie   2022-04-07 @1457 if 
(test_bit(ISCSI_CONN_FLAG_SUSPEND_TX, >flags)) {
5923d64b7ab63d Mike Christie   2021-02-06  1458 /*
5923d64b7ab63d Mike Christie   2021-02-06  1459  * Save the 
task and ref in case we weren't cleaning up this
5923d64b7ab63d Mike Christie   2021-02-06  1460  * task and get 
woken up again.
5923d64b7ab63d Mike Christie   2021-02-06  1461  */
5923d64b7ab63d Mike Christie   2021-02-06  1462 conn->task = 
task;
79edd00dc6a966 Anoob Soman 2019-02-13  1463 
spin_unlock_bh(>session->back_lock);
79edd00dc6a966 Anoob Soman 2019-02-13  1464 return -ENODATA;
79edd00dc6a966 Anoob Soman 2019-02-13  1465 }
79edd00dc6a966 Anoob Soman 2019-02-13  1466 
spin_unlock_bh(>session->back_lock);
5923d64b7ab63d Mike Christie   2021-02-06  1467  
659743b02c4110 Shlomo Pongratz 2014-02-07  1468 

[kbuild] drivers/scsi/libiscsi.c:1457 iscsi_xmit_task() warn: test_bit() takes a bit number

2022-04-18 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Mike Christie 
CC: "Martin K. Petersen" 
CC: Lee Duncan 
CC: Chris Leech 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   b2d229d4ddb17db541098b83524d901257e93845
commit: 5bd856256f8c03e329f8ff36d8c8efcb111fe6df scsi: iscsi: Merge suspend 
fields
date:   6 days ago
:: branch date: 9 hours ago
:: commit date: 6 days ago
config: x86_64-randconfig-m001-20220418 
(https://download.01.org/0day-ci/archive/20220418/202204181444.5n2lwnmk-...@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-19) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

New smatch warnings:
drivers/scsi/libiscsi.c:1457 iscsi_xmit_task() warn: test_bit() takes a bit 
number
drivers/scsi/libiscsi.c:1535 iscsi_data_xmit() warn: test_bit() takes a bit 
number
drivers/scsi/libiscsi.c:1749 iscsi_queuecommand() warn: test_bit() takes a bit 
number
drivers/scsi/bnx2i/bnx2i_hwi.c:1980 bnx2i_process_new_cqes() warn: test_bit() 
takes a bit number

Old smatch warnings:
drivers/scsi/libiscsi.c:1395 iscsi_set_conn_failed() warn: test_bit() takes a 
bit number
drivers/scsi/libiscsi.c:1396 iscsi_set_conn_failed() warn: test_bit() takes a 
bit number
drivers/scsi/libiscsi.c:1938 iscsi_suspend_queue() warn: test_bit() takes a bit 
number
drivers/scsi/libiscsi.c:1956 iscsi_suspend_tx() warn: test_bit() takes a bit 
number
drivers/scsi/libiscsi.c:1964 iscsi_start_tx() warn: test_bit() takes a bit 
number
drivers/scsi/libiscsi.c:3332 iscsi_conn_bind() warn: test_bit() takes a bit 
number
drivers/scsi/libiscsi.c: iscsi_conn_bind() warn: test_bit() takes a bit 
number

vim +1457 drivers/scsi/libiscsi.c

77a23c21aaa723 Mike Christie   2007-05-30  1430  
5923d64b7ab63d Mike Christie   2021-02-06  1431  static int 
iscsi_xmit_task(struct iscsi_conn *conn, struct iscsi_task *task,
5923d64b7ab63d Mike Christie   2021-02-06  1432bool 
was_requeue)
77a23c21aaa723 Mike Christie   2007-05-30  1433  {
843c0a8a76078c Mike Christie   2007-12-13  1434 int rc;
77a23c21aaa723 Mike Christie   2007-05-30  1435  
79edd00dc6a966 Anoob Soman 2019-02-13  1436 
spin_lock_bh(>session->back_lock);
5923d64b7ab63d Mike Christie   2021-02-06  1437  
5923d64b7ab63d Mike Christie   2021-02-06  1438 if (!conn->task) {
5923d64b7ab63d Mike Christie   2021-02-06  1439 /* Take a ref 
so we can access it after xmit_task() */
5923d64b7ab63d Mike Christie   2021-02-06  1440 
__iscsi_get_task(task);
5923d64b7ab63d Mike Christie   2021-02-06  1441 } else {
5923d64b7ab63d Mike Christie   2021-02-06  1442 /* Already have 
a ref from when we failed to send it last call */
5923d64b7ab63d Mike Christie   2021-02-06  1443 conn->task = 
NULL;
5923d64b7ab63d Mike Christie   2021-02-06  1444 }
5923d64b7ab63d Mike Christie   2021-02-06  1445  
5923d64b7ab63d Mike Christie   2021-02-06  1446 /*
5923d64b7ab63d Mike Christie   2021-02-06  1447  * If this was a 
requeue for a R2T we have an extra ref on the task in
5923d64b7ab63d Mike Christie   2021-02-06  1448  * case a bad target 
sends a cmd rsp before we have handled the task.
5923d64b7ab63d Mike Christie   2021-02-06  1449  */
5923d64b7ab63d Mike Christie   2021-02-06  1450 if (was_requeue)
5923d64b7ab63d Mike Christie   2021-02-06  1451 
__iscsi_put_task(task);
5923d64b7ab63d Mike Christie   2021-02-06  1452  
5923d64b7ab63d Mike Christie   2021-02-06  1453 /*
5923d64b7ab63d Mike Christie   2021-02-06  1454  * Do this after 
dropping the extra ref because if this was a requeue
5923d64b7ab63d Mike Christie   2021-02-06  1455  * it's removed from 
that list and cleanup_queued_task would miss it.
5923d64b7ab63d Mike Christie   2021-02-06  1456  */
5bd856256f8c03 Mike Christie   2022-04-07 @1457 if 
(test_bit(ISCSI_CONN_FLAG_SUSPEND_TX, >flags)) {
5923d64b7ab63d Mike Christie   2021-02-06  1458 /*
5923d64b7ab63d Mike Christie   2021-02-06  1459  * Save the 
task and ref in case we weren't cleaning up this
5923d64b7ab63d Mike Christie   2021-02-06  1460  * task and get 
woken up again.
5923d64b7ab63d Mike Christie   2021-02-06  1461  */
5923d64b7ab63d Mike Christie   2021-02-06  1462 conn->task = 
task;
79edd00dc6a966 Anoob Soman 2019-02-13  1463 
spin_unlock_bh(>session->back_lock);
79edd00dc6a966 Anoob Soman 2019-02-13  1464 return -ENODATA;
79edd00dc6a966 Anoob Soman 2019-02-13  1465 }
79edd00dc6a966 Anoob Soman 2019-02-13  1466 
spin_unlock_bh(>session->back_lock);
5923d64b7ab63d Mike Christie   2021-02-06  1467  
659743b02c4110 Shlomo Pongratz 2014-02-07  1468