* [patch 1/1] drivers/scsi/qlogicfc.c : Use of the time_after() macro
@ 2005-07-31 11:11 domen
0 siblings, 0 replies; only message in thread
From: domen @ 2005-07-31 11:11 UTC (permalink / raw)
To: James.Bottomley; +Cc: linux-scsi, Marcelo Feitoza Parisi, domen
[-- Attachment #1: time_after-drivers_scsi_qlogicfc --]
[-- Type: text/plain, Size: 994 bytes --]
From: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
Use of the time_after() macro, defined at linux/jiffies.h, which deal
with wrapping correctly and are nicer to read.
Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
Signed-off-by: Domen Puncer <domen@coderock.org>
---
qlogicfc.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
Index: quilt/drivers/scsi/qlogicfc.c
===================================================================
--- quilt.orig/drivers/scsi/qlogicfc.c
+++ quilt/drivers/scsi/qlogicfc.c
@@ -1326,7 +1326,8 @@ static int isp2x00_queuecommand(Scsi_Cmn
cmd->control_flags = cpu_to_le16(CFLAG_READ);
if (Cmnd->device->tagged_supported) {
- if ((jiffies - hostdata->tag_ages[Cmnd->device->id]) > (2 * ISP_TIMEOUT)) {
+ if (time_after(jiffies, hostdata->tag_ages[Cmnd->device->id]
+ + (2 * ISP_TIMEOUT))) {
cmd->control_flags |= cpu_to_le16(CFLAG_ORDERED_TAG);
hostdata->tag_ages[Cmnd->device->id] = jiffies;
} else
--
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-07-31 11:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-31 11:11 [patch 1/1] drivers/scsi/qlogicfc.c : Use of the time_after() macro domen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox