Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fat: i_blocks warning fix

blkcnt_t type depends on CONFIG_LSF. Use unsigned long long always for
printk(). But lazy to type it, so add "llu" and use it.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

OGAWA Hirofumi and committed by
Linus Torvalds
c3302931 9ca59f4c

+9 -6
+1 -1
fs/fat/dir.c
··· 86 86 *bh = sb_bread(sb, phys); 87 87 if (*bh == NULL) { 88 88 printk(KERN_ERR "FAT: Directory bread(block %llu) failed\n", 89 - (unsigned long long)phys); 89 + (llu)phys); 90 90 /* skip this block */ 91 91 *pos = (iblock + 1) << sb->s_blocksize_bits; 92 92 goto next;
+3
fs/fat/fat.h
··· 323 323 int fat_cache_init(void); 324 324 void fat_cache_destroy(void); 325 325 326 + /* helper for printk */ 327 + typedef unsigned long long llu; 328 + 326 329 #endif /* !_FAT_H */
+2 -3
fs/fat/fatent.c
··· 93 93 err_brelse: 94 94 brelse(bhs[0]); 95 95 err: 96 - printk(KERN_ERR "FAT: FAT read failed (blocknr %llu)\n", 97 - (unsigned long long)blocknr); 96 + printk(KERN_ERR "FAT: FAT read failed (blocknr %llu)\n", (llu)blocknr); 98 97 return -EIO; 99 98 } 100 99 ··· 106 107 fatent->bhs[0] = sb_bread(sb, blocknr); 107 108 if (!fatent->bhs[0]) { 108 109 printk(KERN_ERR "FAT: FAT read failed (blocknr %llu)\n", 109 - (unsigned long long)blocknr); 110 + (llu)blocknr); 110 111 return -EIO; 111 112 } 112 113 fatent->nr_bhs = 1;
+3 -2
fs/fat/misc.c
··· 124 124 mark_inode_dirty(inode); 125 125 } 126 126 if (new_fclus != (inode->i_blocks >> (sbi->cluster_bits - 9))) { 127 - fat_fs_panic(sb, "clusters badly computed (%d != %lu)", 128 - new_fclus, inode->i_blocks >> (sbi->cluster_bits - 9)); 127 + fat_fs_panic(sb, "clusters badly computed (%d != %llu)", 128 + new_fclus, 129 + (llu)(inode->i_blocks >> (sbi->cluster_bits - 9))); 129 130 fat_cache_inval_inode(inode); 130 131 } 131 132 inode->i_blocks += nr_cluster << (sbi->cluster_bits - 9);