vxge: Use time_before()
authorManuel Schölling <manuel.schoelling@gmx.de>
Mon, 19 May 2014 20:59:04 +0000 (22:59 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 May 2014 20:42:30 +0000 (16:42 -0400)
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: Manuel Schölling <manuel.schoelling@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/neterion/vxge/vxge-main.c

index d107bcbb8543035110a98a82a21a7e72c8ec1303..7a0deadd53bf14743e4c530b895c8658e59c8be2 100644 (file)
@@ -2122,7 +2122,7 @@ static int vxge_open_vpaths(struct vxgedev *vdev)
 static void adaptive_coalesce_tx_interrupts(struct vxge_fifo *fifo)
 {
        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;
 
                fifo->jiffies = jiffies;
@@ -2150,7 +2150,7 @@ static void adaptive_coalesce_tx_interrupts(struct vxge_fifo *fifo)
 static void adaptive_coalesce_rx_interrupts(struct vxge_ring *ring)
 {
        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;
 
                ring->jiffies = jiffies;
This page took 0.026302 seconds and 5 git commands to generate.