All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] scsi: ufs: make ufshcd_is_{device_present,hba_active}() return bool
@ 2017-03-28 13:49 kusumi.tomohiro
  2017-03-28 13:49 ` [PATCH 2/6] scsi: ufs: use existing macro CONTROLLER_ENABLE to test register bit kusumi.tomohiro
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: kusumi.tomohiro @ 2017-03-28 13:49 UTC (permalink / raw)
  To: martin.petersen, vinholikatti, linux-scsi; +Cc: Tomohiro Kusumi

From: Tomohiro Kusumi <tkusumi@tuxera.com>

ufshcd driver generally uses bool for is_xxx type things instead of int,
so conform to its style.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
---
 drivers/scsi/ufs/ufshcd.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index b7e5128..b006f1e 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -585,12 +585,12 @@ static inline u32 ufshcd_get_ufs_version(struct ufs_hba *hba)
  *			      the host controller
  * @hba: pointer to adapter instance
  *
- * Returns 1 if device present, 0 if no device detected
+ * Returns true if device present, false if no device detected
  */
-static inline int ufshcd_is_device_present(struct ufs_hba *hba)
+static inline bool ufshcd_is_device_present(struct ufs_hba *hba)
 {
 	return (ufshcd_readl(hba, REG_CONTROLLER_STATUS) &
-						DEVICE_PRESENT) ? 1 : 0;
+						DEVICE_PRESENT) ? true : false;
 }
 
 /**
@@ -832,11 +832,11 @@ static inline void ufshcd_hba_start(struct ufs_hba *hba)
  * ufshcd_is_hba_active - Get controller state
  * @hba: per adapter instance
  *
- * Returns zero if controller is active, 1 otherwise
+ * Returns false if controller is active, true otherwise
  */
-static inline int ufshcd_is_hba_active(struct ufs_hba *hba)
+static inline bool ufshcd_is_hba_active(struct ufs_hba *hba)
 {
-	return (ufshcd_readl(hba, REG_CONTROLLER_ENABLE) & 0x1) ? 0 : 1;
+	return (ufshcd_readl(hba, REG_CONTROLLER_ENABLE) & 0x1) ? false : true;
 }
 
 static const char *ufschd_uic_link_state_to_string(
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-03-30  2:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-28 13:49 [PATCH 1/6] scsi: ufs: make ufshcd_is_{device_present,hba_active}() return bool kusumi.tomohiro
2017-03-28 13:49 ` [PATCH 2/6] scsi: ufs: use existing macro CONTROLLER_ENABLE to test register bit kusumi.tomohiro
2017-03-29  5:02   ` Subhash Jadavani
2017-03-28 13:49 ` [PATCH 3/6] scsi: ufs: non functional macro fix kusumi.tomohiro
2017-03-29  5:03   ` Subhash Jadavani
2017-03-28 13:49 ` [PATCH 4/6] scsi: ufs: add missing macros for register bits from UFSHCI spec kusumi.tomohiro
2017-03-29  5:04   ` Subhash Jadavani
2017-03-28 13:49 ` [PATCH 5/6] scsi: ufs: remove deprecated enum for hw interrupt kusumi.tomohiro
2017-03-29  5:07   ` Subhash Jadavani
2017-03-28 13:49 ` [PATCH 6/6] scsi: ufs: just use sizeof() for snprintf() kusumi.tomohiro
2017-03-29  5:08   ` Subhash Jadavani
2017-03-29  4:59 ` [PATCH 1/6] scsi: ufs: make ufshcd_is_{device_present,hba_active}() return bool Subhash Jadavani
2017-03-30  2:44 ` Martin K. Petersen

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.