Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753273AbcCYCm5 (ORCPT ); Thu, 24 Mar 2016 22:42:57 -0400 Received: from cmccmta2.chinamobile.com ([221.176.66.80]:2420 "EHLO cmccmta2.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752830AbcCYCmV (ORCPT ); Thu, 24 Mar 2016 22:42:21 -0400 X-RM-TRANSID: 2ee856f4a5872b2-d05ef X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2eea56f4a585ebc-fd1fd 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 3/5] drivers/mtd: map_bankwidth_supported can be boolean Date: Fri, 25 Mar 2016 10:41:53 +0800 Message-Id: <1458873715-3670-4-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: 939 Lines: 41 This patch makes map_bankwidth_supported return bool 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/map.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h index 58f3ba7..130a1b3 100644 --- a/include/linux/mtd/map.h +++ b/include/linux/mtd/map.h @@ -155,7 +155,7 @@ static inline int map_bankwidth(void *map) #define MAX_MAP_BANKWIDTH 1 #endif -static inline int map_bankwidth_supported(int w) +static inline bool map_bankwidth_supported(int w) { switch (w) { #ifdef CONFIG_MTD_MAP_BANK_WIDTH_1 @@ -176,10 +176,10 @@ static inline int map_bankwidth_supported(int w) #ifdef CONFIG_MTD_MAP_BANK_WIDTH_32 case 32: #endif - return 1; + return true; default: - return 0; + return false; } } -- 1.9.1