[PATCH] ahd: Remove Redundant Comparison in ahd_intr()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The 'ahd_intr()' function contained a redundant comparisonthat was
always false. The comparison in question was:

if ((intstat == 0xFF) && (ahd->features & AHD_REMOVABLE) != 0)

The 'AHD_REMOVABLE' constant had a value of '0x00000'. Therefore, the
condition 'ahd->features & AHD_REMOVABLE' was always '0', making the
comparison unnecessary.

This patch removes the redundant comparison, making the code clearer
and more efficient.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Rand Deeb <rand.sec96@xxxxxxxxx>
---
 drivers/scsi/aic7xxx/aic79xx_core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c
index 98b02e7d38bb..4c790fe28f73 100644
--- a/drivers/scsi/aic7xxx/aic79xx_core.c
+++ b/drivers/scsi/aic7xxx/aic79xx_core.c
@@ -1008,9 +1008,7 @@ ahd_intr(struct ahd_softc *ahd)
 	 * Handle statuses that may invalidate our cached
 	 * copy of INTSTAT separately.
 	 */
-	if (intstat == 0xFF && (ahd->features & AHD_REMOVABLE) != 0) {
-		/* Hot eject.  Do nothing */
-	} else if (intstat & HWERRINT) {
+	if (intstat & HWERRINT) {
 		ahd_handle_hwerrint(ahd);
 	} else if ((intstat & (PCIINT|SPLTINT)) != 0) {
 		ahd->bus_intr(ahd);
-- 
2.34.1





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux