mtd: hisilicon: && vs & typo

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Feb 16 18:59:07 PST 2015


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=dd58d38fb30aa9ab52e792092cbd55c1dbc6e974
Commit:     dd58d38fb30aa9ab52e792092cbd55c1dbc6e974
Parent:     72f55d74bd12e66151d6db79d179cae678bcd290
Author:     Dan Carpenter <dan.carpenter at oracle.com>
AuthorDate: Wed Feb 11 13:25:09 2015 +0300
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Sun Feb 15 01:05:05 2015 -0800

    mtd: hisilicon: && vs & typo
    
    The intent was to mask away some bits here, not to test true or false.
    
    Fix: 54f531f6e332 ('mtd: hisilicon: add a new NAND controller driver for hisilicon hip04 Soc')
    Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/hisi504_nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/hisi504_nand.c b/drivers/mtd/nand/hisi504_nand.c
index 484e1db..289ad3a 100644
--- a/drivers/mtd/nand/hisi504_nand.c
+++ b/drivers/mtd/nand/hisi504_nand.c
@@ -495,7 +495,7 @@ static void hisi_nfc_cmdfunc(struct mtd_info *mtd, unsigned command, int column,
 		flag = hinfc_read(host, HINFC504_CON);
 		if (chip->ecc.mode == NAND_ECC_HW)
 			hinfc_write(host,
-				    flag && ~(HINFC504_CON_ECCTYPE_MASK <<
+				    flag & ~(HINFC504_CON_ECCTYPE_MASK <<
 				    HINFC504_CON_ECCTYPE_SHIFT), HINFC504_CON);
 
 		host->offset = 0;



More information about the linux-mtd-cvs mailing list