[PATCH v2 12/19] mtd: nand_mrvl_nfc: Prepare for different HW ECC strengths

Sascha Hauer s.hauer at pengutronix.de
Sun Nov 22 23:18:16 PST 2015


On Fri, Nov 20, 2015 at 08:38:28PM +0000, Trent Piepho wrote:
> On Fri, 2015-11-20 at 20:36 +0100, Sebastian Hesselbarth wrote:
> 
> > +
> > +static int pxa_ecc_init(struct mrvl_nand_host *host,
> > +			struct nand_ecc_ctrl *ecc,
> > +			int strength, int ecc_stepsize, int page_size)
> > +{
> > +	int ret = -ENODEV;
> > +
> > +	switch (strength) {
> > +	case 1:
> > +		ret = pxa_ecc_strength1(host, ecc, ecc_stepsize, page_size);
> > +		break;
> > +	}
> 
> It would be a bit more clear to write this as:
> 
> switch (strength) {
> case 1:
>         ret = pxa_ecc_strength1(...);
>         break;
> default:
>         ret = -ENODEV;
>         break;
> }

Indeed. Changed that while applying.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list