mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-13 17:28:56 +00:00
scsi: qla2xxxx: avoid type mismatch in comparison
A recent bug fix added code that does bool logged_out = (status & 0xFFFF); if (logged_out == CTIO_PORT_LOGGED_OUT) ... This looks wrong because we are comparing a boolean with an integer constant, ang gcc warns about it accordingly: drivers/scsi/qla2xxx/qla_target.c: In function 'qlt_do_ctio_completion': drivers/scsi/qla2xxx/qla_target.c:3587:20: warning: comparison of constant '41' with boolean expression is always false [-Wbool-compare] (logged_out == CTIO_PORT_LOGGED_OUT) ? The correct fix is presumably to make that variable an 'int'. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 71cdc0796465 ("qla2xxx: Delete session if initiator is gone from FW") Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
parent
20c08b362f
commit
fab683eb12
@ -3580,7 +3580,7 @@ static void qlt_do_ctio_completion(struct scsi_qla_host *vha, uint32_t handle,
|
||||
case CTIO_PORT_LOGGED_OUT:
|
||||
case CTIO_PORT_UNAVAILABLE:
|
||||
{
|
||||
bool logged_out = (status & 0xFFFF);
|
||||
int logged_out = (status & 0xFFFF);
|
||||
ql_dbg(ql_dbg_tgt_mgt, vha, 0xf059,
|
||||
"qla_target(%d): CTIO with %s status %x "
|
||||
"received (state %x, se_cmd %p)\n", vha->vp_idx,
|
||||
|
Loading…
x
Reference in New Issue
Block a user