diff mbox series

[-next] scsi: ufs: rockchip: Simplify bool conversion

Message ID 20250226021157.77934-1-jiapeng.chong@linux.alibaba.com (mailing list archive)
State New
Headers show
Series [-next] scsi: ufs: rockchip: Simplify bool conversion | expand

Commit Message

Jiapeng Chong Feb. 26, 2025, 2:11 a.m. UTC
./drivers/ufs/host/ufs-rockchip.c:268:70-75: WARNING: conversion to bool not needed here.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=19055
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/ufs/host/ufs-rockchip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Shawn Lin Feb. 26, 2025, 6:49 a.m. UTC | #1
在 2025/2/26 10:11, Jiapeng Chong 写道:
> ./drivers/ufs/host/ufs-rockchip.c:268:70-75: WARNING: conversion to bool not needed here.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=19055
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

Acked-by: Shawn Lin <shawn.lin@rock-chips.com>

Thanks Jiapeng.


> ---
>   drivers/ufs/host/ufs-rockchip.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/ufs/host/ufs-rockchip.c b/drivers/ufs/host/ufs-rockchip.c
> index 5b0ea9820767..350cb0f8d0c2 100644
> --- a/drivers/ufs/host/ufs-rockchip.c
> +++ b/drivers/ufs/host/ufs-rockchip.c
> @@ -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);
>   }
diff mbox series

Patch

diff --git a/drivers/ufs/host/ufs-rockchip.c b/drivers/ufs/host/ufs-rockchip.c
index 5b0ea9820767..350cb0f8d0c2 100644
--- a/drivers/ufs/host/ufs-rockchip.c
+++ b/drivers/ufs/host/ufs-rockchip.c
@@ -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);
 }