[PATCH] scsi: bfa: Convert to use time_after macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use time_after macro instead of opening it for readability.

Signed-off-by: Zehao Zhang <zhangzehao@xxxxxxxx>
---
 drivers/scsi/bfa/bfad_im.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c
index a9d3d8562d3c..c1a5f527b04c 100644
--- a/drivers/scsi/bfa/bfad_im.c
+++ b/drivers/scsi/bfa/bfad_im.c
@@ -13,6 +13,7 @@
  */
 
 #include <linux/export.h>
+#include <linux/jiffies.h>
 
 #include "bfad_drv.h"
 #include "bfad_im.h"
@@ -870,10 +871,10 @@ bfad_ramp_up_qdepth(struct bfad_itnim_s *itnim, struct scsi_device *sdev)
 {
 	struct scsi_device *tmp_sdev;
 
-	if (((jiffies - itnim->last_ramp_up_time) >
-		BFA_QUEUE_FULL_RAMP_UP_TIME * HZ) &&
-		((jiffies - itnim->last_queue_full_time) >
-		BFA_QUEUE_FULL_RAMP_UP_TIME * HZ)) {
+	if ((time_after(jiffies, itnim->last_ramp_up_time +
+		 BFA_QUEUE_FULL_RAMP_UP_TIME * HZ)) &&
+		(time_after(jiffies, itnim->last_queue_full_time +
+		 BFA_QUEUE_FULL_RAMP_UP_TIME * HZ))) {
 		shost_for_each_device(tmp_sdev, sdev->host) {
 			if (bfa_lun_queue_depth > tmp_sdev->queue_depth) {
 				if (tmp_sdev->id != sdev->id)
-- 
2.35.3




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux