Re: [PATCH v2] scsi: ufs: core: print trs for pending requests in MCQ mode

From: Ziqi Chen
Date: Wed Mar 15 2023 - 03:36:42 EST


sure

Best Regards,
Ziqi

On 3/15/2023 2:09 AM, Bart Van Assche wrote:
On 3/14/23 04:16, Ziqi Chen wrote:
+static bool ufshcd_print_tr_iter(struct request *req, void *priv)
+{
+    struct scsi_device *sdev = req->q->queuedata;
+    struct Scsi_Host *shost = sdev->host;
+    struct ufs_hba *hba = shost_priv(shost);
+
+    if (!IS_ERR_OR_NULL(hba))
+        ufshcd_print_tr(hba, req->tag, *(bool *)priv);

I think that the "if (!IS_ERR_OR_NULL(hba))" code can be removed safely. Otherwise this patch looks good to me.

Thanks,

Bart.