Skip to contentSkip to conversation

scsi: eata: Remove unnecessary cpp_index check

PATCH New Christos Gkekas 1 participant 1 message Oct 8, 2017 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: eata: Remove unnecessary cpp_index check

Variable spp->cpp_index is unsigned so checking whether it is less than zero is redundant.

---
 drivers/scsi/eata.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/scsi/eata.c +2 -3
index 6501c33..53a8fcd 100644
@@ -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 */
Signature · 1 line
2.7.4