Re: [PATCH] scsi: ufs: ufs-mediatek: Modify the return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/17/22 20:52, Chanwoo Lee wrote:
From: ChanWoo Lee <cw9316.lee@xxxxxxxxxxx>

Change the same as the other code to return bool type.
   91: 	return !!(host->caps & UFS_MTK_CAP_BOOST_CRYPT_ENGINE);
   98: 	return !!(host->caps & UFS_MTK_CAP_VA09_PWR_CTRL);
   105:	return !!(host->caps & UFS_MTK_CAP_BROKEN_VCC);

Signed-off-by: ChanWoo Lee <cw9316.lee@xxxxxxxxxxx>
---
  drivers/ufs/host/ufs-mediatek.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c
index 7d13878dff47..ef5816d82326 100644
--- a/drivers/ufs/host/ufs-mediatek.c
+++ b/drivers/ufs/host/ufs-mediatek.c
@@ -109,7 +109,7 @@ static bool ufs_mtk_is_pmc_via_fastauto(struct ufs_hba *hba)
  {
  	struct ufs_mtk_host *host = ufshcd_get_variant(hba);
- return (host->caps & UFS_MTK_CAP_PMC_VIA_FASTAUTO);
+	return !!(host->caps & UFS_MTK_CAP_PMC_VIA_FASTAUTO);
  }

Hi ChanWoo,

Please drop this patch and instead remove the !! from the other functions
that have return type 'bool'. There is more Linux kernel code that relies on
the implicit conversion from type 'int' to 'bool' than code that converts
explicitly from 'int' to 'bool'.

Thanks,

Bart.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux