[U-Boot] [PATCH 1/3] [OneNAND] Flex-OneNAND driver support

Amul Kumar Saha amul.saha at samsung.com
Fri Nov 6 12:42:22 CET 2009


Hi Scott,

>
> A couple 64-bit offset nits...
>
>> +static void flexonenand_get_size(struct mtd_info *mtd)
>> +{
>> + struct onenand_chip *this = mtd->priv;
>> + int die, ofs, i, eraseshift, density;
> [snip]
>> + for (; die < this->dies; die++) {
>> + if (!die || this->boundary[die-1] != maxbdry) {
>> + i++;
>> + mtd->eraseregions[i].offset = ofs;
>> + mtd->eraseregions[i].erasesize = 1 << eraseshift;
>> + mtd->eraseregions[i].numblocks =
>> + this->boundary[die] + 1;
>> + ofs += mtd->eraseregions[i].numblocks << eraseshift;
>
> "ofs" should be loff_t.
>

Accepted and Corrected.

>> + printk(KERN_INFO "Device has %d eraseregions\n", mtd->numeraseregions);
>> + for (i = 0; i < mtd->numeraseregions; i++)
>> + printk(KERN_INFO "[offset: 0x%08x, erasesize: 0x%05x,"
>> + " numblocks: %04u]\n", mtd->eraseregions[i].offset,
>> + mtd->eraseregions[i].erasesize,
>> + mtd->eraseregions[i].numblocks);
>
> offset is uint64_t, so use %08llx.  This gives a warning...
>

Accepted and Corrected

> If you want, I can just fix these up -- but give it a retest afterward.
>

Thanks for considering fixing these yourself.
I'll send the updated patches anyway.

Regards,
Amul 




More information about the U-Boot mailing list