From: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
To: kernel-janitors@vger.kernel.org
Subject: [KJ] [PATCH] drivers/ieee1394/hosts.c : Use of time_before macro
Date: Fri, 08 Jul 2005 19:32:31 +0000 [thread overview]
Message-ID: <42CED4CF.90906@feitoza.com.br> (raw)
In-Reply-To: <425D3FF0.1020406@feitoza.com.br>
[-- Attachment #1: Type: text/plain, Size: 114 bytes --]
Use of time_before() macro, defined at linux/jiffies.h, which deal with
wrapping correctly and are nicer to read.
[-- Attachment #2: hosts.patch --]
[-- Type: text/x-patch, Size: 791 bytes --]
Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
--- linux/drivers/ieee1394/hosts.c 2005-06-17 16:48:29.000000000 -0300
+++ linux-kj/drivers/ieee1394/hosts.c 2005-07-07 20:38:07.609477888 -0300
@@ -18,6 +18,7 @@
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/timer.h>
+#include <linux/jiffies.h>
#include "csr1212.h"
#include "ieee1394.h"
@@ -217,7 +218,7 @@
/* IEEE 1394a-2000 prohibits using the same generation number
* twice in a 60 second period. */
- if (jiffies - host->csr.gen_timestamp[next_gen] < 60 * HZ)
+ if (time_before(jiffies, host->csr.gen_timestamp[next_gen] + 60 * HZ))
/* Wait 60 seconds from the last time this generation number was
* used. */
reset_delay = (60 * HZ) + host->csr.gen_timestamp[next_gen] - jiffies;
[-- Attachment #3: Type: text/plain, Size: 168 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
prev parent reply other threads:[~2005-07-08 19:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-13 15:51 [KJ] [PATCH] drivers/ieee1394/hosts.c : Use of time_after() macro Marcelo Feitoza Parisi
2005-04-13 16:07 ` Nish Aravamudan
2005-04-14 21:46 ` [KJ] [PATCH] drivers/ieee1394/hosts.c : Use of time_before() Marcelo Feitoza Parisi
2005-07-08 19:32 ` Marcelo Feitoza Parisi [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=42CED4CF.90906@feitoza.com.br \
--to=marcelo@feitoza.com.br \
--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.