diff options
author | Manuel Schölling <manuel.schoelling@gmx.de> | 2014-05-18 17:32:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-18 21:24:52 -0400 |
commit | 71fd762f2eef6acc848e262ac934fc694b49204e (patch) | |
tree | 9e69fd992dca49eaa2e375fa47737b3b12a4d482 /net/rds/iw_send.c | |
parent | 03b8dcba1e6ea636a96d80f7adbf03d748d517ad (diff) |
net: rds: Use time_after() for time comparison
To be future-proof and for better readability the time comparisons are modified
to use time_after() instead of raw math.
Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/iw_send.c')
-rw-r--r-- | net/rds/iw_send.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/rds/iw_send.c b/net/rds/iw_send.c index e40c3c5db2c4..9105ea03aec5 100644 --- a/net/rds/iw_send.c +++ b/net/rds/iw_send.c | |||
@@ -232,7 +232,7 @@ void rds_iw_send_cq_comp_handler(struct ib_cq *cq, void *context) | |||
232 | } | 232 | } |
233 | 233 | ||
234 | if (wc.wr_id == RDS_IW_ACK_WR_ID) { | 234 | if (wc.wr_id == RDS_IW_ACK_WR_ID) { |
235 | if (ic->i_ack_queued + HZ/2 < jiffies) | 235 | if (time_after(jiffies, ic->i_ack_queued + HZ/2)) |
236 | rds_iw_stats_inc(s_iw_tx_stalled); | 236 | rds_iw_stats_inc(s_iw_tx_stalled); |
237 | rds_iw_ack_send_complete(ic); | 237 | rds_iw_ack_send_complete(ic); |
238 | continue; | 238 | continue; |
@@ -267,7 +267,7 @@ void rds_iw_send_cq_comp_handler(struct ib_cq *cq, void *context) | |||
267 | 267 | ||
268 | send->s_wr.opcode = 0xdead; | 268 | send->s_wr.opcode = 0xdead; |
269 | send->s_wr.num_sge = 1; | 269 | send->s_wr.num_sge = 1; |
270 | if (send->s_queued + HZ/2 < jiffies) | 270 | if (time_after(jiffies, send->s_queued + HZ/2)) |
271 | rds_iw_stats_inc(s_iw_tx_stalled); | 271 | rds_iw_stats_inc(s_iw_tx_stalled); |
272 | 272 | ||
273 | /* If a RDMA operation produced an error, signal this right | 273 | /* If a RDMA operation produced an error, signal this right |