diff options
author | Christos Gkekas <chris.gekas@gmail.com> | 2017-06-24 17:24:45 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-06-26 15:01:05 -0400 |
commit | e365cab14fc8c15ad754039cde2f4e574453a61b (patch) | |
tree | 7dc392e8aecab7787b8ceb59168a1beedf6f480e /drivers/scsi/qedi/qedi_fw.c | |
parent | ba82d91b7567774242534460910530289192d212 (diff) | |
download | linux-stable-e365cab14fc8c15ad754039cde2f4e574453a61b.tar.gz linux-stable-e365cab14fc8c15ad754039cde2f4e574453a61b.tar.bz2 linux-stable-e365cab14fc8c15ad754039cde2f4e574453a61b.zip |
scsi: qedi: Remove comparison of u16 idx with zero.
Variable idx is defined as u16 thus statement (idx < 0) is always false
and should be removed.
Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>
Acked-by: Manish Rangankar <Manish.Rangankar@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qedi/qedi_fw.c')
-rw-r--r-- | drivers/scsi/qedi/qedi_fw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/qedi/qedi_fw.c b/drivers/scsi/qedi/qedi_fw.c index 8bc7ee1a8ca8..d0dd92f6a365 100644 --- a/drivers/scsi/qedi/qedi_fw.c +++ b/drivers/scsi/qedi/qedi_fw.c @@ -333,7 +333,7 @@ static void qedi_get_rq_bdq_buf(struct qedi_ctx *qedi, /* Obtain buffer address from rqe_opaque */ idx = cqe->rqe_opaque.lo; - if ((idx < 0) || (idx > (QEDI_BDQ_NUM - 1))) { + if (idx > (QEDI_BDQ_NUM - 1)) { QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_CONN, "wrong idx %d returned by FW, dropping the unsolicited pkt\n", idx); @@ -370,7 +370,7 @@ static void qedi_put_rq_bdq_buf(struct qedi_ctx *qedi, /* Obtain buffer address from rqe_opaque */ idx = cqe->rqe_opaque.lo; - if ((idx < 0) || (idx > (QEDI_BDQ_NUM - 1))) { + if (idx > (QEDI_BDQ_NUM - 1)) { QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_CONN, "wrong idx %d returned by FW, dropping the unsolicited pkt\n", idx); |