[PATCH 08/11] mtd: add a new field for ecc info in the nand_flash_dev{}

Huang Shijie b32955 at freescale.com
Tue Apr 16 22:11:59 EDT 2013


于 2013年04月16日 22:56, Artem Bityutskiy 写道:
> On Mon, 2013-03-18 at 19:18 +0800, Huang Shijie wrote:
>> +#define ECC_INFO(strength, size)	(((strength)<<  16) | (size))
>> +#define ECC_STRENGTH(x)			(((x)>>  16)&  0xffff)
>> +#define ECC_SIZE(x)			((x)&  0xffff)
>> +	uint32_t ecc_info;
>>   };
> Could you please avoid putting macro definition in the middle of the
> structure. Put it before the structure.
>
> Also, probably prefixing with NAND_ would make sense?
got it.

thanks
Huang Shijie





More information about the linux-mtd mailing list