[PATCH v4 29/32] cxlflash: Fix to double the delay each time
Matthew R. Ochs
mrochs at linux.vnet.ibm.com
Sat Sep 26 09:19:17 AEST 2015
From: Manoj Kumar <manoj at linux.vnet.ibm.com>
The operator used to double the delay is incorrect and
does not result in delay doubling.
To fix, use a left shift instead of the XOR operator.
Reported-by: Tomas Henzl <thenzl at redhat.com>
Signed-off-by: Matthew R. Ochs <mrochs at linux.vnet.ibm.com>
Signed-off-by: Manoj N. Kumar <manoj at linux.vnet.ibm.com>
Reviewed-by: Brian King <brking at linux.vnet.ibm.com>
---
drivers/scsi/cxlflash/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c
index ab11ee6..be78906 100644
--- a/drivers/scsi/cxlflash/main.c
+++ b/drivers/scsi/cxlflash/main.c
@@ -303,7 +303,7 @@ write_rrin:
if (rrin != 0x1)
break;
/* Double delay each time */
- udelay(2 ^ nretry);
+ udelay(2 << nretry);
} while (nretry++ < MC_ROOM_RETRY_CNT);
}
--
2.1.0
More information about the Linuxppc-dev
mailing list