[Yaffs] [PATCH] fix printf specifier

Top Page
Attachments:
Message as email
+ (text/plain)
+ 13-use-the-correct-printf-specifier-for-pointers.diff (text/plain)
Delete this message
Reply to this message
Author: Luc Van Oostenryck
Date:  
To: yaffs
Subject: [Yaffs] [PATCH] fix printf specifier
Use the correct printf format specifier for pointers.
diff --git a/fs/yaffs2/yaffs_fs.c b/fs/yaffs2/yaffs_fs.c
--- a/fs/yaffs2/yaffs_fs.c
+++ b/fs/yaffs2/yaffs_fs.c
@@ -1438,13 +1438,13 @@ static struct super_block *yaffs_interna
             return NULL;
         }


-        T(YAFFS_TRACE_OS,(" erase %x\n",mtd->erase));
-        T(YAFFS_TRACE_OS,(" read %x\n",mtd->read));
-        T(YAFFS_TRACE_OS,(" write %x\n",mtd->write));
-        T(YAFFS_TRACE_OS,(" readoob %x\n",mtd->read_oob));
-        T(YAFFS_TRACE_OS,(" writeoob %x\n",mtd->write_oob));
-        T(YAFFS_TRACE_OS,(" block_isbad %x\n",mtd->block_isbad));
-        T(YAFFS_TRACE_OS,(" block_markbad %x\n",mtd->block_markbad));
+        T(YAFFS_TRACE_OS,(" erase %p\n",mtd->erase));
+        T(YAFFS_TRACE_OS,(" read %p\n",mtd->read));
+        T(YAFFS_TRACE_OS,(" write %p\n",mtd->write));
+        T(YAFFS_TRACE_OS,(" readoob %p\n",mtd->read_oob));
+        T(YAFFS_TRACE_OS,(" writeoob %p\n",mtd->write_oob));
+        T(YAFFS_TRACE_OS,(" block_isbad %p\n",mtd->block_isbad));
+        T(YAFFS_TRACE_OS,(" block_markbad %p\n",mtd->block_markbad));
         T(YAFFS_TRACE_OS,(" oobblock %d\n",mtd->oobblock));
         T(YAFFS_TRACE_OS,(" oobsize %d\n",mtd->oobsize));
         T(YAFFS_TRACE_OS,(" erasesize %d\n",mtd->erasesize));
diff --git a/fs/yaffs2/yaffs_mtdif2.c b/fs/yaffs2/yaffs_mtdif2.c
--- a/fs/yaffs2/yaffs_mtdif2.c
+++ b/fs/yaffs2/yaffs_mtdif2.c
@@ -42,7 +42,7 @@ int nandmtd2_WriteChunkWithTagsToNAND(ya


     yaffs_PackedTags2 pt;

    
-    T(YAFFS_TRACE_MTD,(TSTR("nandmtd2_WriteChunkWithTagsToNAND chunk %d data %08x tags %08x" TENDSTR),chunkInNAND,data,tags));    
+    T(YAFFS_TRACE_MTD,(TSTR("nandmtd2_WriteChunkWithTagsToNAND chunk %d data %p tags %p" TENDSTR),chunkInNAND,data,tags));    


     if(tags)
     {
@@ -86,7 +86,7 @@ int nandmtd2_ReadChunkWithTagsFromNAND(y

    
     yaffs_PackedTags2 pt;


-    T(YAFFS_TRACE_MTD,(TSTR("nandmtd2_ReadChunkWithTagsToNAND chunk %d data %08x tags %08x" TENDSTR),chunkInNAND,data,tags));    
+    T(YAFFS_TRACE_MTD,(TSTR("nandmtd2_ReadChunkWithTagsToNAND chunk %d data %p tags %p" TENDSTR),chunkInNAND,data,tags));    


 #ifndef    CONFIG_YAFFS_USE_OLD_MTD
     if(data && tags)