Skip to contentSkip to conversation

fat-fs printk arg. fix

PATCH In review Randy.Dunlap 3 participants 3 messages Jun 3, 2003 – Jun 4, 2003 VFAT/FAT/msdos filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fat-fs printk arg. fix

Hi,

A recent fatfs patch for large partitions upset printk. Here's a patch for it.

--
~Randy

patch_name: fat-printk.patch
patch_version: 2003-06-03.15:37:48
author: Randy.Dunlap <[email protected]>
description: printk() args are unhappy with recent change for large

		partition support;

product: Linux
product_versions: 2.5.70
maintainer: OGAWA Hirofumi
diffstat: =

 fs/fat/misc.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
fs/fat/misc.c renamed from fs/fat/misc.c%PRTK +1 -1
diff -Naur ./fs/fat/misc.c%PRTK ./fs/fat/misc.c
@@ -311,7 +311,7 @@
 	*bh = sb_bread(sb, phys);
 	if (*bh == NULL) {
 		printk(KERN_ERR "FAT: Directory bread(block %llu) failed\n",
-		       phys);
+		       (u64)phys);
 		/* skip this block */
 		*pos = (iblock + 1) << sb->s_blocksize_bits;
 		goto next;
#1 lore raw

fs/fat/misc.c line 314

Quoted 4 lines · Randy.Dunlap
fs/fat/misc.c renamed from fs/fat/misc.c%PRTK +1 -1
 		printk(KERN_ERR "FAT: Directory bread(block %llu) failed\n",
-		       phys);
+		       (u64)phys);

The printk control string says, precisely, "unsigned long long". So that is what we should be casting the argument to.

I have made that change, thanks.

maintainer
#2 lore raw
In reply to Randy.Dunlap

fs/fat/misc.c line 317

Quoted 6 lines · Randy.Dunlap
fs/fat/misc.c renamed from fs/fat/misc.c%PRTK +1 -1
 		printk(KERN_ERR "FAT: Directory bread(block %llu) failed\n",
-		       phys);
+		       (u64)phys);
 		/* skip this block */
 		*pos = (iblock + 1) << sb->s_blocksize_bits;
 		goto next;

I was forgeting that issue of sector_t with printk. Thanks for correcting.

Signature · 1 line
OGAWA Hirofumi <[email protected]>