From: Nish Aravamudan <nish.aravamudan@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] [PATCH] drivers/net/hp100.c : Use of time_after() macro
Date: Wed, 13 Apr 2005 16:09:53 +0000 [thread overview]
Message-ID: <29495f1d05041309094c078945@mail.gmail.com> (raw)
In-Reply-To: <425A922C.6080100@feitoza.com.br>
On 4/11/05, Marcelo Feitoza Parisi <marcelo@feitoza.com.br> wrote:
> Use of time_after() macro, defined at linux/jiffies.h, which deal with
> wrapping correctly and are nicer to read.
>
> --
> Marcelo Feitoza Parisi
> marcelo at feitoza.com.br
> http://marcelo.feitoza.com.br/
>
> Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
>
> --- linux/drivers/net/hp100.c 2005-03-02 04:38:04.000000000 -0300
> +++ development/drivers/net/hp100.c 2005-04-09 18:42:14.000000000 -0300
> @@ -115,6 +115,7 @@
> #include <linux/delay.h>
> #include <linux/init.h>
> #include <linux/bitops.h>
> +#include <linux/jiffies.h>
>
> #include <asm/io.h>
>
> @@ -1493,7 +1494,7 @@ static int hp100_start_xmit_bm(struct sk
> printk("hp100: %s: start_xmit_bm: No TX PDL available.\n", dev->name);
> #endif
> /* not waited long enough since last tx? */
> - if (jiffies - dev->trans_start < HZ)
> + if (time_after(jiffies, dev->trans_start - HZ))
<snip>
> - if (jiffies - dev->trans_start < HZ) {
> + if (time_after(jiffies, dev->trans_start - HZ)) {
I think these both should be
if (time_before(jiffies, dev->trans_start + HZ))
Thanks,
Nish
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
next prev parent reply other threads:[~2005-04-13 16:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-11 15:05 [KJ] [PATCH] drivers/net/hp100.c : Use of time_after() macro Marcelo Feitoza Parisi
2005-04-13 16:09 ` Nish Aravamudan [this message]
2005-04-14 21:42 ` [KJ] [PATCH] drivers/net/hp100.c : Use of time_before() macro, Marcelo Feitoza Parisi
2005-07-08 18:41 ` [KJ] [PATCH] drivers/net/hp100.c : Use of time_before macro Marcelo Feitoza Parisi
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=29495f1d05041309094c078945@mail.gmail.com \
--to=nish.aravamudan@gmail.com \
--cc=kernel-janitors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.