Skip to contentSkip to conversation

drivers/scsi/qlogicfc.c : Use of the time_after() macro

PATCH New [email protected] 1 participant 1 message Jul 31, 2005 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/scsi/qlogicfc.c : Use of the time_after() macro

From: Marcelo Feitoza Parisi <[email protected]>

Use of the time_after() macro, defined at linux/jiffies.h, which deal with wrapping correctly and are nicer to read.

---
 qlogicfc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/qlogicfc.c +2 -1
Index: 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

--