Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752953AbcCYCmW (ORCPT ); Thu, 24 Mar 2016 22:42:22 -0400 Received: from cmccmta2.chinamobile.com ([221.176.66.80]:3948 "EHLO cmccmta2.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752832AbcCYCmU (ORCPT ); Thu, 24 Mar 2016 22:42:20 -0400 X-RM-TRANSID: 2ee556f4a5883b2-d06b2 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2eea56f4a585ebc-fd201 From: Yaowei Bai To: dwmw2@infradead.org, computersforpeace@gmail.com, richard@nod.at, boris.brezillon@free-electrons.com Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, baiyaowei@cmss.chinamobile.com Subject: [PATCH 4/5] drivers/mtd: mtd_nand_has_bch can be boolean Date: Fri, 25 Mar 2016 10:41:54 +0800 Message-Id: <1458873715-3670-5-git-send-email-baiyaowei@cmss.chinamobile.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1458873715-3670-1-git-send-email-baiyaowei@cmss.chinamobile.com> References: <1458873715-3670-1-git-send-email-baiyaowei@cmss.chinamobile.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1060 Lines: 37 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 --- 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