Skip to contentSkip to conversation

scsi: ufs: rockchip: Simplify bool conversion

PATCH Applied Jiapeng Chong 3 participants 4 messages Feb 26, 2025 – Mar 11, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: ufs: rockchip: Simplify bool conversion

./drivers/ufs/host/ufs-rockchip.c:268:70-75: WARNING: conversion to bool not needed here.

---
 drivers/ufs/host/ufs-rockchip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ufs/host/ufs-rockchip.c +1 -1
index 5b0ea9820767..350cb0f8d0c2 100644
@@ -265,7 +265,7 @@ static int ufs_rockchip_runtime_suspend(struct device *dev)
 	clk_disable_unprepare(host->ref_out_clk);
 
 	/* Do not power down the genpd if rpm_lvl is less than level 5 */
-	dev_pm_genpd_rpm_always_on(dev, hba->rpm_lvl < UFS_PM_LVL_5 ? true : false);
+	dev_pm_genpd_rpm_always_on(dev, hba->rpm_lvl < UFS_PM_LVL_5);
 
 	return ufshcd_runtime_suspend(dev);
 }
Signature · 1 line
2.32.0.3.g01195cf9f
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Jiapeng Chong

./drivers/ufs/host/ufs-rockchip.c:268:70-75: WARNING: conversion to bool not needed here.

Thanks Jiapeng.

Quoted 9 lines
---
  drivers/ufs/host/ufs-rockchip.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ufs/host/ufs-rockchip.c +0 -0
index 5b0ea9820767..350cb0f8d0c2 100644

drivers/ufs/host/ufs-rockchip.c static int ufs_rockchip_runtime_suspend(struct device *dev) · line 271

Quoted 8 lines
drivers/ufs/host/ufs-rockchip.c +1 -1
@@ -265,7 +265,7 @@ static int ufs_rockchip_runtime_suspend(struct device *dev)
  	clk_disable_unprepare(host->ref_out_clk);
 
  	/* Do not power down the genpd if rpm_lvl is less than level 5 */
-	dev_pm_genpd_rpm_always_on(dev, hba->rpm_lvl < UFS_PM_LVL_5 ? true : false);
+	dev_pm_genpd_rpm_always_on(dev, hba->rpm_lvl < UFS_PM_LVL_5);
 
  	return ufshcd_runtime_suspend(dev);
  }

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#2 lore raw
In reply to Jiapeng Chong

Jiapeng,

Quoted 1 line

./drivers/ufs/host/ufs-rockchip.c:268:70-75: WARNING: conversion to bool not needed here.

Applied to 6.15/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering