lkml.org 
[lkml]   [2016]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/5] drivers/mtd: map_bankwidth_supported can be boolean
Date
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 <baiyaowei@cmss.chinamobile.com>
---
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


\
 
 \ /
  Last update: 2016-03-25 04:01    [W:0.052 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site