Skip to contentSkip to conversation

ntfs: fix printk format warning (ia64)

PATCH In review Randy.Dunlap 2 participants 2 messages Mar 3, 2005 NTFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ntfs: fix printk format warning (ia64)

ntfs: Fix printk format warnings on ia64:

fs/ntfs/aops.c:947: warning: long long unsigned int format, long int arg (arg 4) fs/ntfs/debug.c:169: warning: long long unsigned int format, VCN arg (arg 2) fs/ntfs/debug.c:169: warning: long long unsigned int format, s64 arg (arg 4) fs/ntfs/debug.c:174: warning: long long unsigned int format, LCN arg (arg 3) fs/ntfs/debug.c:174: warning: long long unsigned int format, VCN arg (arg 2) fs/ntfs/debug.c:174: warning: long long unsigned int format, s64 arg (arg 4) fs/ntfs/inode.c:2517: warning: long long unsigned int format, s64 arg (arg 6) fs/ntfs/inode.c:2517: warning: long long unsigned int format, s64 arg (arg 7) fs/ntfs/inode.c:2526: warning: long long unsigned int format, s64 arg (arg 6) fs/ntfs/inode.c:2526: warning: long long unsigned int format, s64 arg (arg 7) fs/ntfs/inode.c:2535: warning: long long unsigned int format, s64 arg (arg 6) fs/ntfs/inode.c:2535: warning: long long unsigned int format, s64 arg (arg 7) fs/ntfs/lcnalloc.c:759: warning: long long unsigned int format, long unsigned int arg (arg 6) fs/ntfs/mft.c:1775: warning: long long int format, s64 arg (arg 5)

diffstat:=

 fs/ntfs/aops.c     |    3 ++-
 fs/ntfs/debug.c    |   15 +++++++++------
 fs/ntfs/inode.c    |   12 ++++++------
 fs/ntfs/lcnalloc.c |    2 +-
 fs/ntfs/mft.c      |    2 +-
 5 files changed, 19 insertions(+), 15 deletions(-)
fs/ntfs/aops.c renamed from fs/ntfs/aops.c~ntfs_printk +2 -1
diff -Naurp ./fs/ntfs/aops.c~ntfs_printk ./fs/ntfs/aops.c
@@ -949,7 +949,8 @@ lock_retry_remap:
 						"attribute type 0x%x) because "
 						"its location on disk could "
 						"not be determined (error "
-						"code %lli).", (s64)block <<
+						"code %lli).",
+						(long long)block <<
 						bh_size_bits >>
 						vol->mft_record_size_bits,
 						ni->mft_no, ni->type,
fs/ntfs/mft.c renamed from fs/ntfs/mft.c~ntfs_printk +1 -1
diff -Naurp ./fs/ntfs/mft.c~ntfs_printk ./fs/ntfs/mft.c
@@ -1772,7 +1772,7 @@ static int ntfs_mft_data_extend_allocati
 		return PTR_ERR(rl);
 	}
 	mft_ni->runlist.rl = rl;
-	ntfs_debug("Allocated %lli clusters.", nr);
+	ntfs_debug("Allocated %lli clusters.", (long long)nr);
 	/* Find the last run in the new runlist. */
 	for (; rl[1].length; rl++)
 		;
fs/ntfs/lcnalloc.c renamed from fs/ntfs/lcnalloc.c~ntfs_printk +1 -1
diff -Naurp ./fs/ntfs/lcnalloc.c~ntfs_printk ./fs/ntfs/lcnalloc.c
@@ -761,7 +761,7 @@ out:
 					"could allocate up to 0x%llx "
 					"clusters.",
 					(unsigned long long)rl[0].lcn,
-					(unsigned long long)count - clusters);
+					(unsigned long long)(count - clusters));
 		/* Deallocate all allocated clusters. */
 		ntfs_debug("Attempting rollback...");
 		err2 = ntfs_cluster_free_from_rl_nolock(vol, rl);
fs/ntfs/inode.c renamed from fs/ntfs/inode.c~ntfs_printk +6 -6
diff -Naurp ./fs/ntfs/inode.c~ntfs_printk ./fs/ntfs/inode.c
@@ -2516,8 +2516,8 @@ int ntfs_write_inode(struct inode *vi, i
 	if (si->last_data_change_time != nt) {
 		ntfs_debug("Updating mtime for inode 0x%lx: old = 0x%llx, "
 				"new = 0x%llx", vi->i_ino,
-				sle64_to_cpu(si->last_data_change_time),
-				sle64_to_cpu(nt));
+				(long long)sle64_to_cpu(si->last_data_change_time),
+				(long long)sle64_to_cpu(nt));
 		si->last_data_change_time = nt;
 		modified = TRUE;
 	}
@@ -2525,8 +2525,8 @@ int ntfs_write_inode(struct inode *vi, i
 	if (si->last_mft_change_time != nt) {
 		ntfs_debug("Updating ctime for inode 0x%lx: old = 0x%llx, "
 				"new = 0x%llx", vi->i_ino,
-				sle64_to_cpu(si->last_mft_change_time),
-				sle64_to_cpu(nt));
+				(long long)sle64_to_cpu(si->last_mft_change_time),
+				(long long)sle64_to_cpu(nt));
 		si->last_mft_change_time = nt;
 		modified = TRUE;
 	}
@@ -2534,8 +2534,8 @@ int ntfs_write_inode(struct inode *vi, i
 	if (si->last_access_time != nt) {
 		ntfs_debug("Updating atime for inode 0x%lx: old = 0x%llx, "
 				"new = 0x%llx", vi->i_ino,
-				sle64_to_cpu(si->last_access_time),
-				sle64_to_cpu(nt));
+				(long long)sle64_to_cpu(si->last_access_time),
+				(long long)sle64_to_cpu(nt));
 		si->last_access_time = nt;
 		modified = TRUE;
 	}
fs/ntfs/debug.c renamed from fs/ntfs/debug.c~ntfs_printk +9 -6
diff -Naurp ./fs/ntfs/debug.c~ntfs_printk ./fs/ntfs/debug.c
@@ -164,14 +164,17 @@ void ntfs_debug_dump_runlist(const runli
 			if (index > -LCN_ENOENT - 1)
 				index = 3;
 			printk(KERN_DEBUG "%-16Lx %s %-16Lx%s\n",
-					(rl + i)->vcn, lcn_str[index],
-					(rl + i)->length, (rl + i)->length ?
-					"" : " (runlist end)");
+					(long long)(rl + i)->vcn, lcn_str[index],
+					(long long)(rl + i)->length,
+					(rl + i)->length ? "" :
+						" (runlist end)");
 		} else
 			printk(KERN_DEBUG "%-16Lx %-16Lx  %-16Lx%s\n",
-					(rl + i)->vcn, (rl + i)->lcn,
-					(rl + i)->length, (rl + i)->length ?
-					"" : " (runlist end)");
+					(long long)(rl + i)->vcn,
+					(long long)(rl + i)->lcn,
+					(long long)(rl + i)->length,
+					(rl + i)->length ? "" :
+						" (runlist end)");
 		if (!(rl + i)->length)
 			break;
 	}

---

#1 lore raw

Hi Randy,

Quoted 1 line · Randy.Dunlap

ntfs: Fix printk format warnings on ia64:

Thanks! I will apply it to my tree so it will be in next -mm and then in next NTFS release in mainline.

ps. You obviously compiled with ntfs debugging enabled... I had never bothered fixing up those warnings as most people don't...

Best regards,

Anton

Signature · 4 lines
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/