diff options
author | James Smart <jsmart2021@gmail.com> | 2021-06-18 16:15:24 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-06-18 23:01:04 -0400 |
commit | ca7f33c6b4a9b9893a5ba3aac57e7255510a4aac (patch) | |
tree | 140251bbff5d1c9c7603edfe0e43e5f1587662c2 /drivers/scsi/elx | |
parent | d66a65b7f5d219528520e287ff53aea1b5252ec3 (diff) | |
download | linux-ca7f33c6b4a9b9893a5ba3aac57e7255510a4aac.tar.gz linux-ca7f33c6b4a9b9893a5ba3aac57e7255510a4aac.tar.bz2 linux-ca7f33c6b4a9b9893a5ba3aac57e7255510a4aac.zip |
scsi: elx: efct: Fix is_originator return code type
efct_hw_iotype_is_originator() is returning a negative (-EIO) status which
doesn't make sense for a u8 function type.
Reviewing the code, the function only needs to return true/false, thus a
bool status is most appropriate.
Change the function return type and patch up the one callee as the bool
inverses the if check.
Link: https://lore.kernel.org/r/20210618231524.83179-1-jsmart2021@gmail.com
Fixes: 4df84e846624 ("scsi: elx: efct: Driver initialization routines")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/elx')
-rw-r--r-- | drivers/scsi/elx/efct/efct_hw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/elx/efct/efct_hw.c b/drivers/scsi/elx/efct/efct_hw.c index cde1cf6f03bd..ba8256b4c782 100644 --- a/drivers/scsi/elx/efct/efct_hw.c +++ b/drivers/scsi/elx/efct/efct_hw.c @@ -338,14 +338,14 @@ efct_hw_init_free_io(struct efct_hw_io *io) io->wq = NULL; } -static u8 efct_hw_iotype_is_originator(u16 io_type) +static bool efct_hw_iotype_is_originator(u16 io_type) { switch (io_type) { case EFCT_HW_FC_CT: case EFCT_HW_ELS_REQ: - return 0; + return true; default: - return -EIO; + return false; } } @@ -408,7 +408,7 @@ efct_hw_wq_process_io(void *arg, u8 *cqe, int status) * If we're not an originator IO, and XB is set, then issue * abort for the IO from within the HW */ - if ((!efct_hw_iotype_is_originator(io->type)) && + if (efct_hw_iotype_is_originator(io->type) && wcqe->flags & SLI4_WCQE_XB) { int rc; |