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 5/5] drivers/mtd/nand: nand_opcode_8bits can be boolean
Date
This patch makes nand_opcode_8bits 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/nand.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index bdd68e2..dd79eae 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -989,18 +989,18 @@ static inline bool nand_is_slc(struct nand_chip *chip)
* Check if the opcode's address should be sent only on the lower 8 bits
* @command: opcode to check
*/
-static inline int nand_opcode_8bits(unsigned int command)
+static inline bool nand_opcode_8bits(unsigned int command)
{
switch (command) {
case NAND_CMD_READID:
case NAND_CMD_PARAM:
case NAND_CMD_GET_FEATURES:
case NAND_CMD_SET_FEATURES:
- return 1;
+ return true;
default:
break;
}
- return 0;
+ return false;
}

/* return the supported JEDEC features. */
--
1.9.1


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