Patchwork [2/3] mtd: nand_base: Removed unnecessary cleaning "onfi_version" variable

login
register
mail settings
Submitter Alexander Shiyan
Date Feb. 28, 2013, 8:02 a.m.
Message ID <1362038541-22406-2-git-send-email-shc_work@mail.ru>
Download mbox | patch
Permalink /patch/223803/
State Accepted
Commit 0cca9fbf5d0a65fb536d38427f48460fda1f2e99
Headers show

Comments

Alexander Shiyan - Feb. 28, 2013, 8:02 a.m.
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@mail.ru>
---
 drivers/mtd/nand/nand_base.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
Brian Norris - March 4, 2013, 5:23 a.m.
On Thu, Feb 28, 2013 at 12:02 AM, Alexander Shiyan <shc_work@mail.ru> wrote:
> 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@mail.ru>

Acked-by: Brian Norris <computersforpeace@gmail.com>

Patch

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 13c89c9..382b857 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2888,8 +2888,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);