Skip to content
Commit fab683eb authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Nicholas Bellinger
Browse files

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: default avatarArnd Bergmann <arnd@arndb.de>
Fixes: 71cdc079 ("qla2xxx: Delete session if initiator is gone from FW")
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 20c08b36
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment