lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 19 May 2014 18:53:42 +0200
From:	Manuel Schoelling <manuel.schoelling@....de>
To:	davem@...emloft.net
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 1/3] net: vxge: Use time_is_before_jiffies() for time
 comparison

Sorry, contrary to the subject of this mail, this is a single file
patch.
Patches 2-3 do not exist.

On Mo, 2014-05-19 at 18:47 +0200, Manuel Schölling wrote:
> To be future-proof and for better readability the time comparisons are modified
> to use time_is_before_jiffies() instead of plain, error-prone math.
> 
> Signed-off-by: Manuel Schölling <manuel.schoelling@....de>
> ---
>  drivers/net/ethernet/neterion/vxge/vxge-main.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c
> index d107bcb..79f42db 100644
> --- a/drivers/net/ethernet/neterion/vxge/vxge-main.c
> +++ b/drivers/net/ethernet/neterion/vxge/vxge-main.c
> @@ -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_is_before_jiffies(fifo->jiffies + HZ / 100)) {
>  		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_is_before_jiffies(ring->jiffies + HZ / 100)) {
>  		struct __vxge_hw_ring *hw_ring = ring->handle;
>  
>  		ring->jiffies = jiffies;


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists