scsi: qedi: Remove comparison of u16 idx with zero.
authorChristos Gkekas <chris.gekas@gmail.com>
Sat, 24 Jun 2017 16:24:45 +0000 (17:24 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 26 Jun 2017 19:01:05 +0000 (15:01 -0400)
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>
drivers/scsi/qedi/qedi_fw.c

index 8bc7ee1a8ca81626829329e80831ffa2d57b8c63..d0dd92f6a36570388fdbd9fc419382a891303941 100644 (file)
@@ -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);