All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	linux-scsi@vger.kernel.org, Bart Van Assche <bvanassche@acm.org>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Chanho Park <chanho61.park@samsung.com>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	Bean Huo <beanhuo@micron.com>, Inki Dae <inki.dae@samsung.com>,
	Avri Altman <avri.altman@wdc.com>,
	Daejun Park <daejun7.park@samsung.com>,
	Can Guo <cang@codeaurora.org>,
	Asutosh Das <asutoshd@codeaurora.org>
Subject: [PATCH 19/29] scsi: ufs: Remove the TRUE and FALSE definitions
Date: Thu, 31 Mar 2022 15:34:14 -0700	[thread overview]
Message-ID: <20220331223424.1054715-20-bvanassche@acm.org> (raw)
In-Reply-To: <20220331223424.1054715-1-bvanassche@acm.org>

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.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/ufs/ufs-exynos.c |  4 ++--
 drivers/scsi/ufs/ufs-exynos.h |  8 ++++----
 drivers/scsi/ufs/ufshcd.c     |  8 ++++----
 drivers/scsi/ufs/unipro.h     | 14 --------------
 4 files changed, 10 insertions(+), 24 deletions(-)

diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c
index 474a4a064a68..0b99c74955ef 100644
--- a/drivers/scsi/ufs/ufs-exynos.c
+++ b/drivers/scsi/ufs/ufs-exynos.c
@@ -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);
diff --git a/drivers/scsi/ufs/ufs-exynos.h b/drivers/scsi/ufs/ufs-exynos.h
index 1c33e5466082..0b0a3d530ca6 100644
--- a/drivers/scsi/ufs/ufs-exynos.h
+++ b/drivers/scsi/ufs/ufs-exynos.h
@@ -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_ */
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index c36658d97774..c81b5f3f0b9a 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -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 ||
diff --git a/drivers/scsi/ufs/unipro.h b/drivers/scsi/ufs/unipro.h
index bdd0fa6a3c74..91152d8386e6 100644
--- a/drivers/scsi/ufs/unipro.h
+++ b/drivers/scsi/ufs/unipro.h
@@ -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)

  parent reply	other threads:[~2022-03-31 22:37 UTC|newest]

Thread overview: 101+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31 22:33 [PATCH 00/29] UFS patches for kernel v5.19 Bart Van Assche
2022-03-31 22:33 ` [PATCH 01/29] scsi: ufs: Declare ufshcd_wait_for_register() static Bart Van Assche
2022-04-01 18:33   ` Avri Altman
2022-04-03  9:45   ` Bean Huo
2022-03-31 22:33 ` [PATCH 02/29] scsi: ufs: Remove superfluous boolean conversions Bart Van Assche
2022-03-31 23:44   ` Bjorn Andersson
2022-04-03  3:20     ` Bart Van Assche
2022-04-01 18:35   ` Avri Altman
2022-03-31 22:33 ` [PATCH 03/29] scsi: ufs: Simplify statements that return a boolean Bart Van Assche
2022-03-31 23:45   ` Bjorn Andersson
2022-04-01 18:49   ` Avri Altman
2022-04-03  3:30     ` Bart Van Assche
2022-03-31 22:33 ` [PATCH 04/29] scsi: ufs: Remove ufshcd_lrb.sense_bufflen Bart Van Assche
2022-04-01 18:56   ` Avri Altman
2022-03-31 22:34 ` [PATCH 05/29] scsi: ufs: Remove ufshcd_lrb.sense_buffer Bart Van Assche
2022-04-01 19:21   ` Avri Altman
2022-04-03  4:26     ` Bart Van Assche
2022-03-31 22:34 ` [PATCH 06/29] scsi: ufs: Use get_unaligned_be16() instead of be16_to_cpup() Bart Van Assche
2022-04-03 11:20   ` Bean Huo
2022-03-31 22:34 ` [PATCH 07/29] scsi: ufs: Remove the UFS_FIX() and END_FIX() macros Bart Van Assche
2022-04-01 19:43   ` Avri Altman
2022-03-31 22:34 ` [PATCH 08/29] scsi: ufs: Rename struct ufs_dev_fix into ufs_dev_quirk Bart Van Assche
2022-04-01 19:47   ` Avri Altman
2022-04-04 21:15     ` Bart Van Assche
2022-03-31 22:34 ` [PATCH 09/29] scsi: ufs: Declare the quirks array const Bart Van Assche
2022-04-01 19:56   ` Avri Altman
2022-04-04 21:14     ` Bart Van Assche
2022-04-08 14:41       ` Krzysztof Kozlowski
2022-04-05  6:14   ` Avri Altman
2022-03-31 22:34 ` [PATCH 10/29] scsi: ufs: Invert the return value of ufshcd_is_hba_active() Bart Van Assche
2022-04-02  6:32   ` Avri Altman
2022-03-31 22:34 ` [PATCH 11/29] scsi: ufs: Remove unused constants and code Bart Van Assche
2022-04-02  6:59   ` Avri Altman
2022-04-04  2:07     ` Bart Van Assche
2022-04-05  6:55       ` Avri Altman
2022-04-07  2:33         ` Stanley Chu
2022-03-31 22:34 ` [PATCH 12/29] scsi: ufs: Switch to aggregate initialization Bart Van Assche
2022-04-02  7:07   ` Avri Altman
2022-03-31 22:34 ` [PATCH 13/29] scsi: ufs: Remove the LUN quiescing code from ufshcd_wl_shutdown() Bart Van Assche
2022-04-01  6:20   ` Adrian Hunter
2022-04-01 13:52     ` Bart Van Assche
2022-04-01 14:35       ` Adrian Hunter
2022-04-05 19:11         ` Bart Van Assche
2022-03-31 22:34 ` [PATCH 14/29] scsi: ufs: Make the config_scaling_param calls type safe Bart Van Assche
2022-03-31 23:48   ` Bjorn Andersson
2022-04-01  4:08     ` Bart Van Assche
2022-04-03  3:51       ` Bjorn Andersson
2022-03-31 22:34 ` [PATCH 15/29] scsi: ufs: Remove the driver version Bart Van Assche
2022-04-03  7:10   ` Avri Altman
2022-04-03 21:51     ` Bart Van Assche
2022-04-03 15:52   ` Bean Huo
2022-04-04  6:25   ` Avri Altman
2022-03-31 22:34 ` [PATCH 16/29] scsi: ufs: Rename sdev_ufs_device into ufs_device_wlun Bart Van Assche
2022-04-03  7:25   ` Avri Altman
2022-03-31 22:34 ` [PATCH 17/29] scsi: ufs: Use an SPDX license identifier in the Kconfig file Bart Van Assche
2022-03-31 22:34 ` [PATCH 18/29] scsi: ufs: Remove paths from source code comments Bart Van Assche
2022-04-03  7:33   ` Avri Altman
2022-03-31 22:34 ` Bart Van Assche [this message]
2022-04-01  2:19   ` [PATCH 19/29] scsi: ufs: Remove the TRUE and FALSE definitions Chanho Park
2022-04-04  2:39     ` Bart Van Assche
2022-03-31 22:34 ` [PATCH 20/29] scsi: ufs: Remove locking from around single register writes Bart Van Assche
2022-04-05  6:19   ` Avri Altman
2022-03-31 22:34 ` [PATCH 21/29] scsi: ufs: Introduce ufshcd_clkgate_delay_set() Bart Van Assche
2022-04-05  6:20   ` Avri Altman
2022-03-31 22:34 ` [PATCH 22/29] scsi: ufs: qcom: Fix ufs_qcom_resume() Bart Van Assche
2022-03-31 23:50   ` Bjorn Andersson
2022-03-31 22:34 ` [PATCH 23/29] scsi: ufs: Remove unnecessary ufshcd-crypto.h include directives Bart Van Assche
2022-03-31 22:34 ` [PATCH 24/29] scsi: ufs: Fix kernel-doc syntax in ufshcd.h Bart Van Assche
2022-04-05  6:27   ` Avri Altman
2022-03-31 22:34 ` [PATCH 25/29] scsi: ufs: Minimize #include directives Bart Van Assche
2022-04-01  6:53   ` Adrian Hunter
2022-04-01 13:52     ` Bart Van Assche
2022-03-31 22:34 ` [PATCH 26/29] scsi: ufs: Split the ufshcd.h header file Bart Van Assche
2022-04-01  0:21   ` Chanho Park
2022-04-01  4:14     ` Bart Van Assche
2022-04-01  4:30       ` Chanho Park
2022-04-05  6:39   ` Avri Altman
2022-04-05 14:10     ` Bart Van Assche
2022-03-31 22:34 ` [PATCH 27/29] scsi: ufs: Move the struct ufs_ref_clk definition Bart Van Assche
2022-04-05  6:50   ` Avri Altman
2022-03-31 22:34 ` [PATCH 28/29] scsi: ufs: Move the ufs_is_valid_unit_desc_lun() definition Bart Van Assche
2022-04-05  6:53   ` Avri Altman
2022-04-05 14:13     ` Bart Van Assche
2022-03-31 22:34 ` [PATCH 29/29] scsi: ufs: Split the drivers/scsi/ufs directory Bart Van Assche
2022-04-01  5:12   ` Christoph Hellwig
2022-04-01 13:56     ` Bart Van Assche
2022-04-01  6:38   ` Adrian Hunter
2022-04-01 13:58     ` Bart Van Assche
2022-04-01 17:03       ` Alim Akhtar
2022-04-02  3:21         ` Bart Van Assche
     [not found] ` <CGME20220331223522epcas2p4f8f20c2ec00dbc6d5a7bf855a1dd7395@epcms2p5>
2022-04-01  6:14   ` [PATCH 04/29] scsi: ufs: Remove ufshcd_lrb.sense_bufflen Keoseong Park
2022-04-01  9:28 ` [PATCH 00/29] UFS patches for kernel v5.19 Bean Huo
2022-04-01  9:32 ` Bean Huo
2022-04-01 14:12   ` Bart Van Assche
2022-04-03  5:59     ` Avri Altman
2022-04-03 21:36       ` Bean Huo
2022-04-03 21:54         ` Bart Van Assche
2022-04-04  8:12           ` Bean Huo
2022-04-04 21:13             ` Bart Van Assche
2022-04-05  9:33               ` Bean Huo
2022-04-05 14:22                 ` Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220331223424.1054715-20-bvanassche@acm.org \
    --to=bvanassche@acm.org \
    --cc=adrian.hunter@intel.com \
    --cc=alim.akhtar@samsung.com \
    --cc=asutoshd@codeaurora.org \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=cang@codeaurora.org \
    --cc=chanho61.park@samsung.com \
    --cc=daejun7.park@samsung.com \
    --cc=inki.dae@samsung.com \
    --cc=jaegeuk@kernel.org \
    --cc=jejb@linux.ibm.com \
    --cc=krzk@kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.