mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rangankar, Manish" <Manish.Rangankar@cavium.com>
To: Christos Gkekas <chris.gekas@gmail.com>,
	Dept-Eng QLogic Storage Upstream 
	<QLogic-Storage-Upstream@cavium.com>,
	"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] scsi: qedi: Remove comparison of u16 idx with zero.
Date: Mon, 26 Jun 2017 07:17:19 +0000	[thread overview]
Message-ID: <D576B27D.3B0C5%manish.rangankar@cavium.com> (raw)
In-Reply-To: <1498321485-21677-1-git-send-email-chris.gekas@gmail.com>



On 24/06/17 9:54 PM, "Christos Gkekas" <chris.gekas@gmail.com> wrote:

>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>
>---
> drivers/scsi/qedi/qedi_fw.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/scsi/qedi/qedi_fw.c b/drivers/scsi/qedi/qedi_fw.c
>index e937490..19254bd 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);
>-- 
>2.7.4

Acked-by: Manish Rangankar <Manish.Rangankar@cavium.com>

  reply	other threads:[~2017-06-26  7:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-24 16:24 Christos Gkekas
2017-06-26  7:17 ` Rangankar, Manish [this message]
2017-06-26 17:43 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D576B27D.3B0C5%manish.rangankar@cavium.com \
    --to=manish.rangankar@cavium.com \
    --cc=QLogic-Storage-Upstream@cavium.com \
    --cc=chris.gekas@gmail.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®