[PATCH] mtd: jz4780_nand: replace if/else blocks with switch/case

Brian Norris computersforpeace at gmail.com
Fri Jan 8 09:49:47 PST 2016


On Fri, Jan 08, 2016 at 04:26:48PM +0000, Harvey Hunt wrote:
> Hi Brian,
> 
> On 07/01/16 17:53, Brian Norris wrote:
> >Using switch/case helps make this logic more clear and more robust. With
> >this structure:
> >
> >  * it's clear that this driver only support ECC_{HW,SOFT,SOFT_BCH}; and
> >
> >  * we can sanely handle new ECC unsupported modes (right now, this code
> >    makes incorrect assumptions about the possible values in the
> >    nand_ecc_modes_t enum; e.g., what happens with NAND_ECC_HW_OOB_FIRST?)
> >
> >Signed-off-by: Brian Norris <computersforpeace at gmail.com>
> >Cc: Alex Smith <alex at alex-smith.me.uk>
> >Cc: Harvey Hunt <harvey.hunt at imgtec.com>
> 
> I've just tested this on a Ci20 and all seems well.
> 
> Tested-by: Harvey Hunt <harvey.hunt at imgtec.com>
> Acked-by: Harvey Hunt <harvey.hunt at imgtec.com>

Great, applied to l2-mtd.git



More information about the linux-mtd mailing list