From: Manuel Schoelling <manuel.schoelling@gmx.de>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/3] net: vxge: Use time_is_before_jiffies() for time comparison
Date: Mon, 19 May 2014 16:53:42 +0000 [thread overview]
Message-ID: <1400518422.4698.8.camel@schoellingm.dzne.de> (raw)
In-Reply-To: <1400518056-12089-1-git-send-email-manuel.schoelling@gmx.de>
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@gmx.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;
prev parent reply other threads:[~2014-05-19 16:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-19 16:47 [PATCH 1/3] net: vxge: Use time_is_before_jiffies() for time comparison Manuel Schölling
[not found] ` <1400518318-12386-1-git-send-email-manuel.schoelling@gmx.de>
2014-05-19 16:51 ` [PATCH] " Manuel Schölling
2014-05-19 17:35 ` Joe Perches
2014-05-19 20:56 ` [PATCH v3] vxge: Use time_before() Manuel Schölling
2014-05-19 20:59 ` [PATCH] " Manuel Schölling
2014-05-21 20:43 ` David Miller
2014-05-19 16:53 ` Manuel Schoelling [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1400518422.4698.8.camel@schoellingm.dzne.de \
--to=manuel.schoelling@gmx.de \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox