[PATCH] [MTD] [NAND] nand_ecc.c: adding support for 512 byte ecc

Artem Bityutskiy dedekind at infradead.org
Thu Aug 21 06:55:03 EDT 2008


Hi,

> +	/* 256 or 512 bytes/ecc  */
> +	uint32_t j =(((struct nand_chip *)mtd->priv)->ecc.size)/256;

It's certainly faster to use >> 8 instead. At least on x86 GCC would not
optimize this for you if the kernel is compiles with -Os, it would use
idiv instead.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list