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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
}

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux