diff options
author | Marcelo Feitoza Parisi <marcelo@feitoza.com.br> | 2006-03-28 09:56:47 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-28 17:16:07 (GMT) |
commit | 60c904ae5bded8bb71f7bff7d63f2a6959d2a8e4 (patch) | |
tree | af7593441b9d640302a73a6406218a6b9cdc6aa2 /drivers/scsi/qlogicpti.c | |
parent | 9bae1ff3e7926fe5e92db2f3c6d8832f18f777bc (diff) | |
download | linux-60c904ae5bded8bb71f7bff7d63f2a6959d2a8e4.tar.xz |
[PATCH] drivers/scsi/*: use time_after() and friends
They deal with wrapping correctly and are nicer to read.
Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/scsi/qlogicpti.c')
-rw-r--r-- | drivers/scsi/qlogicpti.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index 1fd5fc6..c7e78dc 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c @@ -24,6 +24,7 @@ #include <linux/spinlock.h> #include <linux/interrupt.h> #include <linux/module.h> +#include <linux/jiffies.h> #include <asm/byteorder.h> @@ -1017,7 +1018,7 @@ static inline void cmd_frob(struct Command_Entry *cmd, struct scsi_cmnd *Cmnd, if (Cmnd->device->tagged_supported) { if (qpti->cmd_count[Cmnd->device->id] == 0) qpti->tag_ages[Cmnd->device->id] = jiffies; - if ((jiffies - qpti->tag_ages[Cmnd->device->id]) > (5*HZ)) { + if (time_after(jiffies, qpti->tag_ages[Cmnd->device->id] + (5*HZ))) { cmd->control_flags = CFLAG_ORDERED_TAG; qpti->tag_ages[Cmnd->device->id] = jiffies; } else |