Commit f6e92d10 authored by Manuel Schölling's avatar Manuel Schölling Committed by David S. Miller

vxge: Use time_before()

To be future-proof and for better readability the time comparisons are modified
to use time_before() instead of plain, error-prone math.
Signed-off-by: default avatarManuel Schölling <manuel.schoelling@gmx.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 12b5c38f
...@@ -2122,7 +2122,7 @@ static int vxge_open_vpaths(struct vxgedev *vdev) ...@@ -2122,7 +2122,7 @@ static int vxge_open_vpaths(struct vxgedev *vdev)
static void adaptive_coalesce_tx_interrupts(struct vxge_fifo *fifo) static void adaptive_coalesce_tx_interrupts(struct vxge_fifo *fifo)
{ {
fifo->interrupt_count++; fifo->interrupt_count++;
if (jiffies > fifo->jiffies + HZ / 100) { if (time_before(fifo->jiffies + HZ / 100, jiffies)) {
struct __vxge_hw_fifo *hw_fifo = fifo->handle; struct __vxge_hw_fifo *hw_fifo = fifo->handle;
fifo->jiffies = jiffies; fifo->jiffies = jiffies;
...@@ -2150,7 +2150,7 @@ static void adaptive_coalesce_tx_interrupts(struct vxge_fifo *fifo) ...@@ -2150,7 +2150,7 @@ static void adaptive_coalesce_tx_interrupts(struct vxge_fifo *fifo)
static void adaptive_coalesce_rx_interrupts(struct vxge_ring *ring) static void adaptive_coalesce_rx_interrupts(struct vxge_ring *ring)
{ {
ring->interrupt_count++; ring->interrupt_count++;
if (jiffies > ring->jiffies + HZ / 100) { if (time_before(ring->jiffies + HZ / 100, jiffies)) {
struct __vxge_hw_ring *hw_ring = ring->handle; struct __vxge_hw_ring *hw_ring = ring->handle;
ring->jiffies = jiffies; ring->jiffies = jiffies;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment