aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorRobert P. J. Day <rpjday@crashcourse.ca>2008-04-17 00:09:28 -0400
committerRoland Dreier <rolandd@cisco.com>2008-04-17 00:09:28 -0400
commitb3b8128fd3b0966830ee90f1162173d07cb496a0 (patch)
tree72657b2b5611973bf12b8e4207d5090225f1fb20 /drivers/infiniband
parentf438000f7a31fad7cfd27f33ad324a250f4cd2df (diff)
IB/ipath: Fix time comparison to use time_after_eq()
Raw comparison against jiffies will fail if jiffies wraps, although since ipath currently only supports 64-bit architectures, this is rather far-fetched. Still, it's better to use time_after_eq(). Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_mad.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_mad.c b/drivers/infiniband/hw/ipath/ipath_mad.c
index 30b2f44406b1..babcc09c832c 100644
--- a/drivers/infiniband/hw/ipath/ipath_mad.c
+++ b/drivers/infiniband/hw/ipath/ipath_mad.c
@@ -1397,7 +1397,8 @@ static int process_subn(struct ib_device *ibdev, int mad_flags,
1397 } 1397 }
1398 1398
1399 /* Is the mkey in the process of expiring? */ 1399 /* Is the mkey in the process of expiring? */
1400 if (dev->mkey_lease_timeout && jiffies >= dev->mkey_lease_timeout) { 1400 if (dev->mkey_lease_timeout &&
1401 time_after_eq(jiffies, dev->mkey_lease_timeout)) {
1401 /* Clear timeout and mkey protection field. */ 1402 /* Clear timeout and mkey protection field. */
1402 dev->mkey_lease_timeout = 0; 1403 dev->mkey_lease_timeout = 0;
1403 dev->mkeyprot = 0; 1404 dev->mkeyprot = 0;