lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1507499266-10410-1-git-send-email-chris.gekas@gmail.com>
Date:   Sun,  8 Oct 2017 22:47:46 +0100
From:   Christos Gkekas <chris.gekas@...il.com>
To:     Dario Ballabio <ballabio_dario@....com>,
        "James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Christos Gkekas <chris.gekas@...il.com>
Subject: [PATCH] scsi: eata: Remove unnecessary cpp_index check

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

Signed-off-by: Christos Gkekas <chris.gekas@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ