mtd: nand_base: Removed unnecessary cleaning "onfi_version" variable

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Apr 5 08:59:05 EDT 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=0cca9fbf5d0a65fb536d38427f48460fda1f2e99
Commit:     0cca9fbf5d0a65fb536d38427f48460fda1f2e99
Parent:     fb066adadd224d5e46320b3fa7a80311c09be0d9
Author:     Alexander Shiyan <shc_work at mail.ru>
AuthorDate: Thu Feb 28 12:02:20 2013 +0400
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Apr 5 12:56:53 2013 +0100

    mtd: nand_base: Removed unnecessary cleaning "onfi_version" variable
    
    Variable "onfi_version" is already set to zero before nand_flash_detect_onfi()
    call, so additional cleaning is not necessary.
    
    Signed-off-by: Alexander Shiyan <shc_work at mail.ru>
    Acked-by: Brian Norris <computersforpeace at gmail.com>
    Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/nand/nand_base.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index ad0a88f..f159d5f 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2823,8 +2823,6 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,
 		chip->onfi_version = 20;
 	else if (val & (1 << 1))
 		chip->onfi_version = 10;
-	else
-		chip->onfi_version = 0;
 
 	if (!chip->onfi_version) {
 		pr_info("%s: unsupported ONFI version: %d\n", __func__, val);



More information about the linux-mtd-cvs mailing list