
11 Nov
2009
11 Nov
'09
6:56 a.m.
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