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

Harvey Hunt harvey.hunt at imgtec.com
Fri Jan 8 04:30:32 PST 2016


Hi,

On 08/01/16 12:28, Boris Brezillon wrote:
> On Thu,  7 Jan 2016 09:53:08 -0800
> Brian Norris <computersforpeace at gmail.com> 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>
>
> LGTM
>
> Reviewed-by: Boris Brezillon <boris.brezillon at free-electrons.com>
>

If it helps, I can add my Tested-By later today?

Harvey



More information about the linux-mtd mailing list