Skip to contentSkip to conversation

can anybody check that the attached patch eliminates reiser4 compilation warnings on 64bit platforms?

PATCH Alexander Zarochentsev 2 participants 2 messages Apr 6, 2006

lore
Share & tools
lore
#0 lore raw

hello,

would you please help to check the attached patch (for 2.6.17-rc1-mm1) because our Alpha does not want to boot now.

the warning were:

fs/reiser4/jnode.c: In function `info_jnode':
fs/reiser4/jnode.c:1923: warning: long long unsigned int format, __u64 arg (arg 2)
fs/reiser4/key.c: In function `print_key':
fs/reiser4/key.c:88: warning: long long unsigned int format, oid_t arg (arg 3)
fs/reiser4/key.c:88: warning: long long unsigned int format, __u64 arg (arg 5)
fs/reiser4/key.c:88: warning: long long unsigned int format, __u64 arg (arg 6)
fs/reiser4/key.c:88: warning: long long unsigned int format, oid_t arg (arg 7)
fs/reiser4/key.c:88: warning: long long unsigned int format, __u64 arg (arg 8)
fs/reiser4/key.c:94: warning: long long unsigned int format, oid_t arg (arg 3)
fs/reiser4/key.c:94: warning: long long unsigned int format, __u64 arg (arg 5)
fs/reiser4/key.c:94: warning: long long unsigned int format, oid_t arg (arg 6)
fs/reiser4/key.c:94: warning: long long unsigned int format, __u64 arg (arg 7)
fs/reiser4/super_ops.c: In function `reiser4_dirty_inode':
fs/reiser4/super_ops.c:176: warning: long long unsigned int format, oid_t arg (arg 9)
fs/reiser4/plugin/file_ops_readdir.c: In function `readdir_common':
fs/reiser4/plugin/file_ops_readdir.c:635: warning: long long unsigned int format, oid_t arg (arg 9) fs/reiser4/plugin/dir_plugin_common.c: In function `rem_entry':
fs/reiser4/plugin/dir_plugin_common.c:207: warning: long long unsigned int format, oid_t arg (arg 9) fs/reiser4/plugin/file/file.c: In function `delete_object_unix_file':
fs/reiser4/plugin/file/file.c:2986: warning: long long unsigned int format, oid_t arg (arg 9)
fs/reiser4/plugin/space/bitmap.c: In function `bnode_check_adler32':
fs/reiser4/plugin/space/bitmap.c:506: warning: long long unsigned int format, bmap_nr_t arg (arg 9)

Thanks in advance.

Signature · 1 line
Alex.

A fix for printk format specifications and __u64 arguments mismatch, visible on Alpha platform.

Signed-off-by <[email protected]>

---

 fs/reiser4/key.c                      |   16 +++++++++-------
 fs/reiser4/plugin/dir_plugin_common.c |    2 +-
 fs/reiser4/plugin/file/file.c         |    2 +-
 fs/reiser4/plugin/file_ops_readdir.c  |    2 +-
 fs/reiser4/plugin/space/bitmap.c      |    2 +-
 fs/reiser4/super_ops.c                |    2 +-
 6 files changed, 14 insertions(+), 12 deletions(-)
fs/reiser4/key.c +9 -7
Index: linux-2.6.17-rc1-mm1/fs/reiser4/key.c
===================================================================
@@ -81,17 +81,19 @@ void print_key(const char *prefix /* pre
 	else {
 		if (REISER4_LARGE_KEY)
 			printk("%s: (%Lx:%x:%Lx:%Lx:%Lx:%Lx)", prefix,
-			       get_key_locality(key),
+			       (unsigned long long)get_key_locality(key),
 			       get_key_type(key),
-			       get_key_ordering(key),
-			       get_key_band(key),
-			       get_key_objectid(key), get_key_offset(key));
+			       (unsigned long long)get_key_ordering(key),
+			       (unsigned long long)get_key_band(key),
+			       (unsigned long long)get_key_objectid(key),
+			       (unsigned long long)get_key_offset(key));
 		else
 			printk("%s: (%Lx:%x:%Lx:%Lx:%Lx)", prefix,
-			       get_key_locality(key),
+			       (unsigned long long)get_key_locality(key),
 			       get_key_type(key),
-			       get_key_band(key),
-			       get_key_objectid(key), get_key_offset(key));
+			       (unsigned long long)get_key_band(key),
+			       (unsigned long long)get_key_objectid(key),
+			       (unsigned long long)get_key_offset(key));
 		/*
 		 * if this is a key of directory entry, try to decode part of
 		 * a name stored in the key, and output it.
fs/reiser4/plugin/dir_plugin_common.c +1 -1
Index: linux-2.6.17-rc1-mm1/fs/reiser4/plugin/dir_plugin_common.c
===================================================================
@@ -206,7 +206,7 @@ rem_entry(struct inode *dir, struct dent
 		if (get_key_objectid(&key) != get_inode_oid(child)) {
 			warning("nikita-3397",
 				"rem_entry: %#llx != %#llx\n",
-				get_key_objectid(&key),
+				(unsigned long long)get_key_objectid(&key),
 				(unsigned long long)get_inode_oid(child));
 			return RETERR(-EIO);
 		}
fs/reiser4/plugin/file/file.c +1 -1
Index: linux-2.6.17-rc1-mm1/fs/reiser4/plugin/file/file.c
===================================================================
@@ -2971,7 +2971,7 @@ int delete_object_unix_file(struct inode
 
 	if (result)
 		warning("", "failed to truncate file (%llu) on removal: %d",
-			get_inode_oid(inode), result);
+			(unsigned long long)get_inode_oid(inode), result);
 
 	/* remove stat data and safe link */
 	return delete_object_common(inode);
fs/reiser4/plugin/file_ops_readdir.c +1 -1
Index: linux-2.6.17-rc1-mm1/fs/reiser4/plugin/file_ops_readdir.c
===================================================================
@@ -633,7 +633,7 @@ int readdir_common(struct file *f /* dir
 	if (reiser4_grab_space(inode_file_plugin(inode)->estimate.update(inode),
 			       BA_CAN_COMMIT) != 0)
 		warning("", "failed to update atime on readdir: %llu",
-			get_inode_oid(inode));
+			(unsigned long long)get_inode_oid(inode));
 	else
 		file_accessed(f);
 
fs/reiser4/plugin/space/bitmap.c +1 -1
Index: linux-2.6.17-rc1-mm1/fs/reiser4/plugin/space/bitmap.c
===================================================================
@@ -505,7 +505,7 @@ bnode_check_adler32(const struct bitmap_
 
 		warning("vpf-263",
 			"Checksum for the bitmap block %llu is incorrect",
-			bmap);
+			(unsigned long long)bmap);
 
 		return RETERR(-EIO);
 	}
fs/reiser4/super_ops.c +1 -1
Index: linux-2.6.17-rc1-mm1/fs/reiser4/super_ops.c
===================================================================
@@ -174,7 +174,7 @@ static void reiser4_dirty_inode(struct i
 	result = reiser4_update_sd(inode);
 	if (result)
 		warning("", "failed to dirty inode for %llu: %d",
-			get_inode_oid(inode), result);
+			(unsigned long long)get_inode_oid(inode), result);
 }
 
 /**
#1 lore raw

Hello,

Quoted 1 line · Alexander Zarochentsev

would you please help to check the attached patch (for 2.6.17-rc1-mm1) because our Alpha does not want to boot now.

I'm not sure what the last kernel version you had booting was (or what the error is now the your Alpha system does not want to boot), but I recently discovered a problem with kernels booting on my Alpha that was introduced in one of the 2.6.16-rc's. Yesterday I was able to track down and squash the bug, and submitted my patch (two versions, one for 2.6.16.1 and the other for 2.6.17-rc1) to the LKML. After fixing the issue with CPU initialization, which looks like it would affect any Alpha system as it was a case of things changing/being added in all of the other architectures but not for the Alpha architecture, the system has been running fine with a 2.6.16.1 kernel and reiser4 root filesystem. :) You can find my email with the patch at http://lkml.org/lkml/mbox/2006/4/5/69

- Brian

BTW, your patch to silence the printf-style format string argument warnings looks fine to me. :)