Skip to contentSkip to conversation

ufs: core: correct clear tm error log

PATCH Superseded [email protected] 3 participants 4 messages Oct 2, 2023 – Oct 3, 2023

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ufs: core: correct clear tm error log

From: Peter Wang <[email protected]>

The clear tm function error log is inverted.

---
 drivers/ufs/core/ufshcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ufs/core/ufshcd.c +1 -1
index c2df07545f96..4095d88eee44 100644
@@ -6895,7 +6895,7 @@ static int ufshcd_clear_tm_cmd(struct ufs_hba *hba, int tag)
 			mask, 0, 1000, 1000);
 
 	dev_err(hba->dev, "Clearing task management function with tag %d %s\n",
-		tag, err ? "succeeded" : "failed");
+		tag, err ? "failed" : "succeeded");
 
 out:
 	return err;
Signature · 1 line
2.18.0
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines

From: Peter Wang <[email protected]>

The clear tm function error log is inverted.

Quoted 21 lines
---
 drivers/ufs/core/ufshcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ufs/core/ufshcd.c index renamed from drivers/ufs/core/ufshcd.c +0 -0

c2df07545f96..4095d88eee44 100644

drivers/ufs/core/ufshcd.c +1 -1
@@ -6895,7 +6895,7 @@ static int ufshcd_clear_tm_cmd(struct ufs_hba
 *hba, int tag)
                        mask, 0, 1000, 1000);
 
        dev_err(hba->dev, "Clearing task management function with tag %d
 %s\n",
-               tag, err ? "succeeded" : "failed");
+               tag, err ? "failed" : "succeeded");
 

out:

        return err;

--
2.18.0

#2 lore raw
In reply to [email protected]
Quoted 14 lines · On 10/2/23 05:55, [email protected] wrote:

From: Peter Wang <[email protected]>

The clear tm function error log is inverted.

---
  drivers/ufs/core/ufshcd.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ufs/core/ufshcd.c +0 -0
index c2df07545f96..4095d88eee44 100644

drivers/ufs/core/ufshcd.c static int ufshcd_clear_tm_cmd(struct ufs_hba *hba, int tag) · line 6901

Quoted 8 lines
drivers/ufs/core/ufshcd.c +1 -1
@@ -6895,7 +6895,7 @@ static int ufshcd_clear_tm_cmd(struct ufs_hba *hba, int tag)
  			mask, 0, 1000, 1000);
 
  	dev_err(hba->dev, "Clearing task management function with tag %d %s\n",
-		tag, err ? "succeeded" : "failed");
+		tag, err ? "failed" : "succeeded");
 
  out:
  	return err;

Please consider changing "err ?" into "err < 0 ?" to make it more clear that negative return values represent an error. Additionally, please consider adding the following:

Fixes 4693fad7d6d4 ("scsi: ufs: core: Log error handler activity")

Thanks,

Bart.

#3 lore raw
Quoted 10 lines · Bart Van Assche

Please consider changing "err ?" into "err < 0 ?" to make it more clear
that negative return values represent an error. Additionally, please consider adding the following:

Fixes 4693fad7d6d4 ("scsi: ufs: core: Log error handler activity")

Thanks,

Bart.

Hi Bart,

Thanks for review and good suggestion. will update next version.

Thanks.
Peter