[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230706103705.79755-1-zhangzehao@vivo.com>
Date: Thu, 6 Jul 2023 18:37:05 +0800
From: Zehao Zhang <zhangzehao@...o.com>
To: anil.gurumurthy@...gic.com, sudarsana.kalluru@...gic.com,
jejb@...ux.ibm.com, martin.petersen@...cle.com
Cc: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
Zehao Zhang <zhangzehao@...o.com>
Subject: [PATCH] scsi: bfa: Convert to use time_after macro
Use time_after macro instead of opening it for readability.
Signed-off-by: Zehao Zhang <zhangzehao@...o.com>
---
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
Powered by blists - more mailing lists