[PATCH] mtd: nand: use a local variable to simplify the nand_scan_tail

Gupta, Pekon pekon at ti.com
Fri Oct 18 07:11:19 PDT 2013


> From: Huang Shijie
> There are too many "chip->ecc" in the nand_scan_tail() which makes the
> eyes
> sore.
> 
> This patch uses a local variable "ecc" to replace the "chip->ecc" to
> make the code more graceful.
> 
> Do the code change with "s/chip->ecc\./ecc->/g" in the nand_scan_tail,
> and also change some lines by hand.
> 
> Signed-off-by: Huang Shijie <b32955 at freescale.com>
> 
Personally I won't prefer such stand-alone cleanup  _unless_ there is
major driver re-write of the code, because this breaks the traceability
via 'git blame'. And even in that case, this change should be applied first,
and the other functional updates later.

On same lines, I was trying to clean-up omap2.c driver with
s/info->nand\./nand_chip->/
But withheld it till the point when I had to almost re-write complete probe.
So, I first did this change, and then on top-of-it re-wrote the omap_nand_probe().


with regards, pekon



More information about the linux-mtd mailing list