mtd/drivers/mtd inftlmount.c,1.13,1.14
David Woodhouse
dwmw2 at infradead.org
Mon Aug 9 09:57:45 EDT 2004
Update of /home/cvs/mtd/drivers/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv6008
Modified Files:
inftlmount.c
Log Message:
More size_t and pointer 64-bit fixes from Al
Index: inftlmount.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/inftlmount.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- inftlmount.c 28 Jun 2004 16:06:36 -0000 1.13
+++ inftlmount.c 9 Aug 2004 13:57:42 -0000 1.14
@@ -58,10 +58,9 @@
u8 buf[SECTORSIZE];
struct INFTLMediaHeader *mh = &inftl->MediaHdr;
struct INFTLPartition *ip;
- int retlen;
+ size_t retlen;
- DEBUG(MTD_DEBUG_LEVEL3, "INFTL: find_boot_record(inftl=0x%x)\n",
- (int)inftl);
+ DEBUG(MTD_DEBUG_LEVEL3, "INFTL: find_boot_record(inftl=%p)\n", inftl);
/*
* Assume logical EraseSize == physical erasesize for starting the
@@ -288,7 +287,7 @@
inftl->PUtable = kmalloc(inftl->nb_blocks * sizeof(u16), GFP_KERNEL);
if (!inftl->PUtable) {
printk(KERN_WARNING "INFTL: allocation of PUtable "
- "failed (%d bytes)\n",
+ "failed (%zd bytes)\n",
inftl->nb_blocks * sizeof(u16));
return -ENOMEM;
}
@@ -297,7 +296,7 @@
if (!inftl->VUtable) {
kfree(inftl->PUtable);
printk(KERN_WARNING "INFTL: allocation of VUtable "
- "failed (%d bytes)\n",
+ "failed (%zd bytes)\n",
inftl->nb_blocks * sizeof(u16));
return -ENOMEM;
}
@@ -348,11 +347,12 @@
static int check_free_sectors(struct INFTLrecord *inftl, unsigned int address,
int len, int check_oob)
{
- int i, retlen;
u8 buf[SECTORSIZE + inftl->mbd.mtd->oobsize];
+ size_t retlen;
+ int i;
- DEBUG(MTD_DEBUG_LEVEL3, "INFTL: check_free_sectors(inftl=0x%x,"
- "address=0x%x,len=%d,check_oob=%d)\n", (int)inftl,
+ DEBUG(MTD_DEBUG_LEVEL3, "INFTL: check_free_sectors(inftl=%p,"
+ "address=0x%x,len=%d,check_oob=%d)\n", inftl,
address, len, check_oob);
for (i = 0; i < len; i += SECTORSIZE) {
@@ -382,13 +382,13 @@
*/
int INFTL_formatblock(struct INFTLrecord *inftl, int block)
{
- int retlen;
+ size_t retlen;
struct inftl_unittail uci;
struct erase_info *instr = &inftl->instr;
int physblock;
- DEBUG(MTD_DEBUG_LEVEL3, "INFTL: INFTL_formatblock(inftl=0x%x,"
- "block=%d)\n", (int)inftl, block);
+ DEBUG(MTD_DEBUG_LEVEL3, "INFTL: INFTL_formatblock(inftl=%p,"
+ "block=%d)\n", inftl, block);
memset(instr, 0, sizeof(struct erase_info));
@@ -551,10 +551,11 @@
int chain_length, do_format_chain;
struct inftl_unithead1 h0;
struct inftl_unittail h1;
- int i, retlen;
+ size_t retlen;
+ int i;
u8 *ANACtable, ANAC;
- DEBUG(MTD_DEBUG_LEVEL3, "INFTL: INFTL_mount(inftl=0x%x)\n", (int)s);
+ DEBUG(MTD_DEBUG_LEVEL3, "INFTL: INFTL_mount(inftl=%p)\n", s);
/* Search for INFTL MediaHeader and Spare INFTL Media Header */
if (find_boot_record(s) < 0) {
More information about the linux-mtd-cvs
mailing list