This patch makes mtd_nand_has_bch return bool to improve readability
due to this particular function only using either one or zero as its return
value.

No functional change.

Signed-off-by: Yaowei Bai <baiyao...@cmss.chinamobile.com>
---
 include/linux/mtd/nand_bch.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/mtd/nand_bch.h b/include/linux/mtd/nand_bch.h
index fb0bc34..8778c79 100644
--- a/include/linux/mtd/nand_bch.h
+++ b/include/linux/mtd/nand_bch.h
@@ -16,7 +16,7 @@ struct nand_bch_control;
 
 #if defined(CONFIG_MTD_NAND_ECC_BCH)
 
-static inline int mtd_nand_has_bch(void) { return 1; }
+static inline bool mtd_nand_has_bch(void) { return true; }
 
 /*
  * Calculate BCH ecc code
@@ -42,7 +42,7 @@ void nand_bch_free(struct nand_bch_control *nbc);
 
 #else /* !CONFIG_MTD_NAND_ECC_BCH */
 
-static inline int mtd_nand_has_bch(void) { return 0; }
+static inline bool mtd_nand_has_bch(void) { return false; }
 
 static inline int
 nand_bch_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
-- 
1.9.1



Reply via email to