Skip to contentSkip to conversation

mtd: hisilicon: && vs & typo

PATCH Applied Dan Carpenter 3 participants 5 messages Feb 11, 2015 – Feb 28, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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')

drivers/mtd/nand/hisi504_nand.c +1 -1
index 484e1db..289ad3a 100644
@@ -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;
#1 lore raw

Hi,

Quoted 10 lines · Dan Carpenter

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')

drivers/mtd/nand/hisi504_nand.c +0 -0
index 484e1db..289ad3a 100644

drivers/mtd/nand/hisi504_nand.c static void hisi_nfc_cmdfunc(struct mtd_info *mtd, unsigned command, int column, · line 498

Quoted 5 lines
drivers/mtd/nand/hisi504_nand.c +1 -1
@@ -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 <<

Looks good to me. Zhou, can I get an ack?

drivers/mtd/nand/hisi504_nand.c static void hisi_nfc_cmdfunc(struct mtd_info *mtd, unsigned command, int column, · line 501

Quoted 3 lines
drivers/mtd/nand/hisi504_nand.c +0 -0
 				    HINFC504_CON_ECCTYPE_SHIFT), HINFC504_CON);
 
 		host->offset = 0;

Brian

#2 lore raw
Quoted 8 lines · Brian Norris

Hi,

Quoted 5 lines · Dan Carpenter

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')

Quoted 12 lines

drivers/mtd/nand/hisi504_nand.c static void hisi_nfc_cmdfunc(struct mtd_info *mtd, unsigned command, int column, · line 498

Quoted 10 lines
drivers/mtd/nand/hisi504_nand.c +1 -1
index 484e1db..289ad3a 100644
@@ -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 <<

Looks good to me. Zhou, can I get an ack?

Hi Brian,

Sorry for late for the reason of Chinese new year vacation. You can apply that above, My mistake there.

Thanks,
Zhou Wang

Quoted 8 lines

drivers/mtd/nand/hisi504_nand.c static void hisi_nfc_cmdfunc(struct mtd_info *mtd, unsigned command, int column, · line 501

Quoted 4 lines
drivers/mtd/nand/hisi504_nand.c +0 -0
 				    HINFC504_CON_ECCTYPE_SHIFT), HINFC504_CON);
 
 		host->offset = 0;

Brian

#4 lore raw
Quoted 7 lines · Brian Norris
Quoted 4 lines · Dan Carpenter

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')

Pushed to l2-mtd.git. Thanks.

Hi Brian,

Thanks for the pushing.

Zhou Wang

Quoted 4 lines

Brian