summaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorManuel Schölling <manuel.schoelling@gmx.de>2014-05-22 22:11:06 +0200
committerDan Williams <dan.j.williams@intel.com>2014-08-21 11:39:22 -0700
commite628ce70cae5ccd67830b0e2c3d038831746d86b (patch)
treeb20b6a66aa3255cfec0485c4510910410671237f /drivers/dma
parent87cea76384257e6ac3fa4791b6a6b9d0335f7457 (diff)
downloadlinux-e628ce70cae5ccd67830b0e2c3d038831746d86b.tar.bz2
ioat: Use time_before_jiffies()
To be future-proof and for better readability the time comparisons are modified to use time_before_jiffies() instead of plain, error-prone math. Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de> [djbw: use time_before_jiffies() to make argument order more clear] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/ioat/dma_v2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dma/ioat/dma_v2.c b/drivers/dma/ioat/dma_v2.c
index 8d1058085eeb..2ce9be498608 100644
--- a/drivers/dma/ioat/dma_v2.c
+++ b/drivers/dma/ioat/dma_v2.c
@@ -735,7 +735,8 @@ int ioat2_check_space_lock(struct ioat2_dma_chan *ioat, int num_descs)
* called under bh_disabled so we need to trigger the timer
* event directly
*/
- if (jiffies > chan->timer.expires && timer_pending(&chan->timer)) {
+ if (time_is_before_jiffies(chan->timer.expires)
+ && timer_pending(&chan->timer)) {
struct ioatdma_device *device = chan->device;
mod_timer(&chan->timer, jiffies + COMPLETION_TIMEOUT);