]> git.baikalelectronics.ru Git - kernel.git/commitdiff
scsi: ufs: Remove the TRUE and FALSE definitions
authorBart Van Assche <bvanassche@acm.org>
Tue, 19 Apr 2022 22:58:02 +0000 (15:58 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 26 Apr 2022 03:23:03 +0000 (23:23 -0400)
In the Linux kernel coding style document
(Documentation/process/coding-style.rst) it is recommended to use the type
'bool' and also the values 'true' and 'false'. Hence this patch that
removes the definitions and uses of TRUE and FALSE from the UFS driver.

Link: https://lore.kernel.org/r/20220419225811.4127248-20-bvanassche@acm.org
Tested-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufs-exynos.c
drivers/scsi/ufs/ufs-exynos.h
drivers/scsi/ufs/ufshcd.c
drivers/scsi/ufs/unipro.h

index 474a4a064a68da3097b2ea4a414c989abe596881..0b99c74955ef113c2aabd15df966e35667ec887a 100644 (file)
@@ -704,7 +704,7 @@ static void exynos_ufs_establish_connt(struct exynos_ufs *ufs)
 
        /* local unipro attributes */
        ufshcd_dme_set(hba, UIC_ARG_MIB(N_DEVICEID), DEV_ID);
-       ufshcd_dme_set(hba, UIC_ARG_MIB(N_DEVICEID_VALID), TRUE);
+       ufshcd_dme_set(hba, UIC_ARG_MIB(N_DEVICEID_VALID), true);
        ufshcd_dme_set(hba, UIC_ARG_MIB(T_PEERDEVICEID), PEER_DEV_ID);
        ufshcd_dme_set(hba, UIC_ARG_MIB(T_PEERCPORTID), PEER_CPORT_ID);
        ufshcd_dme_set(hba, UIC_ARG_MIB(T_CPORTFLAGS), CPORT_DEF_FLAGS);
@@ -1028,7 +1028,7 @@ static int exynos_ufs_post_link(struct ufs_hba *hba)
 
        if (ufs->opts & EXYNOS_UFS_OPT_SKIP_CONNECTION_ESTAB)
                ufshcd_dme_set(hba,
-                       UIC_ARG_MIB(T_DBG_SKIP_INIT_HIBERN8_EXIT), TRUE);
+                       UIC_ARG_MIB(T_DBG_SKIP_INIT_HIBERN8_EXIT), true);
 
        if (attr->pa_granularity) {
                exynos_ufs_enable_dbg_mode(hba);
index 1c33e5466082bf50e1610bc297449eafb6549725..0b0a3d530ca6bba3a8f626fd46e2b3cb7538cb6d 100644 (file)
@@ -248,22 +248,22 @@ long exynos_ufs_calc_time_cntr(struct exynos_ufs *, long);
 
 static inline void exynos_ufs_enable_ov_tm(struct ufs_hba *hba)
 {
-       ufshcd_dme_set(hba, UIC_ARG_MIB(PA_DBG_OV_TM), TRUE);
+       ufshcd_dme_set(hba, UIC_ARG_MIB(PA_DBG_OV_TM), true);
 }
 
 static inline void exynos_ufs_disable_ov_tm(struct ufs_hba *hba)
 {
-       ufshcd_dme_set(hba, UIC_ARG_MIB(PA_DBG_OV_TM), FALSE);
+       ufshcd_dme_set(hba, UIC_ARG_MIB(PA_DBG_OV_TM), false);
 }
 
 static inline void exynos_ufs_enable_dbg_mode(struct ufs_hba *hba)
 {
-       ufshcd_dme_set(hba, UIC_ARG_MIB(PA_DBG_MODE), TRUE);
+       ufshcd_dme_set(hba, UIC_ARG_MIB(PA_DBG_MODE), true);
 }
 
 static inline void exynos_ufs_disable_dbg_mode(struct ufs_hba *hba)
 {
-       ufshcd_dme_set(hba, UIC_ARG_MIB(PA_DBG_MODE), FALSE);
+       ufshcd_dme_set(hba, UIC_ARG_MIB(PA_DBG_MODE), false);
 }
 
 #endif /* _UFS_EXYNOS_H_ */
index 11808ce43357c48209d911bc44d9766bd8784b16..ef39d26afa90ca2af98e02d54e6dbac8595b0a3a 100644 (file)
@@ -4325,18 +4325,18 @@ static int ufshcd_change_power_mode(struct ufs_hba *hba,
                        pwr_mode->lane_rx);
        if (pwr_mode->pwr_rx == FASTAUTO_MODE ||
                        pwr_mode->pwr_rx == FAST_MODE)
-               ufshcd_dme_set(hba, UIC_ARG_MIB(PA_RXTERMINATION), TRUE);
+               ufshcd_dme_set(hba, UIC_ARG_MIB(PA_RXTERMINATION), true);
        else
-               ufshcd_dme_set(hba, UIC_ARG_MIB(PA_RXTERMINATION), FALSE);
+               ufshcd_dme_set(hba, UIC_ARG_MIB(PA_RXTERMINATION), false);
 
        ufshcd_dme_set(hba, UIC_ARG_MIB(PA_TXGEAR), pwr_mode->gear_tx);
        ufshcd_dme_set(hba, UIC_ARG_MIB(PA_ACTIVETXDATALANES),
                        pwr_mode->lane_tx);
        if (pwr_mode->pwr_tx == FASTAUTO_MODE ||
                        pwr_mode->pwr_tx == FAST_MODE)
-               ufshcd_dme_set(hba, UIC_ARG_MIB(PA_TXTERMINATION), TRUE);
+               ufshcd_dme_set(hba, UIC_ARG_MIB(PA_TXTERMINATION), true);
        else
-               ufshcd_dme_set(hba, UIC_ARG_MIB(PA_TXTERMINATION), FALSE);
+               ufshcd_dme_set(hba, UIC_ARG_MIB(PA_TXTERMINATION), false);
 
        if (pwr_mode->pwr_rx == FASTAUTO_MODE ||
            pwr_mode->pwr_tx == FASTAUTO_MODE ||
index 64647aa5c2e02a95b022075763507f7224456bea..0521f887e3acbb593089fee092b1fcd0d5717c96 100644 (file)
@@ -298,20 +298,6 @@ enum ufs_unipro_ver {
 #define T_TC0TXMAXSDUSIZE      0x4060
 #define T_TC1TXMAXSDUSIZE      0x4061
 
-#ifdef FALSE
-#undef FALSE
-#endif
-
-#ifdef TRUE
-#undef TRUE
-#endif
-
-/* Boolean attribute values */
-enum {
-       FALSE = 0,
-       TRUE,
-};
-
 /* CPort setting */
 #define E2EFC_ON       (1 << 0)
 #define E2EFC_OFF      (0 << 0)