From: Christos Gkekas <chris.gekas@gmail.com>
To: Dario Ballabio <ballabio_dario@emc.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Christos Gkekas <chris.gekas@gmail.com>
Subject: [PATCH] scsi: eata: Remove unnecessary cpp_index check
Date: Sun, 8 Oct 2017 22:47:46 +0100 [thread overview]
Message-ID: <1507499266-10410-1-git-send-email-chris.gekas@gmail.com> (raw)
Variable spp->cpp_index is unsigned so checking whether it is less than
zero is redundant.
Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>
---
drivers/scsi/eata.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c
index 6501c33..53a8fcd 100644
--- a/drivers/scsi/eata.c
+++ b/drivers/scsi/eata.c
@@ -2332,12 +2332,11 @@ static irqreturn_t ihdlr(struct Scsi_Host *shost)
printk
("%s: ihdlr, spp->eoc == 0, irq %d, reg 0x%x, count %d.\n",
ha->board_name, irq, reg, ha->iocount);
- if (spp->cpp_index < 0 || spp->cpp_index >= shost->can_queue)
+ if (spp->cpp_index >= shost->can_queue)
printk
("%s: ihdlr, bad spp->cpp_index %d, irq %d, reg 0x%x, count %d.\n",
ha->board_name, spp->cpp_index, irq, reg, ha->iocount);
- if (spp->eoc == 0 || spp->cpp_index < 0
- || spp->cpp_index >= shost->can_queue)
+ if (spp->eoc == 0 || spp->cpp_index >= shost->can_queue)
goto handled;
/* Find the mailbox to be serviced on this board */
--
2.7.4
reply other threads:[~2017-10-08 21:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1507499266-10410-1-git-send-email-chris.gekas@gmail.com \
--to=chris.gekas@gmail.com \
--cc=ballabio_dario@emc.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;
as well as URLs for NNTP newsgroup(s).