summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/ipath/ipath_sdma.c
diff options
context:
space:
mode:
authorManuel Schölling <manuel.schoelling@gmx.de>2014-05-25 17:26:41 +0400
committerRoland Dreier <roland@purestorage.com>2014-05-28 20:57:06 +0400
commit49410185c356b2767409de9220d5cf5c8db062e5 (patch)
tree455552fb347948aac6db38e92bd8f95f73fa378d /drivers/infiniband/hw/ipath/ipath_sdma.c
parent7e6d3e5c70f13874fb06e6b67696ed90ce79bd48 (diff)
downloadlinux-49410185c356b2767409de9220d5cf5c8db062e5.tar.xz
IB/ipath: Use time_before()/_after()
Time comparisons must use time_after / time_before to avoid problems when jiffies wraps. Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_sdma.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_sdma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_sdma.c b/drivers/infiniband/hw/ipath/ipath_sdma.c
index 98ac18ec977e..17a517766ad2 100644
--- a/drivers/infiniband/hw/ipath/ipath_sdma.c
+++ b/drivers/infiniband/hw/ipath/ipath_sdma.c
@@ -247,7 +247,7 @@ static void sdma_abort_task(unsigned long opaque)
/* ipath_sdma_abort() is done, waiting for interrupt */
if (status == IPATH_SDMA_ABORT_DISARMED) {
- if (jiffies < dd->ipath_sdma_abort_intr_timeout)
+ if (time_before(jiffies, dd->ipath_sdma_abort_intr_timeout))
goto resched_noprint;
/* give up, intr got lost somewhere */
ipath_dbg("give up waiting for SDMADISABLED intr\n");
@@ -341,7 +341,7 @@ resched:
* JAG - this is bad to just have default be a loop without
* state change
*/
- if (jiffies > dd->ipath_sdma_abort_jiffies) {
+ if (time_after(jiffies, dd->ipath_sdma_abort_jiffies)) {
ipath_dbg("looping with status 0x%08lx\n",
dd->ipath_sdma_status);
dd->ipath_sdma_abort_jiffies = jiffies + 5 * HZ;