[U-Boot] [PATCH 3/3] [OneNAND] Flex-OneNAND boundary settings

Amul Kumar Saha amul.saha at samsung.com
Wed Nov 11 06:56:09 CET 2009


Hi Scott,


> On Fri, Nov 06, 2009 at 05:17:44PM +0530, Amul Kumar Saha wrote:
>> - printk("Bad blocks %d at 0x%x\n",
>> -        (u32)(ofs >> this->erase_shift), (u32)ofs);
>> + printk("Bad blocks %lu at 0x%x\n",
>> +        (u32)onenand_block(this, ofs), (u32)ofs);
>
> cmd_onenand.c: In function 'onenand_block_read':
> cmd_onenand.c:103: warning: format '%lu' expects type 'long unsigned int',
> but argument 2 has type 'unsigned int'
>
My bad.

> If you must pass a u32 to printf, use "%u" or "%x" -- but it makes little
> sense to explicitly cast from int to something that doesn't have a standard
> printf format string.
>
> How about this?
>
> + printk("Bad block %d at 0x%llx\n",
> +        onenand_block(this, ofs), ofs);
>
Accepted and Corrected.

> Likewise throughout the rest of the file.
>
Yes, there are areas that need sanity clean-ups.
I'll send a patch for the same, shortly.

Regards,
Amul Kumar Saha 




More information about the U-Boot mailing list